update fanboost

This commit is contained in:
gigirassy
2026-08-03 06:17:49 +02:00
parent 6a742863e4
commit 15f83ca84a
+13 -3
View File
@@ -3,13 +3,23 @@
exec 2>&1
while true; do
temp=$(cat /sys/class/thermal/thermal_zone*/temp | sort -nr | head -1)
temp=0
for f in /sys/class/thermal/thermal_zone*/temp; do
[ -r "$f" ] || continue
read -r t < "$f"
[ "$t" -gt "$temp" ] && temp=$t
done
if [ "$temp" -ge 55000 ]; then
echo 1 > /sys/class/thermal/cooling_device*/cur_state
state=1
else
echo 0 > /sys/class/thermal/cooling_device*/cur_state
state=0
fi
for f in /sys/class/thermal/cooling_device*/cur_state; do
[ -w "$f" ] && printf '%s\n' "$state" > "$f"
done
sleep 5
done