Merge branch 'main' into testing

This commit is contained in:
Kyle Gospodnetich 2024-03-19 14:35:37 -07:00
commit 1dc928b895
7 changed files with 66 additions and 29 deletions

View File

@ -6,7 +6,7 @@ ConditionEnvironment=|WAYLAND_DISPLAY
ConditionEnvironment=|DISPLAY ConditionEnvironment=|DISPLAY
[Service] [Service]
ExecStart=/usr/bin/distrobox-enter -n arch -- ' /usr/bin/otd-daemon' ExecStart=/usr/bin/distrobox-enter -n arch -- /usr/bin/otd-daemon
Restart=always Restart=always
RestartSec=3 RestartSec=3

View File

@ -4,7 +4,7 @@ After=network.target
[Service] [Service]
Type=simple Type=simple
ExecStart=/usr/bin/distrobox-enter -n fedora -- ' /usr/bin/rslsync --nodaemon' ExecStart=/usr/bin/distrobox-enter -n fedora -- /usr/bin/rslsync --nodaemon
[Install] [Install]
WantedBy=default.target WantedBy=default.target

View File

@ -2,24 +2,27 @@
# tuned configuration # tuned configuration
# #
[main] [main]
summary=General tuned profile for CPUs without p-state support
[cpu] [cpu]
priority = 10 priority=10
governor = schedutil governor=schedutil
energy_perf_bias = normal energy_perf_bias=normal
energy_performance_preference = balance_performance energy_performance_preference=balance_performance
[acpi] [acpi]
platform_profile = balanced platform_profile=balanced
[audio] [audio]
timeout = 10 timeout=10
[video] [video]
radeon_powersave = dpm-balanced, auto radeon_powersave=dpm-balanced,auto
[disk] [disk]
# Comma separated list of devices, all devices if commented out.
# devices=sda
[scsi_host] [scsi_host]
alpm = medium_power alpm=medium_power

View File

@ -7,7 +7,7 @@ IMAGE_FLAVOR=$(jq -r '."image-flavor"' < $IMAGE_INFO)
FEDORA_VERSION=$(jq -r '."fedora-version"' < $IMAGE_INFO) FEDORA_VERSION=$(jq -r '."fedora-version"' < $IMAGE_INFO)
# SCRIPT VERSION # SCRIPT VERSION
HWS_VER=35 HWS_VER=36
HWS_VER_FILE="/etc/bazzite/hws_version" HWS_VER_FILE="/etc/bazzite/hws_version"
HWS_VER_RAN=$(cat $HWS_VER_FILE) HWS_VER_RAN=$(cat $HWS_VER_FILE)
@ -142,6 +142,23 @@ elif [[ ":83E1:" =~ ":$SYS_ID:" ]]; then
echo "Adding panel orientation for Lenovo Legion Go" echo "Adding panel orientation for Lenovo Legion Go"
NEEDED_KARGS+=("--append-if-missing=video=eDP-1:panel_orientation=left_side_up") NEEDED_KARGS+=("--append-if-missing=video=eDP-1:panel_orientation=left_side_up")
fi fi
if [[ ! $KARGS =~ "amdgpu.gttsize" ]]; then
echo "Adding GTTSize for Lenovo Legion Go"
NEEDED_KARGS+=("--append-if-missing=amdgpu.gttsize=8128")
fi
if [[ ! $KARGS =~ "amdgpu.sg_display" ]]; then
echo "Adding SG Display for Lenovo Legion Go"
NEEDED_KARGS+=("--append-if-missing=amdgpu.sg_display=0")
fi
elif [[ ":ROG Ally RC71L_RC71L:ROG Ally RC71L:" =~ ":$SYS_ID:" ]]; then
if [[ ! $KARGS =~ "amdgpu.gttsize" ]]; then
echo "Adding GTTSize for ASUS Ally"
NEEDED_KARGS+=("--append-if-missing=amdgpu.gttsize=8128")
fi
if [[ ! $KARGS =~ "amdgpu.sg_display" ]]; then
echo "Adding SG Display for ASUS Ally"
NEEDED_KARGS+=("--append-if-missing=amdgpu.sg_display=0")
fi
elif [[ ":G1617-01:" =~ ":$SYS_ID:" ]]; then elif [[ ":G1617-01:" =~ ":$SYS_ID:" ]]; then
if [[ ! $KARGS =~ "video" ]]; then if [[ ! $KARGS =~ "video" ]]; then
echo "Adding panel orientation for GPD Win Mini" echo "Adding panel orientation for GPD Win Mini"

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash #!/usr/bin/bash
# Returns true for hardware that is supported by SimpleDeckyTDP # Returns true for hardware that is supported by SimpleDeckyTDP
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)" SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
if [[ ":ROG Ally RC71L_RC71L:ROG Ally RC71L:83E1:G1618-04:G1617-01:G1619-05:AIR Plus:AIR:" =~ ":$SYS_ID:" ]]; then if [[ ":ROG Ally RC71L_RC71L:ROG Ally RC71L:83E1:G1618-04:G1619-04:G1617-01:G1619-05:AIR Plus:AIR:SLIDE:" =~ ":$SYS_ID:" ]]; then
exit 0 exit 0
else else
exit 1 exit 1

