feat: Enable HHD on all deck images, previous hardware script now only determines if PPD is used.

This commit is contained in:
Kyle Gospodnetich 2024-07-21 18:31:59 -07:00
parent e6b79a1f48
commit 9477fc8c7e
3 changed files with 17 additions and 11 deletions

View File

@ -9,6 +9,13 @@ fi
systemctl enable --now hhd@$(systemd-escape $1).service
# Ensure HHD is never running for the root user
systemctl disable --now hhd@root.service
# Disable PPD
systemctl disable --now power-profiles-daemon.service
systemctl mask power-profiles-daemon.service
if /usr/libexec/hwsupport/hhd-tdp-supported-hardware; then
# Disable PPD
systemctl disable --now power-profiles-daemon.service
systemctl mask power-profiles-daemon.service
else
# Restore PPD if previously disabled
systemctl unmask power-profiles-daemon.service
systemctl enable --now power-profiles-daemon.service
fi

View File

@ -169,13 +169,12 @@ fi
# Deck Build Setup
if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" ]]; then
# HHD Setup
if /usr/libexec/hwsupport/hhd-supported-hardware; then
echo 'Enabling HHD'
pkexec /usr/libexec/bazzite-enable-hhd "$USER"
elif /usr/libexec/hwsupport/valve-hardware; then
echo 'Hiding HHD-UI on Deck hardware'
cp /usr/share/applications/hhd-ui.desktop "${XDG_DATA_HOME:-$HOME/.local/share}/applications/hhd-ui.desktop"
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nNoDisplay=true@g' "${XDG_DATA_HOME:-$HOME/.local/share}/applications/hhd-ui.desktop"
echo 'Enabling HHD'
pkexec /usr/libexec/bazzite-enable-hhd "$USER"
if [ -f "${XDG_DATA_HOME:-$HOME/.local/share}/applications/hhd-ui.desktop" ]; then
# Remove an old HHD desktop override done on Steam Decks when HHD did not support them
rm "${XDG_DATA_HOME:-$HOME/.local/share}/applications/hhd-ui.desktop"
fi
# SDGyroDSU Setup

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# Returns true for hardware that is supported by HHD
SYS_ID="$(/usr/libexec/hwsupport/sysid)"
if [[ ":ROG Ally RC71L:ROG Ally X RC72LA:83E1:G1618-04:G1617-01:G1619-05:AIR Plus:AIR 1S:AIR 1S Limited:AIR:AYANEO GEEK:AYANEO 2:AYANEO 2S:AOKZOE A1 AR07:AOKZOE A1 Pro:G1619-04:Win600:Loki Max:Loki Zero:Loki MiniPro:V3:" =~ ":$SYS_ID:" ]]; then
if [[ ":ROG Ally RC71L:ROG Ally X RC72LA:83E1:G1618-04:G1617-01:G1619-05:AIR Plus:AIR 1S:AIR 1S Limited:AIR:AYANEO GEEK:AYANEO 2:AYANEO 2S:AOKZOE A1 AR07:AOKZOE A1 Pro:G1619-04:Win600:Loki Max:Loki Zero:Loki MiniPro:" =~ ":$SYS_ID:" ]]; then
exit 0
fi