mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-03-29 22:20:21 +00:00
feat: generalize certain SYS_IDs (#1257)
* feat: add sysid script to trunctrate some SYS_IDs * chore: update scripts to get SYS_ID from sysid script `valve-hardware` and the `priv-write.patch` excluded as they only check for the deck if anything.
This commit is contained in:
parent
998626c2a6
commit
6831f7cb2e
@ -5,7 +5,7 @@
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
SYS_ID="$(/usr/libexec/hwsupport/sysid)"
|
||||
|
||||
if [[ "${XDG_SESSION_TYPE}" = "wayland" ]]; then
|
||||
if /usr/libexec/hwsupport/needs-left-rotation || /usr/libexec/hwsupport/needs-right-rotation; then
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
SYS_ID="$(/usr/libexec/hwsupport/sysid)"
|
||||
|
||||
# Legion Go
|
||||
# Loki Max
|
||||
@ -9,4 +9,4 @@ if [[ ":83E1:Loki Max:AIR Plus:" =~ ":$SYS_ID:" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exit 1
|
||||
exit 1
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
set -e
|
||||
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
SYS_ID="$(/usr/libexec/hwsupport/sysid)"
|
||||
|
||||
if [[ ":Jupiter:" =~ ":$SYS_ID:" || ":Galileo:" =~ ":$SYS_ID:" ]]; then
|
||||
# Rotate the builtin screen every time so it's the right way around.
|
||||
|
@ -61,7 +61,7 @@ switch-to-ext4:
|
||||
# Install Deck HD BIOS
|
||||
install-deckhd-bios:
|
||||
#!/usr/bin/bash
|
||||
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
SYS_ID="$(/usr/libexec/hwsupport/sysid)"
|
||||
if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then
|
||||
RESOLUTION=$(sudo lshw -json -c display | jq -r .[]."configuration"."resolution")
|
||||
if [[ "${RESOLUTION}" = "1200,1920" ]]; then
|
||||
@ -92,7 +92,7 @@ enable-swipe-gestures:
|
||||
# Enable BIOS & Firmware update services for the Steam Deck
|
||||
enable-deck-bios-firmware-updates:
|
||||
#!/usr/bin/bash
|
||||
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
SYS_ID="$(/usr/libexec/hwsupport/sysid)"
|
||||
if [[ ":Jupiter:" =~ ":$SYS_ID:" || ":Galileo:" =~ ":$SYS_ID:" ]]; then
|
||||
RESOLUTION=$(sudo lshw -json -c display | jq -r .[]."configuration"."resolution")
|
||||
if [[ "${RESOLUTION}" = "1200,1920" ]]; then
|
||||
|
@ -22,7 +22,7 @@ KNOWN_FEDORA_VERSION_FILE="/etc/bazzite/fedora_version"
|
||||
KNOWN_FEDORA_VERSION=$(cat $KNOWN_FEDORA_VERSION_FILE)
|
||||
|
||||
# GLOBAL
|
||||
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
SYS_ID="$(/usr/libexec/hwsupport/sysid)"
|
||||
VEN_ID="$(cat /sys/devices/virtual/dmi/id/chassis_vendor)"
|
||||
CPU_VENDOR=$(grep "vendor_id" "/proc/cpuinfo" | uniq | awk -F": " '{ print $2 }')
|
||||
CPU_MODEL=$(grep "model name" "/proc/cpuinfo" | uniq | awk -F": " '{ print $2 }')
|
||||
@ -85,7 +85,7 @@ if [[ ":83E1:" =~ ":$SYS_ID:" ]]; then
|
||||
echo "Adding SG Display for Lenovo Legion Go"
|
||||
NEEDED_KARGS+=("--append-if-missing=amdgpu.sg_display=0")
|
||||
fi
|
||||
elif [[ ":ROG Ally RC71L_RC71L:ROG Ally RC71L_Action:ROG Ally RC71L:" =~ ":$SYS_ID:" ]]; then
|
||||
elif [[ ":ROG Ally RC71L:" =~ ":$SYS_ID:" ]]; then
|
||||
if [[ ! $KARGS =~ "amdgpu.gttsize" ]]; then
|
||||
echo "Adding GTTSize for ASUS Ally"
|
||||
NEEDED_KARGS+=("--append-if-missing=amdgpu.gttsize=8128")
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/bash
|
||||
# Returns true for hardware that is supported by HHD
|
||||
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
if [[ ":ROG Ally RC71L_RC71L:ROG Ally RC71L_Action:ROG Ally RC71L: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
|
||||
SYS_ID="$(/usr/libexec/hwsupport/sysid)"
|
||||
if [[ ":ROG Ally RC71L: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
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/bash
|
||||
# Returns true for hardware that is supported by SimpleDeckyTDP
|
||||
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
if [[ ":ROG Ally RC71L_RC71L:ROG Ally RC71L:83E1:G1618-04:G1619-04:G1617-01:G1619-05:AIR Plus:AIR 1S:AIR 1S Limited:AIR:SLIDE:V3:AOKZOE A1 AR07:AOKZOE A1 Pro:ONEXPLAYER 2 ARP23:ONEXPLAYER 2 PRO ARP23H:ONEXPLAYER 2 PRO ARP23P:ONEXPLAYER 2 PRO ARP23P EVA-01:" =~ ":$SYS_ID:" ]]; then
|
||||
SYS_ID="$(/usr/libexec/hwsupport/sysid)"
|
||||
if [[ ":ROG Ally RC71L:83E1:G1618-04:G1619-04:G1617-01:G1619-05:AIR Plus:AIR 1S:AIR 1S Limited:AIR:SLIDE:V3:AOKZOE A1 AR07:AOKZOE A1 Pro:ONEXPLAYER 2 ARP23:ONEXPLAYER 2 PRO ARP23H:ONEXPLAYER 2 PRO ARP23P:ONEXPLAYER 2 PRO ARP23P EVA-01:" =~ ":$SYS_ID:" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
12
system_files/desktop/shared/usr/libexec/hwsupport/sysid
Executable file
12
system_files/desktop/shared/usr/libexec/hwsupport/sysid
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
# Get the SYS_ID
|
||||
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
|
||||
# Check SYS_IDs that have multiple revisions with insignificant hardware changes
|
||||
if [[ "$SYS_ID" =~ ROG[[:space:]]Ally[[:space:]]RC71L.+ ]]; then
|
||||
# Trunctate ROG Ally SYS_ID
|
||||
echo "ROG Ally RC71L"
|
||||
else
|
||||
# Probably a sensible SYS_ID so we echo it
|
||||
echo "$SYS_ID"
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user