Skip to content

Commit

Permalink
fix(deck): Improve just scripts for bios handling
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed Nov 24, 2023
1 parent 7c8ad27 commit ab5a503
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions system_files/deck/shared/usr/share/ublue-os/just/60-custom.just
Expand Up @@ -373,21 +373,31 @@ unhide-grub:
# Install Deck HD BIOS
install-deckhd-bios:
#!/usr/bin/env bash
RESOLUTION=$(sudo lshw -json -c display | jq -r .[]."configuration"."resolution")
if [[ "${RESOLUTION}" = "1200,1920" ]]; then
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then
RESOLUTION=$(sudo lshw -json -c display | jq -r .[]."configuration"."resolution")
if [[ "${RESOLUTION}" = "1200,1920" ]]; then
sudo systemctl mask --now jupiter-biosupdate.service
wget -q https://deckhd.com/downloads/install.sh -O /tmp/deckhd-install.sh
chmod +x /tmp/deckhd-install.sh
sudo ./tmp/deckhd-install.sh
else
else
echo "Unable to detect DeckHD. Aborting..."
fi
else
echo "This is only applicable to LCD Steam Decks with the DeckHD screen. Aborting..."
fi

# Enable BIOS & Firmware update services for the Steam Deck
enable-deck-bios-firmware-updates:
#!/usr/bin/env bash
sudo systemctl enable jupiter-biosupdate.service
sudo systemctl enable jupiter-controller-update.service
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
if [[ ":Jupiter:" =~ ":$SYS_ID:" || ":Galileo:" =~ ":$SYS_ID:" ]]; then
sudo systemctl enable jupiter-biosupdate.service
sudo systemctl enable jupiter-controller-update.service
else
echo "This is only applicable to Valve's Steam Deck. Aborting..."
fi

# Disable Steam Deck BIOS updates
disable-bios-updates:
Expand Down

0 comments on commit ab5a503

Please sign in to comment.