mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-02-23 06:41:11 +00:00
Merge branch 'main' into testing
This commit is contained in:
commit
19d61d7da0
@ -1,8 +1,11 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
# This is a workaround for cards that somehow has their sysfs power1_cap permission set to 666 on boot
|
# This is a workaround for cards that somehow has their sysfs power1_cap permission set to 666 on boot
|
||||||
# Which in turn makes steam directly set the TDP to 15W
|
# Which in turn makes steam directly set the TDP to 15W
|
||||||
POWER_CAP_PATH=$(find /sys/class/hwmon/*/ -name "power1_cap")
|
SYSFS_PATH=$(find /sys/class/hwmon/*/ -name "power1_cap")
|
||||||
|
|
||||||
|
# Loop through the SYSFS paths that has a "power1_cap"
|
||||||
|
for POWER_CAP_PATH in $SYSFS_PATH
|
||||||
|
do
|
||||||
# If the permissions are set to writable
|
# If the permissions are set to writable
|
||||||
if [ "$(stat -c %a "$POWER_CAP_PATH")" == "666" ]; then
|
if [ "$(stat -c %a "$POWER_CAP_PATH")" == "666" ]; then
|
||||||
chmod 644 "$POWER_CAP_PATH"
|
chmod 644 "$POWER_CAP_PATH"
|
||||||
@ -15,3 +18,4 @@ if [ "$(cat "$POWER_CAP_PATH")" == "15000000" ] && [ "$(cat "${POWER_CAP_PATH}_d
|
|||||||
"$(cat "${POWER_CAP_PATH}_default")" > "$POWER_CAP_PATH"
|
"$(cat "${POWER_CAP_PATH}_default")" > "$POWER_CAP_PATH"
|
||||||
echo "fix: TDP reset to default on $POWER_CAP_PATH" | systemd-cat -t bazzite-tdpfix -p warning
|
echo "fix: TDP reset to default on $POWER_CAP_PATH" | systemd-cat -t bazzite-tdpfix -p warning
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user