fix: Modify HandyGCCS setup to be explicit on device, automatically install Steam Patch (https://github.com/Maclay74/steam-patch/) on Handhelds that require it.

This commit is contained in:
Kyle Gospodnetich 2023-10-02 23:18:18 -07:00
parent 242899bf2d
commit e5821e9b5d
2 changed files with 28 additions and 6 deletions

View File

@ -6,7 +6,7 @@ IMAGE_FLAVOR=$(jq -r '."image-flavor"' < $IMAGE_INFO)
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
# SCRIPT VERSION
HWS_VER=4
HWS_VER=5
HWS_VER_FILE="/etc/bazzite/hws_version"
HWS_VER_RAN=$(cat $HWS_VER_FILE)
@ -19,6 +19,7 @@ KNOWN_IMAGE_FLAVOR=$(cat $KNOWN_IMAGE_FLAVOR_FILE)
# GLOBAL
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
GPU_ID=$(lspci -k | grep -A 3 -E "(VGA|3D)")
PRODUCT_NAME="$(cat /sys/devices/virtual/dmi/id/product_name)"
KARGS=$(rpm-ostree kargs)
NEEDED_KARGS=""
echo "Current kargs: $KARGS"
@ -139,12 +140,19 @@ if [[ -f $HWS_VER_FILE && $HWS_VER = $HWS_VER_RAN ]]; then
fi
if [[ $IMAGE_NAME =~ "deck" ]]; then
if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then
# Future updates to deck on jupiter here
if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then
# Future updates to Deck on Jupiter here
else
echo "Generic device detected. Performing setup..."
systemctl enable --now handycon.service
if [[ \
":AYA NEO:AYANEO:AIR Plus:" =~ ":$PRODUCT_NAME:" || \
"ONEXPLAYER" =~ "$PRODUCT_NAME" || \
"AOKZOE" =~ "$PRODUCT_NAME" || \
":G1619-01:G1621-02:MicroPC:" =~ ":$SYS_ID:" \
]]; then
echo "HandyGCCS supported handheld detected, enabling."
systemctl enable --now handycon.service
fi
systemctl disable --now jupiter-fan-control.service
systemctl disable --now vpower.service
systemctl disable --now jupiter-biosupdate.service

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# SCRIPT VERSION
USER_SETUP_VER=2
USER_SETUP_VER=3
USER_SETUP_VER_FILE="$HOME/.bazzite-configured"
USER_SETUP_VER_RAN=$(cat $USER_SETUP_VER_FILE)
@ -14,6 +14,8 @@ fi
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO)
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
PRODUCT_NAME="$(cat /sys/devices/virtual/dmi/id/product_name)"
if [[ $BASE_IMAGE_NAME =~ "kinoite" ]]; then
echo 'Running setup for Kinoite'
@ -109,6 +111,18 @@ else
fi
fi
# Steam Patch setup
if [[ \
":ROG Ally RC71L_RC71L:" =~ ":$SYS_ID:" || \
":AYA NEO:AYANEO:AIR Plus:" =~ ":$PRODUCT_NAME:" || \
"ONEXPLAYER" =~ "$PRODUCT_NAME" || \
"AOKZOE" =~ "$PRODUCT_NAME" || \
":G1619-01:G1621-02:MicroPC:" =~ ":$SYS_ID:" \
]]; then
echo "Steam Patch supported handheld detected, installing (https://github.com/Maclay74/steam-patch/)"
curl -L https://github.com/Maclay74/steam-patch/releases/latest/download/install.sh | sh
fi
# Enable NTP
timedatectl set-ntp true