From d6a5217798877b7e197952ce13588ab34c21dbf5 Mon Sep 17 00:00:00 2001 From: Matthieu Bouron Date: Mon, 29 Jan 2024 12:13:53 +0100 Subject: [PATCH 01/13] fix(steamos-update): Properly read the return code of the upgrade command Fixes the following error: /tmp/upgrade-check: integer expression expected --- system_files/deck/shared/usr/bin/steamos-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system_files/deck/shared/usr/bin/steamos-update b/system_files/deck/shared/usr/bin/steamos-update index e822618d..5f9d1916 100755 --- a/system_files/deck/shared/usr/bin/steamos-update +++ b/system_files/deck/shared/usr/bin/steamos-update @@ -66,7 +66,7 @@ if command -v ublue-update > /dev/null; then } upgrade | fake_progress # Check if upgrade failed - UPGRADE_CHECK=/tmp/upgrade-check + UPGRADE_CHECK=$(cat /tmp/upgrade-check) rm /tmp/upgrade-check if [ ${UPGRADE_CHECK} -eq 0 ]; then touch /tmp/upgrade-installed From cd56fe49756349b893faf13cee545714269d7eb3 Mon Sep 17 00:00:00 2001 From: Matthieu Bouron Date: Mon, 29 Jan 2024 12:20:29 +0100 Subject: [PATCH 02/13] fix(steamos-update): Use double quotes to prevent potential globbing and word splitting --- system_files/deck/shared/usr/bin/steamos-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system_files/deck/shared/usr/bin/steamos-update b/system_files/deck/shared/usr/bin/steamos-update index 5f9d1916..b98d24c7 100755 --- a/system_files/deck/shared/usr/bin/steamos-update +++ b/system_files/deck/shared/usr/bin/steamos-update @@ -68,7 +68,7 @@ if command -v ublue-update > /dev/null; then # Check if upgrade failed UPGRADE_CHECK=$(cat /tmp/upgrade-check) rm /tmp/upgrade-check - if [ ${UPGRADE_CHECK} -eq 0 ]; then + if [ "${UPGRADE_CHECK}" -eq 0 ]; then touch /tmp/upgrade-installed else exit 0 # Upgrade failed From f43fc21dd0e8fd2032690af36583bfa8390b0af5 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Mon, 29 Jan 2024 08:01:32 -0800 Subject: [PATCH 03/13] chore(tips): Minor adjustment --- .../deck/shared/usr/share/ublue-os/motd/tips/25-bazzite-deck.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system_files/deck/shared/usr/share/ublue-os/motd/tips/25-bazzite-deck.md b/system_files/deck/shared/usr/share/ublue-os/motd/tips/25-bazzite-deck.md index 2004cc4b..49ee236d 100644 --- a/system_files/deck/shared/usr/share/ublue-os/motd/tips/25-bazzite-deck.md +++ b/system_files/deck/shared/usr/share/ublue-os/motd/tips/25-bazzite-deck.md @@ -1,3 +1,3 @@ *Using a handheld other than the Steam Deck?* Be sure to follow our [alternative handheld documentation](https://github.com/ublue-os/bazzite#alternative-handhelds). *Want to install Decky Loader?* There's a `ujust` command for that! `ujust get-decky` -The updater built into Steam's Game mode has been modified to update Bazzite, Flatpaks, and Distrobox containers. \ No newline at end of file +The updater built into game mode has been modified to update Bazzite, Flatpaks, and Distrobox containers. \ No newline at end of file From c01bd600dc846e55e2403c1732bec4c0526f1d3c Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Mon, 29 Jan 2024 08:02:50 -0800 Subject: [PATCH 04/13] chore(tips): Minor adjustment --- .../desktop/shared/usr/share/ublue-os/motd/tips/10-ublue.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system_files/desktop/shared/usr/share/ublue-os/motd/tips/10-ublue.md b/system_files/desktop/shared/usr/share/ublue-os/motd/tips/10-ublue.md index 24ae2f2a..7b535bb5 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/motd/tips/10-ublue.md +++ b/system_files/desktop/shared/usr/share/ublue-os/motd/tips/10-ublue.md @@ -1,4 +1,4 @@ It is **always** better to install packages with Distrobox than to layer them with rpm-ostree. `ujust distrobox` makes it easy! Packages installed in Distrobox can be exported to appear like any other application - [View documentation](https://github.com/89luca89/distrobox/blob/main/docs/usage/distrobox-export.md). *Update break something?* You can roll back and pin the previous release or rebase by build date - [View our guide](https://universal-blue.discourse.group/docs?topic=513). -**This isn't a distro**, this is a custom image built on Fedora Technology - [View our mission](https://universal-blue.org/mission/) \ No newline at end of file +*This isn't a distro*, this is a custom image built on Fedora technology - [View our mission](https://universal-blue.org/mission/) \ No newline at end of file From 05dd6e20d633ac8ccda63d4f9e8d1eff697045ef Mon Sep 17 00:00:00 2001 From: Sean Radigan Date: Mon, 29 Jan 2024 12:15:23 -0500 Subject: [PATCH 05/13] fix(rtl8814au/rtl88xxau): package rtl8814au instead of rtl88xxau driver (#721) Co-authored-by: Sean Radigan --- Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containerfile b/Containerfile index 9a313de4..042af9d2 100644 --- a/Containerfile +++ b/Containerfile @@ -93,7 +93,7 @@ RUN sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo /tmp/akmods-rpms/kmods/*ayn-platform*.rpm \ /tmp/akmods-rpms/kmods/*bmi260*.rpm \ /tmp/akmods-rpms/kmods/*bmi323*.rpm \ - /tmp/akmods-rpms/kmods/*rtl88xxau*.rpm \ + /tmp/akmods-rpms/kmods/*rtl8814au*.rpm \ /tmp/akmods-rpms/kmods/*ryzen-smu*.rpm && \ sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo From adfa1e0a57781dfc422f9f598eb6a7ac2b54824a Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Mon, 29 Jan 2024 09:18:34 -0800 Subject: [PATCH 06/13] feat: Override default fish greeting to allow the motd to work --- .../usr/share/fish/functions/fish_greeting.fish | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 system_files/desktop/shared/usr/share/fish/functions/fish_greeting.fish diff --git a/system_files/desktop/shared/usr/share/fish/functions/fish_greeting.fish b/system_files/desktop/shared/usr/share/fish/functions/fish_greeting.fish new file mode 100644 index 00000000..35b39dd6 --- /dev/null +++ b/system_files/desktop/shared/usr/share/fish/functions/fish_greeting.fish @@ -0,0 +1,13 @@ +function fish_greeting + if test -d "$HOME" + if test ! -e "$HOME"/.config/no-show-user-motd + if test -x "/usr/libexec/ublue-motd" + /usr/libexec/ublue-motd + end + end + end + + if set -q fish_private_mode + echo "fish is running in private mode, history will not be persisted." + end +end From 9b1b4c0931ad1d5ba5fc0451e9f96c699565c6e5 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Mon, 29 Jan 2024 10:12:18 -0800 Subject: [PATCH 07/13] feat: Automatically change iomem for handhelds that need ryzenadj --- .../desktop/shared/usr/bin/bazzite-hardware-setup | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/system_files/desktop/shared/usr/bin/bazzite-hardware-setup b/system_files/desktop/shared/usr/bin/bazzite-hardware-setup index 5eb4b1ce..ad465adb 100755 --- a/system_files/desktop/shared/usr/bin/bazzite-hardware-setup +++ b/system_files/desktop/shared/usr/bin/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=26 +HWS_VER=27 HWS_VER_FILE="/etc/bazzite/hws_version" HWS_VER_RAN=$(cat $HWS_VER_FILE) @@ -139,6 +139,13 @@ if [[ ":83E1:" =~ ":$SYS_ID:" ]]; then fi fi +if [[ ":ROG Ally RC71L_RC71L:83E1:G1618-04:G1617-01:G1619-05:AIR Plus:" =~ ":$SYS_ID:" ]]; then + if [[ ! $KARGS =~ "iomem" ]]; then + echo "Adding needed kargs for ryzenadj" + NEEDED_KARGS+=("--append-if-missing=iomem=relaxed") + fi +fi + if [[ $KARGS =~ "nomodeset" ]]; then echo "Removing nomodeset" NEEDED_KARGS+=("--delete-if-present=nomodeset") From 61a0a098c824981709e2f5b9c2a600ed2e3098ac Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Mon, 29 Jan 2024 11:31:44 -0800 Subject: [PATCH 08/13] chore: Minor systemy76-scheduler config cleanup --- .../deck/shared/usr/etc/system76-scheduler/config.kdl | 2 -- .../desktop/shared/usr/etc/system76-scheduler/config.kdl | 5 ----- 2 files changed, 7 deletions(-) diff --git a/system_files/deck/shared/usr/etc/system76-scheduler/config.kdl b/system_files/deck/shared/usr/etc/system76-scheduler/config.kdl index d99bddb9..66832482 100644 --- a/system_files/deck/shared/usr/etc/system76-scheduler/config.kdl +++ b/system_files/deck/shared/usr/etc/system76-scheduler/config.kdl @@ -86,8 +86,6 @@ process-scheduler enable=true { dbus-broker ds-inhibit fancontrol.py - fig - fig_desktop gamemoderun gamescope handycon diff --git a/system_files/desktop/shared/usr/etc/system76-scheduler/config.kdl b/system_files/desktop/shared/usr/etc/system76-scheduler/config.kdl index b64de2eb..e620145c 100644 --- a/system_files/desktop/shared/usr/etc/system76-scheduler/config.kdl +++ b/system_files/desktop/shared/usr/etc/system76-scheduler/config.kdl @@ -1,6 +1,3 @@ -// WARNING: Modifications to this file will not be preserved on upgrade. -// To configure, make a config.kdl file under /etc/system76-scheduler/. - // Version of the configuration file version "2.0" @@ -87,8 +84,6 @@ process-scheduler enable=true { chrt dbus dbus-broker - fig - fig_desktop gamemoderun gamescope input-remapper-service From 0a602e8d4efe0e4029103907b395b8aca0bfcb01 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Mon, 29 Jan 2024 11:47:38 -0800 Subject: [PATCH 09/13] chore: More tip updates, link to more of nickname's guides --- .../shared/usr/share/ublue-os/motd/tips/10-ublue.md | 7 ++++--- .../usr/share/ublue-os/motd/tips/20-bazzite.md | 12 +++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/system_files/desktop/shared/usr/share/ublue-os/motd/tips/10-ublue.md b/system_files/desktop/shared/usr/share/ublue-os/motd/tips/10-ublue.md index 7b535bb5..e18fc994 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/motd/tips/10-ublue.md +++ b/system_files/desktop/shared/usr/share/ublue-os/motd/tips/10-ublue.md @@ -1,4 +1,5 @@ -It is **always** better to install packages with Distrobox than to layer them with rpm-ostree. `ujust distrobox` makes it easy! +It is **always** better to install packages with Distrobox rather than layer them with rpm-ostree. `ujust distrobox` makes it easy! - [More about supported packages](https://universal-blue.discourse.group/docs?topic=35) Packages installed in Distrobox can be exported to appear like any other application - [View documentation](https://github.com/89luca89/distrobox/blob/main/docs/usage/distrobox-export.md). -*Update break something?* You can roll back and pin the previous release or rebase by build date - [View our guide](https://universal-blue.discourse.group/docs?topic=513). -*This isn't a distro*, this is a custom image built on Fedora technology - [View our mission](https://universal-blue.org/mission/) \ No newline at end of file +*Update break something?* You can roll back and pin the previous release or rebase by build date - [View our guide](https://universal-blue.discourse.group/docs?topic=36). +*This isn't a distro*, this is a custom image built on Fedora technology - [View our mission](https://universal-blue.org/mission/) +*Looking to dual-boot with Windows?* [Check out our dual booting guide](https://universal-blue.discourse.group/docs?topic=129). \ No newline at end of file diff --git a/system_files/desktop/shared/usr/share/ublue-os/motd/tips/20-bazzite.md b/system_files/desktop/shared/usr/share/ublue-os/motd/tips/20-bazzite.md index 04ddd0bd..4fbbc1d3 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/motd/tips/20-bazzite.md +++ b/system_files/desktop/shared/usr/share/ublue-os/motd/tips/20-bazzite.md @@ -1,7 +1,9 @@ -*Installing a Windows game that isn't on Steam?* Lutris is pre-installed and recommended for better handling of wine prefixes. -BTRFS is used by default for external drives, and we recommend that or EXT4 over NTFS - [More info](https://github.com/ValveSoftware/Proton/wiki/Using-a-NTFS-disk-with-Linux-and-Windows). +*Installing a Windows game that isn't on Steam?* Lutris is pre-installed and recommended for better handling of wine prefixes - [View gaming guide](https://universal-blue.discourse.group/docs?topic=31) +BTRFS is used by default for external drives, and we recommend that or EXT4 over NTFS in all circumstances - [More info](https://github.com/ValveSoftware/Proton/wiki/Using-a-NTFS-disk-with-Linux-and-Windows) *No Flatpak or distro packaging available?* The Gear Lever app is included to make managing and integrating AppImages easy! -Want to control your device from your phone? The KDE Connect app functions with all Bazzite images - [More info](https://kdeconnect.kde.org/) -*Trying to use Feral Gamemode?* System76-Scheduler in Bazzite replaces it, offering automatic nice value adjustments for applications based on the currently focused one and built-in rules. +*Want to control your device from your phone?* The KDE Connect app functions with all Bazzite images - [More info](https://kdeconnect.kde.org/) +*Trying to use Feral Gamemode?* System76-Scheduler in Bazzite replaces it, offering automatic nice value adjustments for applications based on the currently focused window and preconfigured rules - [More info](https://github.com/pop-os/system76-scheduler#scheduler-config) Discover Overlay is preinstalled, allowing Discord to overlay your games during voice chats - [More info](https://trigg.github.io/Discover/) -*Looking to setup Waydroid?* - [View our documentation](https://universal-blue.discourse.group/docs?topic=32) \ No newline at end of file +*Looking to setup Waydroid?* - [View our documentation](https://universal-blue.discourse.group/docs?topic=32) +Bazzite uses ZSTD compression in BTRFS by default, and deduplicates files across your entire drive. **More space for your games!** +*Have a large library of ROMs to manage?* ROM Properties Page shell extension is installed by default and makes it much easier, with thumbnails and additional info for all of your files. \ No newline at end of file From 405c5b8c00b4ae206ddf04f8c3a2479cba9cc73e Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Mon, 29 Jan 2024 12:42:50 -0800 Subject: [PATCH 10/13] chore: More minor tip updates --- .../shared/usr/share/ublue-os/motd/tips/25-bazzite-deck.md | 2 +- .../desktop/shared/usr/share/ublue-os/motd/tips/10-ublue.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/system_files/deck/shared/usr/share/ublue-os/motd/tips/25-bazzite-deck.md b/system_files/deck/shared/usr/share/ublue-os/motd/tips/25-bazzite-deck.md index 49ee236d..c2f8487f 100644 --- a/system_files/deck/shared/usr/share/ublue-os/motd/tips/25-bazzite-deck.md +++ b/system_files/deck/shared/usr/share/ublue-os/motd/tips/25-bazzite-deck.md @@ -1,3 +1,3 @@ *Using a handheld other than the Steam Deck?* Be sure to follow our [alternative handheld documentation](https://github.com/ublue-os/bazzite#alternative-handhelds). *Want to install Decky Loader?* There's a `ujust` command for that! `ujust get-decky` -The updater built into game mode has been modified to update Bazzite, Flatpaks, and Distrobox containers. \ No newline at end of file +The updater built into game mode has been modified to update Bazzite, Flatpaks, and Distrobox containers. *Just ignore the changelog.* \ No newline at end of file diff --git a/system_files/desktop/shared/usr/share/ublue-os/motd/tips/10-ublue.md b/system_files/desktop/shared/usr/share/ublue-os/motd/tips/10-ublue.md index e18fc994..0f8a60e7 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/motd/tips/10-ublue.md +++ b/system_files/desktop/shared/usr/share/ublue-os/motd/tips/10-ublue.md @@ -1,5 +1,6 @@ It is **always** better to install packages with Distrobox rather than layer them with rpm-ostree. `ujust distrobox` makes it easy! - [More about supported packages](https://universal-blue.discourse.group/docs?topic=35) Packages installed in Distrobox can be exported to appear like any other application - [View documentation](https://github.com/89luca89/distrobox/blob/main/docs/usage/distrobox-export.md). *Update break something?* You can roll back and pin the previous release or rebase by build date - [View our guide](https://universal-blue.discourse.group/docs?topic=36). -*This isn't a distro*, this is a custom image built on Fedora technology - [View our mission](https://universal-blue.org/mission/) -*Looking to dual-boot with Windows?* [Check out our dual booting guide](https://universal-blue.discourse.group/docs?topic=129). \ No newline at end of file +*This isn't a distro*, this is a custom image built on  Fedora technology - [View our mission](https://universal-blue.org/mission/) +*Looking to dual-boot with Windows?* [Check out our dual booting guide](https://universal-blue.discourse.group/docs?topic=129). +**Support the app store!** [Donate to  Flatpak](https://opencollective.com/flatpak) \ No newline at end of file From e4845838ece09f66da0111702f79f4ae76ea7519 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Mon, 29 Jan 2024 15:19:00 -0600 Subject: [PATCH 11/13] refactor: remove local user-motd.sh mod as it is now provided upstream (#722) --- system_files/desktop/shared/usr/etc/profile.d/user-motd.sh | 7 ------- 1 file changed, 7 deletions(-) delete mode 100755 system_files/desktop/shared/usr/etc/profile.d/user-motd.sh diff --git a/system_files/desktop/shared/usr/etc/profile.d/user-motd.sh b/system_files/desktop/shared/usr/etc/profile.d/user-motd.sh deleted file mode 100755 index ebc34706..00000000 --- a/system_files/desktop/shared/usr/etc/profile.d/user-motd.sh +++ /dev/null @@ -1,7 +0,0 @@ -if test -d "$HOME"; then - if test ! -e "$HOME"/.config/no-show-user-motd; then - if test -x "/usr/libexec/ublue-motd"; then - /usr/libexec/ublue-motd - fi - fi -fi \ No newline at end of file From 8909fd2d87defec85c9211913e2f948d69c2b200 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Mon, 29 Jan 2024 15:17:50 -0800 Subject: [PATCH 12/13] chore: Skip shell updates in Topgrade --- system_files/desktop/shared/usr/share/ublue-os/topgrade.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system_files/desktop/shared/usr/share/ublue-os/topgrade.toml b/system_files/desktop/shared/usr/share/ublue-os/topgrade.toml index 527345a0..e1b3441f 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/topgrade.toml +++ b/system_files/desktop/shared/usr/share/ublue-os/topgrade.toml @@ -3,7 +3,7 @@ paths = ["/etc/ublue-os/topgrade.toml"] [misc] no_self_update = true -disable = ["self_update", "toolbx", "containers"] +disable = ["self_update", "toolbx", "containers", "shell"] ignore_failures = ["distrobox", "flatpak", "brew_cask", "brew_formula", "nix", "pip3", "helm", "home_manager", "firmware"] assume_yes = true no_retry = false From 57e583debfd4f1f47b5c1e55c1e12857e58905df Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Mon, 29 Jan 2024 16:17:30 -0800 Subject: [PATCH 13/13] chore: Clean up hardware & user setup scripts --- .../desktop/shared/usr/bin/bazzite-hardware-setup | 10 +++++----- .../desktop/shared/usr/bin/bazzite-user-setup | 12 +++++++----- .../usr/libexec/hardware/handycon-supported-hardware | 7 +++++++ .../usr/libexec/hardware/hhd-supported-hardware | 7 +++++++ .../usr/libexec/hardware/rotation-fix-hardware | 7 +++++++ .../shared/usr/libexec/hardware/valve-hardware | 7 +++++++ 6 files changed, 40 insertions(+), 10 deletions(-) create mode 100755 system_files/desktop/shared/usr/libexec/hardware/handycon-supported-hardware create mode 100755 system_files/desktop/shared/usr/libexec/hardware/hhd-supported-hardware create mode 100755 system_files/desktop/shared/usr/libexec/hardware/rotation-fix-hardware create mode 100755 system_files/desktop/shared/usr/libexec/hardware/valve-hardware diff --git a/system_files/desktop/shared/usr/bin/bazzite-hardware-setup b/system_files/desktop/shared/usr/bin/bazzite-hardware-setup index ad465adb..289706de 100755 --- a/system_files/desktop/shared/usr/bin/bazzite-hardware-setup +++ b/system_files/desktop/shared/usr/bin/bazzite-hardware-setup @@ -42,7 +42,7 @@ if [[ ! -f $INITRAMFS_REBUILD_TRIGGER ]]; then if [[ -f $KNOWN_IMAGE_NAME_FILE && -f $KNOWN_IMAGE_FLAVOR_FILE && -f $KNOWN_FEDORA_VERSION_FILE && -f $KNOWN_IMAGE_BRANCH_FILE ]]; then # Run script if image has been rebased if [[ $IMAGE_NAME = "$KNOWN_IMAGE_NAME" && $IMAGE_FLAVOR = "$KNOWN_IMAGE_FLAVOR" && $FEDORA_VERSION = "$KNOWN_FEDORA_VERSION" && $IMAGE_BRANCH = "$KNOWN_IMAGE_BRANCH" ]]; then - echo "Hardware setup has already run. Exiting..." + echo "Hardware setup v$HWS_VER has already run. Exiting..." exit 0 fi fi @@ -108,7 +108,7 @@ fi # KERNEL ARGUMENTS echo "Current kargs: $KARGS" -if [[ ":Jupiter:" =~ ":$SYS_ID:" || ":Galileo:" =~ ":$SYS_ID:" ]]; then +if /usr/libexec/hardware/valve-hardware; then echo "Checking for needed karg changes (Jupiter/Galileo)" if [[ ! $KARGS =~ "amd_iommu" ]]; then @@ -139,7 +139,7 @@ if [[ ":83E1:" =~ ":$SYS_ID:" ]]; then fi fi -if [[ ":ROG Ally RC71L_RC71L:83E1:G1618-04:G1617-01:G1619-05:AIR Plus:" =~ ":$SYS_ID:" ]]; then +if /usr/libexec/hardware/hhd-supported-hardware; then if [[ ! $KARGS =~ "iomem" ]]; then echo "Adding needed kargs for ryzenadj" NEEDED_KARGS+=("--append-if-missing=iomem=relaxed") @@ -176,11 +176,11 @@ if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegam systemctl enable --now vpower.service else echo "Generic device detected. Performing setup..." - if [[ ":ROG Ally RC71L_RC71L:83E1:G1618-04:G1617-01:G1619-05:AIR Plus:" =~ ":$SYS_ID:" ]]; then + if /usr/libexec/hardware/hhd-supported-hardware; then echo "HHD supported handheld detected, disabling handycon & ds-inhibit..." systemctl disable --now handycon.service systemctl disable --now ds-inhibit.service - elif [[ ":AYANEO GEEK:AYANEO 2:AYANEO 2S:AOKZOE A1 AR07:G1619-04:Win600:" =~ ":$SYS_ID:" ]]; then + elif /usr/libexec/hardware/handycon-supported-hardware; then echo "HandyGCCS supported handheld detected, enabling handycon & ds-inhibit..." systemctl enable --now handycon.service systemctl enable --now ds-inhbit.service diff --git a/system_files/desktop/shared/usr/bin/bazzite-user-setup b/system_files/desktop/shared/usr/bin/bazzite-user-setup index 209f100c..5e83b744 100755 --- a/system_files/desktop/shared/usr/bin/bazzite-user-setup +++ b/system_files/desktop/shared/usr/bin/bazzite-user-setup @@ -4,7 +4,6 @@ IMAGE_INFO="/usr/share/ublue-os/image-info.json" IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO) BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) FEDORA_VERSION=$(jq -r '."fedora-version"' < $IMAGE_INFO) -SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)" # INIT BAZZITE_CONFIG_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/bazzite" @@ -14,6 +13,7 @@ mkdir -p "$BAZZITE_CONFIG_DIR" USER_SETUP_VER=25 USER_SETUP_VER_FILE="$BAZZITE_CONFIG_DIR/version" USER_SETUP_FEDORA_VER_FILE="$BAZZITE_CONFIG_DIR/fedora_version" +USER_SETUP_IMAGE_VER_FILE=$BAZZITE_CONFIG_DIR/image_name"" if [[ -f "$HOME/.bazzite-configured" ]]; then mv -f "$HOME/.bazzite-configured" "$USER_SETUP_VER_FILE" @@ -25,10 +25,11 @@ fi USER_SETUP_VER_RAN=$(cat $USER_SETUP_VER_FILE) USER_SETUP_FEDORA_VER_RAN=$(cat $USER_SETUP_FEDORA_VER_FILE) +USER_SETUP_IMAGE_VER_RAN=$(cat $USER_SETUP_IMAGE_VER_FILE) # Run script if updated if [[ -f $USER_SETUP_VER_FILE && $USER_SETUP_VER = $USER_SETUP_VER_RAN ]]; then - if [[ -f $USER_SETUP_FEDORA_VER_FILE && $FEDORA_VERSION = $USER_SETUP_FEDORA_VER_RAN ]]; then + if [[ -f $USER_SETUP_FEDORA_VER_FILE && $FEDORA_VERSION = $USER_SETUP_FEDORA_VER_RAN && $BASE_IMAGE_NAME == USER_SETUP_IMAGE_VER_RAN ]]; then echo "User setup v$USER_SETUP_VER has already run. Exiting..." exit 0 fi @@ -115,13 +116,13 @@ fi # Deck Build Setup if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegame" ]]; then # HHD Setup - if [[ "ROG Ally RC71L_RC71L:83E1:G1618-04:G1617-01:G1619-05:AIR Plus:" =~ ":$SYS_ID:" ]]; then + if /usr/libexec/hardware/hhd-supported-hardware; then echo 'Enabling HHD' pkexec /usr/libexec/bazzite-enable-hhd "$USER" fi # SDGyroDSU Setup - if [[ ":Jupiter:Galileo:" =~ ":$SYS_ID:" ]]; then + if /usr/libexec/hardware/valve-hardware; then systemctl --user enable --now sdgyrodsu.service else systemctl --user disable --now sdgyrodsu.service @@ -135,7 +136,7 @@ if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegam rm -f "$AUTOSTART_FOLDER/autostart/bazzite-handle-legion-go-rotation.desktop" fi - if [[ ":ROG Ally RC71L_RC71L:83E1:Loki Max:G1618-04:" =~ ":$SYS_ID:" ]] && [[ $BASE_IMAGE_NAME =~ "kinoite" ]]; then + if /usr/libexec/rotation-fix-hardware && [[ $BASE_IMAGE_NAME =~ "kinoite" ]]; then if [[ ! -f "$AUTOSTART_FOLDER/autostart/bazzite-rotation-fix.desktop" ]]; then echo 'Adding rotation fix' mkdir -p "$AUTOSTART_FOLDER/autostart" @@ -151,3 +152,4 @@ fi echo "Writing state file" echo $USER_SETUP_VER > $USER_SETUP_VER_FILE echo $FEDORA_VERSION > $USER_SETUP_FEDORA_VER_FILE +echo $BASE_IMAGE_NAME > $USER_SETUP_IMAGE_VER_FILE diff --git a/system_files/desktop/shared/usr/libexec/hardware/handycon-supported-hardware b/system_files/desktop/shared/usr/libexec/hardware/handycon-supported-hardware new file mode 100755 index 00000000..4bcae442 --- /dev/null +++ b/system_files/desktop/shared/usr/libexec/hardware/handycon-supported-hardware @@ -0,0 +1,7 @@ +#!/usr/bin/bash +SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)" +if [[ ":AYANEO GEEK:AYANEO 2:AYANEO 2S:AOKZOE A1 AR07:G1619-04:Win600:" =~ ":$SYS_ID:" ]]; then + exit 0 +else + exit 1 +fi diff --git a/system_files/desktop/shared/usr/libexec/hardware/hhd-supported-hardware b/system_files/desktop/shared/usr/libexec/hardware/hhd-supported-hardware new file mode 100755 index 00000000..e4e31731 --- /dev/null +++ b/system_files/desktop/shared/usr/libexec/hardware/hhd-supported-hardware @@ -0,0 +1,7 @@ +#!/usr/bin/bash +SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)" +if [[ ":ROG Ally RC71L_RC71L:83E1:G1618-04:G1617-01:G1619-05:AIR Plus:" =~ ":$SYS_ID:" ]]; then + exit 0 +else + exit 1 +fi diff --git a/system_files/desktop/shared/usr/libexec/hardware/rotation-fix-hardware b/system_files/desktop/shared/usr/libexec/hardware/rotation-fix-hardware new file mode 100755 index 00000000..15aad217 --- /dev/null +++ b/system_files/desktop/shared/usr/libexec/hardware/rotation-fix-hardware @@ -0,0 +1,7 @@ +#!/usr/bin/bash +SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)" +if [[ ":ROG Ally RC71L_RC71L:83E1:Loki Max:G1618-04:" =~ ":$SYS_ID:" ]]; then + exit 0 +else + exit 1 +fi diff --git a/system_files/desktop/shared/usr/libexec/hardware/valve-hardware b/system_files/desktop/shared/usr/libexec/hardware/valve-hardware new file mode 100755 index 00000000..6e8878ec --- /dev/null +++ b/system_files/desktop/shared/usr/libexec/hardware/valve-hardware @@ -0,0 +1,7 @@ +#!/usr/bin/bash +SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)" +if [[ ":Jupiter:Galileo:" =~ ":$SYS_ID:" ]]; then + exit 0 +else + exit 1 +fi