diff --git a/post_install_files/OpenTabletDriver/opentabletdriver.service b/post_install_files/OpenTabletDriver/opentabletdriver.service index d0c5b688..6b89011c 100644 --- a/post_install_files/OpenTabletDriver/opentabletdriver.service +++ b/post_install_files/OpenTabletDriver/opentabletdriver.service @@ -6,7 +6,7 @@ ConditionEnvironment=|WAYLAND_DISPLAY ConditionEnvironment=|DISPLAY [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 RestartSec=3 diff --git a/post_install_files/resilio_sync/fedora-resilio-sync.service b/post_install_files/resilio_sync/fedora-resilio-sync.service index c09dd80a..e307ff11 100644 --- a/post_install_files/resilio_sync/fedora-resilio-sync.service +++ b/post_install_files/resilio_sync/fedora-resilio-sync.service @@ -4,7 +4,7 @@ After=network.target [Service] 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] WantedBy=default.target diff --git a/system_files/desktop/shared/usr/lib/tuned/balanced-no-pstate/tuned.conf b/system_files/desktop/shared/usr/lib/tuned/balanced-no-pstate/tuned.conf index 3c78bf39..4d2c3d84 100644 --- a/system_files/desktop/shared/usr/lib/tuned/balanced-no-pstate/tuned.conf +++ b/system_files/desktop/shared/usr/lib/tuned/balanced-no-pstate/tuned.conf @@ -2,24 +2,27 @@ # tuned configuration # [main] +summary=General tuned profile for CPUs without p-state support [cpu] -priority = 10 -governor = schedutil -energy_perf_bias = normal -energy_performance_preference = balance_performance +priority=10 +governor=schedutil +energy_perf_bias=normal +energy_performance_preference=balance_performance [acpi] -platform_profile = balanced +platform_profile=balanced [audio] -timeout = 10 +timeout=10 [video] -radeon_powersave = dpm-balanced, auto +radeon_powersave=dpm-balanced,auto [disk] +# Comma separated list of devices, all devices if commented out. +# devices=sda [scsi_host] -alpm = medium_power +alpm=medium_power diff --git a/system_files/desktop/shared/usr/libexec/bazzite-hardware-setup b/system_files/desktop/shared/usr/libexec/bazzite-hardware-setup index 99c0a9dd..46baa711 100755 --- a/system_files/desktop/shared/usr/libexec/bazzite-hardware-setup +++ b/system_files/desktop/shared/usr/libexec/bazzite-hardware-setup @@ -7,7 +7,7 @@ IMAGE_FLAVOR=$(jq -r '."image-flavor"' < $IMAGE_INFO) FEDORA_VERSION=$(jq -r '."fedora-version"' < $IMAGE_INFO) # SCRIPT VERSION -HWS_VER=35 +HWS_VER=36 HWS_VER_FILE="/etc/bazzite/hws_version" HWS_VER_RAN=$(cat $HWS_VER_FILE) @@ -142,6 +142,23 @@ elif [[ ":83E1:" =~ ":$SYS_ID:" ]]; then echo "Adding panel orientation for Lenovo Legion Go" NEEDED_KARGS+=("--append-if-missing=video=eDP-1:panel_orientation=left_side_up") 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 if [[ ! $KARGS =~ "video" ]]; then echo "Adding panel orientation for GPD Win Mini" diff --git a/system_files/desktop/shared/usr/libexec/hardware/simpledeckytdp-supported-hardware b/system_files/desktop/shared/usr/libexec/hardware/simpledeckytdp-supported-hardware index 096ebbf7..ad300f4d 100755 --- a/system_files/desktop/shared/usr/libexec/hardware/simpledeckytdp-supported-hardware +++ b/system_files/desktop/shared/usr/libexec/hardware/simpledeckytdp-supported-hardware @@ -1,7 +1,7 @@ #!/usr/bin/bash # Returns true for hardware that is supported by SimpleDeckyTDP 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 else exit 1 diff --git a/system_files/desktop/shared/usr/share/ublue-os/just/82-bazzite-apps.just b/system_files/desktop/shared/usr/share/ublue-os/just/82-bazzite-apps.just index 1eb51034..fa553009 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/just/82-bazzite-apps.just +++ b/system_files/desktop/shared/usr/share/ublue-os/just/82-bazzite-apps.just @@ -96,9 +96,9 @@ install-solaar: distrobox-check-fedora # Install Resilio Sync, a file synchronization utility powered by BitTorrent 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 -- '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 rpm --import https://linux-packages.resilio.com/resilio-sync/key.asc' && \ + 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 -- bash -c 'sudo dnf install -y resilio-sync' && \ mkdir -p ~/.config/systemd/user/ && \ 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 && \ @@ -118,13 +118,13 @@ install-opentabletdriver: if grep -qvz "arch" <<< $(distrobox list); then \ Assemble noconfirmcreate "" "arch"; \ fi && \ - distrobox enter -n arch -- ' paru -S opentabletdriver --noconfirm' && \ + distrobox enter -n arch -- bash -c 'paru -S opentabletdriver --noconfirm' && \ mkdir -p ~/.config/systemd/user/ && \ 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 && \ systemctl --user daemon-reload && \ 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 [private] diff --git a/system_files/desktop/shared/usr/share/ublue-os/just/84-bazzite-virt.just b/system_files/desktop/shared/usr/share/ublue-os/just/84-bazzite-virt.just index 54cf06e2..494a213a 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/just/84-bazzite-virt.just +++ b/system_files/desktop/shared/usr/share/ublue-os/just/84-bazzite-virt.just @@ -6,16 +6,15 @@ setup-virtualization ACTION="": source /usr/lib/ujust/ujust.sh # Check if we are running on a Steam Deck if /usr/libexec/hardware/valve-hardware; then - echo "Virtualization is not supported on Steam Deck" - exit 0 - else - if [ "$(systemctl is-enabled libvirtd.service)" == "disabled" ]; then - echo "${b}libvirtd${n} service is ${red}disabled${n}!" - 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." - sudo systemctl enable --now libvirtd 2> /dev/null - echo "Press ESC if you want to exit and do not need to do anything" - fi + echo "${red}${b}WARNING${n}: Virtualization is not properly supported on Steam Deck by Valve" + echo "Use at your own risk and performance may not be ideal." + fi + if [ "$(systemctl is-enabled libvirtd.service)" == "disabled" ]; then + echo "${b}libvirtd${n} service is ${red}disabled${n}!" + 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." + sudo systemctl enable --now libvirtd 2> /dev/null + echo "Press ESC if you want to exit and do not need to do anything" fi OPTION={{ ACTION }} if [ "$OPTION" == "help" ]; then @@ -41,7 +40,7 @@ setup-virtualization ACTION="": "Autocreate Looking-Glass shm" \ ) fi - if [[ "${OPTION,,}" =~ ^enable[[:space:]]virt ]]; then + if [[ "${OPTION,,}" =~ ^enable(|[[:space:]]virtualization) ]]; then virt_test=$(rpm-ostree status | grep -A 4 "●" | grep "virt-manager") if [[ -z ${virt_test} ]]; then echo "Installing QEMU and virt-manager..." @@ -51,7 +50,7 @@ setup-virtualization ACTION="": --append-if-missing="kvm.report_ignored_msrs=0" echo 'Please re-run "ujust setup-virtualization" after the reboot to enable libvirtd service' fi - elif [[ "${OPTION,,}" =~ ^disable[[:space:]]virt ]]; then + elif [[ "${OPTION,,}" =~ ^disable(|[[:space:]]virtualization) ]]; then virt_test=$(rpm-ostree status | grep -A 4 "●" | grep "virt-manager") if [[ ${virt_test} ]]; 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' fi 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..." VIRT_TEST=$(rpm-ostree kargs) CPU_VENDOR=$(grep "vendor_id" "/proc/cpuinfo" | uniq | awk -F": " '{ print $2 }') @@ -95,6 +99,11 @@ setup-virtualization ACTION="": fi fi 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 "Make sure you have ${b}disabled autostart of all VMs using VFIO${n} before continuing!" CONFIRM=$(Choose Cancel Continue) @@ -122,6 +131,11 @@ setup-virtualization ACTION="": $VFIO_IDS_KARG fi 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/" sudo bash -c "tee << LOOKING_GLASS_TMP > /etc/tmpfiles.d/10-looking-glass.conf # Type Path Mode UID GID Age Argument @@ -130,5 +144,8 @@ setup-virtualization ACTION="": echo "Adding SELinux context record for /dev/shm/looking-glass" sudo semanage fcontext -a -t svirt_tmpfs_t /dev/shm/looking-glass 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 fi