From dd6b5542484b8e956391d864bac59e2e7a3c451a Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Wed, 27 Apr 2022 23:39:06 -0400 Subject: [PATCH] Replace mentions of fan voltage with fan RPM, since that's what it actually is --- README.md | 10 ++++------ main.py | 2 +- main_view.html | 25 +++++++++++++++---------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index d0d236e..72a8a00 100644 --- a/README.md +++ b/README.md @@ -36,16 +36,14 @@ All that can be done automatically by `cpupower frequency-set --freq {frequency} Enable automatic control: `echo 0 > /sys/class/hwmon/hwmon5/recalculate` enables automatic fan control. -Disable automatic control: `echo 1 > /sys/class/hwmon/hwmon5/recalculate` disables automatic (temperature-based) fan control and starts using the set fan voltage instead. +Disable automatic control: `echo 1 > /sys/class/hwmon/hwmon5/recalculate` disables automatic (temperature-based) fan control and starts using the set fan target instead. -Set the fan voltage: `echo {voltage} > /sys/class/hwmon/hwmon5/fan1_target` where `{voltage}` is a value from 0 to 4000 mV\*. +Set the fan speed: `echo {rpm} > /sys/class/hwmon/hwmon5/fan1_target` where `{rpm}` is the RPM. -Read the actual fan voltage: `cat /sys/class/hwmon/hwmon5/fan1_input` gives the fan voltage in mV\*. - -\*WARNING: I'm not sure if that's actually fan voltage. I've set it to 6000 (1V higher!!! than the fan's rated 5V) and the fan responded, so it appears to not be limited. Blow up your fans at your own risk; read the license. +Read the actual fan RPM: `cat /sys/class/hwmon/hwmon5/fan1_input` gives the fan speed. NOTE: There's a bug in the fan controller; if you enable automatic fan control it will forget any previously-set target despite it appearing to be set correctly (i.e. `cat /sys/class/hwmon/hwmon5/fan1_target` will display the correct value). -When you disable automatic fan control, you will need to set the fan voltage again. +When you disable automatic fan control, you will need to set the fan RPM again. ### Steam Deck kernel patches diff --git a/main.py b/main.py index 952e3e5..f4ad02b 100644 --- a/main.py +++ b/main.py @@ -3,7 +3,7 @@ import time class Plugin: CPU_COUNT = 8 SCALING_FREQUENCIES = [1700000, 2400000, 2800000] - FAN_VOLTAGES = [0, 1000, 2000, 3000, 4000, 5000] + FAN_VOLTAGES = [0, 1000, 2000, 3000, 4000, 5000, 6000] set_fan_voltage = None diff --git a/main_view.html b/main_view.html index b8d099e..d4351c3 100644 --- a/main_view.html +++ b/main_view.html @@ -50,7 +50,7 @@ setToggleState(document.getElementById("smtToggle"), await getSMT()); selectNotch("cpuThreadsNotch", await getCPUs() - 1, 8); selectNotch("frequencyNotch", await getMaxBoost(), 3); - selectNotch("fanNotch", await getFanTick(), 7); + selectNotch("fanNotch", await getFanTick(), 8); } async function setCPUNotch(index) { @@ -105,7 +105,7 @@ async function onSetFanNotch(index) { const ROOT_ID = "fanNotch"; await setFanTick(index); - selectNotch(ROOT_ID, index, 7); + selectNotch(ROOT_ID, index, 8); } function selectNotch(rootId, index, elements) { @@ -252,10 +252,11 @@ - + +
-
Fan Voltage
+
Fan RPM
@@ -268,30 +269,34 @@
-
0V
+
0
-
1V
+
1K
-
2V
+
2K
-
3V
+
3K
-
4V
+
4K
-
5V
+
5K
+
6K
+
+
+
Auto