Skip to content

Commit ab5a503

Browse files
committed
fix(deck): Improve just scripts for bios handling
1 parent 7c8ad27 commit ab5a503

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

system_files/deck/shared/usr/share/ublue-os/just/60-custom.just

+15-5
Original file line numberDiff line numberDiff line change
@@ -373,21 +373,31 @@ unhide-grub:
373373
# Install Deck HD BIOS
374374
install-deckhd-bios:
375375
#!/usr/bin/env bash
376-
RESOLUTION=$(sudo lshw -json -c display | jq -r .[]."configuration"."resolution")
377-
if [[ "${RESOLUTION}" = "1200,1920" ]]; then
376+
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
377+
if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then
378+
RESOLUTION=$(sudo lshw -json -c display | jq -r .[]."configuration"."resolution")
379+
if [[ "${RESOLUTION}" = "1200,1920" ]]; then
378380
sudo systemctl mask --now jupiter-biosupdate.service
379381
wget -q https://deckhd.com/downloads/install.sh -O /tmp/deckhd-install.sh
380382
chmod +x /tmp/deckhd-install.sh
381383
sudo ./tmp/deckhd-install.sh
382-
else
384+
else
383385
echo "Unable to detect DeckHD. Aborting..."
386+
fi
387+
else
388+
echo "This is only applicable to LCD Steam Decks with the DeckHD screen. Aborting..."
384389
fi
385390
386391
# Enable BIOS & Firmware update services for the Steam Deck
387392
enable-deck-bios-firmware-updates:
388393
#!/usr/bin/env bash
389-
sudo systemctl enable jupiter-biosupdate.service
390-
sudo systemctl enable jupiter-controller-update.service
394+
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
395+
if [[ ":Jupiter:" =~ ":$SYS_ID:" || ":Galileo:" =~ ":$SYS_ID:" ]]; then
396+
sudo systemctl enable jupiter-biosupdate.service
397+
sudo systemctl enable jupiter-controller-update.service
398+
else
399+
echo "This is only applicable to Valve's Steam Deck. Aborting..."
400+
fi
391401
392402
# Disable Steam Deck BIOS updates
393403
disable-bios-updates:

0 commit comments

Comments
 (0)