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

This reverts commit fd1a4285d6474f8a6332314915f4cde23a8ef87a.
This commit is contained in:
Kyle Gospodnetich 2024-07-23 13:34:43 -07:00
parent c4f84a6448
commit 5c07fe7569
3 changed files with 11 additions and 17 deletions

View File

@ -9,13 +9,6 @@ fi
systemctl enable --now hhd@$(systemd-escape $1).service
# Ensure HHD is never running for the root user
systemctl disable --now hhd@root.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
# Disable PPD
systemctl disable --now power-profiles-daemon.service
systemctl mask power-profiles-daemon.service

View File

@ -169,12 +169,13 @@ fi
# Deck Build Setup
if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" ]]; then
# HHD Setup
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"
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"
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:" =~ ":$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:V3:" =~ ":$SYS_ID:" ]]; then
exit 0
fi