View File

@ -96,9 +96,9 @@ install-solaar: distrobox-check-fedora
# Install Resilio Sync, a file synchronization utility powered by BitTorrent # Install Resilio Sync, a file synchronization utility powered by BitTorrent
install-resilio-sync: distrobox-check-fedora install-resilio-sync: distrobox-check-fedora
distrobox-enter -n fedora -- 'sudo rpm --import https://linux-packages.resilio.com/resilio-sync/key.asc' && \ distrobox-enter -n fedora -- bash -c 'sudo rpm --import https://linux-packages.resilio.com/resilio-sync/key.asc' && \
distrobox-enter -n fedora -- 'sudo wget https://raw.githubusercontent.com/ublue-os/bazzite/main/post_install_files/resilio_sync/resilio-sync.repo -O /etc/yum.repos.d/resilio-sync.repo' && \ distrobox-enter -n fedora -- bash -c 'sudo wget https://raw.githubusercontent.com/ublue-os/bazzite/main/post_install_files/resilio_sync/resilio-sync.repo -O /etc/yum.repos.d/resilio-sync.repo' && \
distrobox-enter -n fedora -- 'sudo dnf install -y resilio-sync' && \ distrobox-enter -n fedora -- bash -c 'sudo dnf install -y resilio-sync' && \
mkdir -p ~/.config/systemd/user/ && \ mkdir -p ~/.config/systemd/user/ && \
rm -f ~/.config/systemd/user/fedora-resilio-sync.service && \ rm -f ~/.config/systemd/user/fedora-resilio-sync.service && \
wget https://raw.githubusercontent.com/ublue-os/bazzite/main/post_install_files/resilio_sync/fedora-resilio-sync.service -O ~/.config/systemd/user/fedora-resilio-sync.service && \ wget https://raw.githubusercontent.com/ublue-os/bazzite/main/post_install_files/resilio_sync/fedora-resilio-sync.service -O ~/.config/systemd/user/fedora-resilio-sync.service && \
@ -118,13 +118,13 @@ install-opentabletdriver:
if grep -qvz "arch" <<< $(distrobox list); then \ if grep -qvz "arch" <<< $(distrobox list); then \
Assemble noconfirmcreate "" "arch"; \ Assemble noconfirmcreate "" "arch"; \
fi && \ fi && \
distrobox enter -n arch -- ' paru -S opentabletdriver --noconfirm' && \ distrobox enter -n arch -- bash -c 'paru -S opentabletdriver --noconfirm' && \
mkdir -p ~/.config/systemd/user/ && \ mkdir -p ~/.config/systemd/user/ && \
rm -f ~/.config/systemd/user/arch-opentabletdriver.service && \ rm -f ~/.config/systemd/user/arch-opentabletdriver.service && \
wget https://raw.githubusercontent.com/ublue-os/bazzite/main/post_install_files/OpenTabletDriver/opentabletdriver.service -O ~/.config/systemd/user/arch-opentabletdriver.service && \ wget https://raw.githubusercontent.com/ublue-os/bazzite/main/post_install_files/OpenTabletDriver/opentabletdriver.service -O ~/.config/systemd/user/arch-opentabletdriver.service && \
systemctl --user daemon-reload && \ systemctl --user daemon-reload && \
systemctl enable --user --now arch-opentabletdriver.service && \ systemctl enable --user --now arch-opentabletdriver.service && \
distrobox enter -n arch -- 'distrobox-export --app otd-gui' distrobox enter -n arch -- bash -c 'distrobox-export --app otd-gui'
# Create fedora distrobox if it doesn't exist # Create fedora distrobox if it doesn't exist
[private] [private]

