Skip to content

Commit 28fec8e

Browse files
committed
fix: Check for Ally & Framegame everywhere Deck is currently checked for
feat: Enable TDP control on non-deck hardware covered by steam-patch.
1 parent 136e5ba commit 28fec8e

File tree

2 files changed

+14
-24
lines changed

2 files changed

+14
-24
lines changed

system_files/desktop/shared/usr/bin/bazzite-hardware-setup

+10-13
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ KNOWN_IMAGE_FLAVOR=$(cat $KNOWN_IMAGE_FLAVOR_FILE)
1919
# GLOBAL
2020
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
2121
GPU_ID=$(lspci -k | grep -A 3 -E "(VGA|3D)")
22-
PRODUCT_NAME="$(cat /sys/devices/virtual/dmi/id/product_name)"
2322
KARGS=$(rpm-ostree kargs)
2423
NEEDED_KARGS=""
2524
echo "Current kargs: $KARGS"
@@ -139,23 +138,21 @@ if [[ -f $HWS_VER_FILE && $HWS_VER = $HWS_VER_RAN ]]; then
139138
fi
140139
fi
141140

142-
if [[ $IMAGE_NAME =~ "deck" ]]; then
141+
if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegame" ]]; then
143142
if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then
144143
# Future updates to Deck on Jupiter here
144+
echo "Jupiter hardware detected, skipping further setup..."
145145
else
146146
echo "Generic device detected. Performing setup..."
147-
if [[ \
148-
":AYA NEO:AYANEO:AIR Plus:" =~ ":$PRODUCT_NAME:" || \
149-
"ONEXPLAYER" =~ "$PRODUCT_NAME" || \
150-
"AOKZOE" =~ "$PRODUCT_NAME" || \
151-
":G1619-01:G1621-02:MicroPC:" =~ ":$SYS_ID:" \
152-
]]; then
153-
echo "HandyGCCS supported handheld detected, enabling handycon & steam-patch."
154-
systemctl enable --now handycon.service
155-
systemctl enable --now --global steam-patch.service
156-
elif [[ ":ROG Ally RC71L_RC71L:" =~ ":$SYS_ID:" ]]
157-
echo "ROG Ally detected. Enabling steam-patch."
147+
if [[ ":ROG Ally RC71L_RC71L:AYA NEO:AYANEO:AIR Plus:ONEXPLAYER:AOKZOE:G1619-01:G1621-02:MicroPC:G1619-01:G1621-02:MicroPC:AYA NEO:AYANEO:AIR Plus:AOKZOE:ONEXPLAYER:" =~ ":$SYS_ID:" ]]; then
148+
echo "HandyGCCS supported handheld detected, enabling handycon & steam-patch..."
149+
if [[ ":ROG Ally RC71L_RC71L:" =~ ":$SYS_ID:" ]]
150+
echo "ROG Ally detected, skipping handycon".
151+
else
152+
systemctl enable --now handycon.service
153+
fi
158154
systemctl enable --now --global steam-patch.service
155+
sed -i 's/ENABLE_HARDWARE_CONTROL_ON_NON_DECK_HARDWARE=0/ENABLE_HARDWARE_CONTROL_ON_NON_DECK_HARDWARE=1/g' /etc/default/steam-hardware-control
159156
fi
160157
systemctl disable --now jupiter-fan-control.service
161158
systemctl disable --now vpower.service

system_files/desktop/shared/usr/bin/bazzite-user-setup

+4-11
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@ IMAGE_INFO="/usr/share/ublue-os/image-info.json"
1515
IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO)
1616
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
1717
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
18-
PRODUCT_NAME="$(cat /sys/devices/virtual/dmi/id/product_name)"
1918

2019
if [[ $BASE_IMAGE_NAME =~ "kinoite" ]]; then
2120
echo 'Running setup for Kinoite'
2221

2322
echo 'Enabling System76-Scheduler KWin script'
2423
kwriteconfig5 --file kwinrc --group Plugins --key kwin-system76-scheduler-integrationEnabled true
2524

26-
if [[ $IMAGE_NAME =~ "deck" ]]; then
25+
if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegame" ]]; then
2726
echo 'Running setup for Kinoite on Steam Deck'
2827

2928
echo 'Creating Desktop shortcuts'
@@ -69,7 +68,7 @@ else
6968
ln -s /usr/share/ublue-os/bazzite/themes/vgui2.json $HOME/.config/presets/user/vgui2.json
7069
fi
7170

72-
if [[ $IMAGE_NAME =~ "deck" ]]; then
71+
if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegame" ]]; then
7372
echo 'Running setup for Silverblue on Steam Deck'
7473

7574
echo 'Enabling Bazzite tofu menu fork'
@@ -112,14 +111,8 @@ else
112111
fi
113112

114113
# Steam Patch setup
115-
if [[ $IMAGE_NAME =~ "deck" ]]; then
116-
if [[ \
117-
":ROG Ally RC71L_RC71L:" =~ ":$SYS_ID:" || \
118-
":AYA NEO:AYANEO:AIR Plus:" =~ ":$PRODUCT_NAME:" || \
119-
"ONEXPLAYER" =~ "$PRODUCT_NAME" || \
120-
"AOKZOE" =~ "$PRODUCT_NAME" || \
121-
":G1619-01:G1621-02:MicroPC:" =~ ":$SYS_ID:" \
122-
]]; then
114+
if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" ]]; then
115+
if [[ ":ROG Ally RC71L_RC71L:AYA NEO:AYANEO:AIR Plus:ONEXPLAYER:AOKZOE:G1619-01:G1621-02:MicroPC:G1619-01:G1621-02:MicroPC:AYA NEO:AYANEO:AIR Plus:AOKZOE:ONEXPLAYER:" =~ ":$SYS_ID:" ]]; then
123116
mkdir -p "$HOME/.steam/steam/"
124117
touch "$HOME/.steam/steam/.cef-enable-remote-debugging"
125118
fi

0 commit comments

Comments
 (0)