View File

@ -6,16 +6,15 @@ setup-virtualization ACTION="":
source /usr/lib/ujust/ujust.sh source /usr/lib/ujust/ujust.sh
# Check if we are running on a Steam Deck # Check if we are running on a Steam Deck
if /usr/libexec/hardware/valve-hardware; then if /usr/libexec/hardware/valve-hardware; then
echo "Virtualization is not supported on Steam Deck" echo "${red}${b}WARNING${n}: Virtualization is not properly supported on Steam Deck by Valve"
exit 0 echo "Use at your own risk and performance may not be ideal."
else fi
if [ "$(systemctl is-enabled libvirtd.service)" == "disabled" ]; then if [ "$(systemctl is-enabled libvirtd.service)" == "disabled" ]; then
echo "${b}libvirtd${n} service is ${red}disabled${n}!" echo "${b}libvirtd${n} service is ${red}disabled${n}!"
echo "${green}enabling${n} and starting libvirtd" echo "${green}enabling${n} and starting libvirtd"
echo "If virt-manager says libvirtd.sock is not available after a big update, re-run this command." echo "If virt-manager says libvirtd.sock is not available after a big update, re-run this command."
sudo systemctl enable --now libvirtd 2> /dev/null sudo systemctl enable --now libvirtd 2> /dev/null
echo "Press ESC if you want to exit and do not need to do anything" echo "Press ESC if you want to exit and do not need to do anything"
fi
fi fi
OPTION={{ ACTION }} OPTION={{ ACTION }}
if [ "$OPTION" == "help" ]; then if [ "$OPTION" == "help" ]; then
@ -41,7 +40,7 @@ setup-virtualization ACTION="":
"Autocreate Looking-Glass shm" \ "Autocreate Looking-Glass shm" \
) )
fi fi
if [[ "${OPTION,,}" =~ ^enable[[:space:]]virt ]]; then if [[ "${OPTION,,}" =~ ^enable(|[[:space:]]virtualization) ]]; then
virt_test=$(rpm-ostree status | grep -A 4 "●" | grep "virt-manager") virt_test=$(rpm-ostree status | grep -A 4 "●" | grep "virt-manager")
if [[ -z ${virt_test} ]]; then if [[ -z ${virt_test} ]]; then
echo "Installing QEMU and virt-manager..." echo "Installing QEMU and virt-manager..."
@ -51,7 +50,7 @@ setup-virtualization ACTION="":
--append-if-missing="kvm.report_ignored_msrs=0" --append-if-missing="kvm.report_ignored_msrs=0"
echo 'Please re-run "ujust setup-virtualization" after the reboot to enable libvirtd service' echo 'Please re-run "ujust setup-virtualization" after the reboot to enable libvirtd service'
fi fi
elif [[ "${OPTION,,}" =~ ^disable[[:space:]]virt ]]; then elif [[ "${OPTION,,}" =~ ^disable(|[[:space:]]virtualization) ]]; then
virt_test=$(rpm-ostree status | grep -A 4 "●" | grep "virt-manager") virt_test=$(rpm-ostree status | grep -A 4 "●" | grep "virt-manager")
if [[ ${virt_test} ]]; then if [[ ${virt_test} ]]; then
if [ "$(systemctl is-enabled libvirtd.service)" == "enabled" ]; then if [ "$(systemctl is-enabled libvirtd.service)" == "enabled" ]; then
@ -66,6 +65,11 @@ setup-virtualization ACTION="":
echo 'Please re-run "ujust enable-virtualization" after the reboot to finish setup' echo 'Please re-run "ujust enable-virtualization" after the reboot to finish setup'
fi fi
elif [[ "${OPTION,,}" =~ (^enable[[:space:]]vfio|vfio-on) ]]; then elif [[ "${OPTION,,}" =~ (^enable[[:space:]]vfio|vfio-on) ]]; then
# Check if we are running on a Steam Deck
if /usr/libexec/hardware/valve-hardware; then
echo "IOMMU is not supported on Steam Deck"
exit 0
fi
echo "Enabling VFIO..." echo "Enabling VFIO..."
VIRT_TEST=$(rpm-ostree kargs) VIRT_TEST=$(rpm-ostree kargs)
CPU_VENDOR=$(grep "vendor_id" "/proc/cpuinfo" | uniq | awk -F": " '{ print $2 }') CPU_VENDOR=$(grep "vendor_id" "/proc/cpuinfo" | uniq | awk -F": " '{ print $2 }')
@ -95,6 +99,11 @@ setup-virtualization ACTION="":
fi fi
fi fi
elif [[ "${OPTION,,}" =~ (^disable[[:space:]]vfio|vfio-off) ]]; then elif [[ "${OPTION,,}" =~ (^disable[[:space:]]vfio|vfio-off) ]]; then
# Check if we are running on a Steam Deck
if /usr/libexec/hardware/valve-hardware; then
echo "IOMMU is not supported on Steam Deck"
exit 0
fi
echo "" echo ""
echo "Make sure you have ${b}disabled autostart of all VMs using VFIO${n} before continuing!" echo "Make sure you have ${b}disabled autostart of all VMs using VFIO${n} before continuing!"
CONFIRM=$(Choose Cancel Continue) CONFIRM=$(Choose Cancel Continue)
@ -122,6 +131,11 @@ setup-virtualization ACTION="":
$VFIO_IDS_KARG $VFIO_IDS_KARG
fi fi
elif [[ "${OPTION,,}" =~ shm ]]; then elif [[ "${OPTION,,}" =~ shm ]]; then
# Check if we are running on a Steam Deck
if /usr/libexec/hardware/valve-hardware; then
echo "IOMMU is not supported on Steam Deck"
exit 0
fi
echo "Creating tmpfile definition for shm file in /etc/tmpfiles.d/" echo "Creating tmpfile definition for shm file in /etc/tmpfiles.d/"
sudo bash -c "tee << LOOKING_GLASS_TMP > /etc/tmpfiles.d/10-looking-glass.conf sudo bash -c "tee << LOOKING_GLASS_TMP > /etc/tmpfiles.d/10-looking-glass.conf
# Type Path Mode UID GID Age Argument # Type Path Mode UID GID Age Argument
@ -130,5 +144,8 @@ setup-virtualization ACTION="":
echo "Adding SELinux context record for /dev/shm/looking-glass" echo "Adding SELinux context record for /dev/shm/looking-glass"
sudo semanage fcontext -a -t svirt_tmpfs_t /dev/shm/looking-glass sudo semanage fcontext -a -t svirt_tmpfs_t /dev/shm/looking-glass
elif [[ "${OPTION,,}" =~ group ]]; then elif [[ "${OPTION,,}" =~ group ]]; then
if ! grep -q "^libvirt" /etc/group; then
grep '^libvirt' /usr/lib/group | sudo tee -a /etc/group > /dev/null
fi
sudo usermod -aG libvirt $USER sudo usermod -aG libvirt $USER
fi fi