forked from NG-SD-Plugins/PowerTools
Replace mentions of fan voltage with fan RPM, since that's what it actually is
This commit is contained in:
parent
c7042fa487
commit
dd6b554248
3 changed files with 20 additions and 17 deletions
10
README.md
10
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.
|
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\*.
|
Read the actual fan RPM: `cat /sys/class/hwmon/hwmon5/fan1_input` gives the fan speed.
|
||||||
|
|
||||||
\*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.
|
|
||||||
|
|
||||||
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).
|
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
|
### Steam Deck kernel patches
|
||||||
|
|
||||||
|
|
2
main.py
2
main.py
|
@ -3,7 +3,7 @@ import time
|
||||||
class Plugin:
|
class Plugin:
|
||||||
CPU_COUNT = 8
|
CPU_COUNT = 8
|
||||||
SCALING_FREQUENCIES = [1700000, 2400000, 2800000]
|
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
|
set_fan_voltage = None
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
setToggleState(document.getElementById("smtToggle"), await getSMT());
|
setToggleState(document.getElementById("smtToggle"), await getSMT());
|
||||||
selectNotch("cpuThreadsNotch", await getCPUs() - 1, 8);
|
selectNotch("cpuThreadsNotch", await getCPUs() - 1, 8);
|
||||||
selectNotch("frequencyNotch", await getMaxBoost(), 3);
|
selectNotch("frequencyNotch", await getMaxBoost(), 3);
|
||||||
selectNotch("fanNotch", await getFanTick(), 7);
|
selectNotch("fanNotch", await getFanTick(), 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function setCPUNotch(index) {
|
async function setCPUNotch(index) {
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
async function onSetFanNotch(index) {
|
async function onSetFanNotch(index) {
|
||||||
const ROOT_ID = "fanNotch";
|
const ROOT_ID = "fanNotch";
|
||||||
await setFanTick(index);
|
await setFanTick(index);
|
||||||
selectNotch(ROOT_ID, index, 7);
|
selectNotch(ROOT_ID, index, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectNotch(rootId, index, elements) {
|
function selectNotch(rootId, index, elements) {
|
||||||
|
@ -252,10 +252,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Fan voltage selector -->
|
<!-- Fan RPM selector -->
|
||||||
|
<!-- TODO: Make this is non-notched slider when PluginLoader PR#41 is merged -->
|
||||||
<div class="gamepaddialog_Field_eKmEX gamepaddialog_WithFirstRow_2bDqk gamepaddialog_WithChildrenBelow_37xzV gamepaddialog_InlineWrapShiftsChildrenBelow_3LCXh gamepaddialog_WithBottomSeparator_3YKpU gamepaddialog_ChildrenWidthFixed_ljcbL gamepaddialog_ExtraPaddingOnChildrenBelow_3nLNL gamepaddialog_StandardPadding_xIITX gamepaddialog_HighlightOnFocus_2HFrm Panel Focusable">
|
<div class="gamepaddialog_Field_eKmEX gamepaddialog_WithFirstRow_2bDqk gamepaddialog_WithChildrenBelow_37xzV gamepaddialog_InlineWrapShiftsChildrenBelow_3LCXh gamepaddialog_WithBottomSeparator_3YKpU gamepaddialog_ChildrenWidthFixed_ljcbL gamepaddialog_ExtraPaddingOnChildrenBelow_3nLNL gamepaddialog_StandardPadding_xIITX gamepaddialog_HighlightOnFocus_2HFrm Panel Focusable">
|
||||||
<div class="gamepaddialog_FieldLabelRow_2VcTl">
|
<div class="gamepaddialog_FieldLabelRow_2VcTl">
|
||||||
<div class="gamepaddialog_FieldLabel_3jMlJ">Fan Voltage</div>
|
<div class="gamepaddialog_FieldLabel_3jMlJ">Fan RPM</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gamepaddialog_FieldChildren_2rhav">
|
<div class="gamepaddialog_FieldChildren_2rhav">
|
||||||
<div id="fanNotch" class="gamepadslider_SliderControlAndNotches_23hjX Focusable" tabindex="0" style="--normalized-slider-value:0.33;">
|
<div id="fanNotch" class="gamepadslider_SliderControlAndNotches_23hjX Focusable" tabindex="0" style="--normalized-slider-value:0.33;">
|
||||||
|
@ -268,30 +269,34 @@
|
||||||
<div class="gamepadslider_SliderNotchContainer_2yM7S Panel Focusable">
|
<div class="gamepadslider_SliderNotchContainer_2yM7S Panel Focusable">
|
||||||
<div class="gamepadslider_SliderNotch_LYPXt">
|
<div class="gamepadslider_SliderNotch_LYPXt">
|
||||||
<div id="fanNotch0" class="gamepadslider_SliderNotchTick_u8QEa gamepadslider_TickActive_j418S" onclick='onSetFanNotch(0)'></div>
|
<div id="fanNotch0" class="gamepadslider_SliderNotchTick_u8QEa gamepadslider_TickActive_j418S" onclick='onSetFanNotch(0)'></div>
|
||||||
<div class="gamepadslider_SliderNotchLabel_dbACW">0V</div>
|
<div class="gamepadslider_SliderNotchLabel_dbACW">0</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gamepadslider_SliderNotch_LYPXt">
|
<div class="gamepadslider_SliderNotch_LYPXt">
|
||||||
<div id="fanNotch1" class="gamepadslider_SliderNotchTick_u8QEa gamepadslider_TickActive_j418S" onclick='onSetFanNotch(1)'></div>
|
<div id="fanNotch1" class="gamepadslider_SliderNotchTick_u8QEa gamepadslider_TickActive_j418S" onclick='onSetFanNotch(1)'></div>
|
||||||
<div class="gamepadslider_SliderNotchLabel_dbACW">1V</div>
|
<div class="gamepadslider_SliderNotchLabel_dbACW">1K</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gamepadslider_SliderNotch_LYPXt">
|
<div class="gamepadslider_SliderNotch_LYPXt">
|
||||||
<div id="fanNotch2" class="gamepadslider_SliderNotchTick_u8QEa gamepadslider_TickActive_j418S" onclick='onSetFanNotch(2)'></div>
|
<div id="fanNotch2" class="gamepadslider_SliderNotchTick_u8QEa gamepadslider_TickActive_j418S" onclick='onSetFanNotch(2)'></div>
|
||||||
<div class="gamepadslider_SliderNotchLabel_dbACW">2V</div>
|
<div class="gamepadslider_SliderNotchLabel_dbACW">2K</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gamepadslider_SliderNotch_LYPXt">
|
<div class="gamepadslider_SliderNotch_LYPXt">
|
||||||
<div id="fanNotch3" class="gamepadslider_SliderNotchTick_u8QEa gamepadslider_TickActive_j418S" onclick='onSetFanNotch(3)'></div>
|
<div id="fanNotch3" class="gamepadslider_SliderNotchTick_u8QEa gamepadslider_TickActive_j418S" onclick='onSetFanNotch(3)'></div>
|
||||||
<div class="gamepadslider_SliderNotchLabel_dbACW">3V</div>
|
<div class="gamepadslider_SliderNotchLabel_dbACW">3K</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gamepadslider_SliderNotch_LYPXt">
|
<div class="gamepadslider_SliderNotch_LYPXt">
|
||||||
<div id="fanNotch4" class="gamepadslider_SliderNotchTick_u8QEa gamepadslider_TickActive_j418S" onclick='onSetFanNotch(4)'></div>
|
<div id="fanNotch4" class="gamepadslider_SliderNotchTick_u8QEa gamepadslider_TickActive_j418S" onclick='onSetFanNotch(4)'></div>
|
||||||
<div class="gamepadslider_SliderNotchLabel_dbACW">4V</div>
|
<div class="gamepadslider_SliderNotchLabel_dbACW">4K</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gamepadslider_SliderNotch_LYPXt">
|
<div class="gamepadslider_SliderNotch_LYPXt">
|
||||||
<div id="fanNotch5" class="gamepadslider_SliderNotchTick_u8QEa gamepadslider_TickActive_j418S" onclick='onSetFanNotch(5)'></div>
|
<div id="fanNotch5" class="gamepadslider_SliderNotchTick_u8QEa gamepadslider_TickActive_j418S" onclick='onSetFanNotch(5)'></div>
|
||||||
<div class="gamepadslider_SliderNotchLabel_dbACW">5V</div>
|
<div class="gamepadslider_SliderNotchLabel_dbACW">5K</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="gamepadslider_SliderNotch_LYPXt">
|
<div class="gamepadslider_SliderNotch_LYPXt">
|
||||||
<div id="fanNotch6" class="gamepadslider_SliderNotchTick_u8QEa gamepadslider_TickActive_j418S" onclick='onSetFanNotch(6)'></div>
|
<div id="fanNotch6" class="gamepadslider_SliderNotchTick_u8QEa gamepadslider_TickActive_j418S" onclick='onSetFanNotch(6)'></div>
|
||||||
|
<div class="gamepadslider_SliderNotchLabel_dbACW">6K</div>
|
||||||
|
</div>
|
||||||
|
<div class="gamepadslider_SliderNotch_LYPXt">
|
||||||
|
<div id="fanNotch7" class="gamepadslider_SliderNotchTick_u8QEa gamepadslider_TickActive_j418S" onclick='onSetFanNotch(7)'></div>
|
||||||
<div class="gamepadslider_SliderNotchLabel_dbACW">Auto</div>
|
<div class="gamepadslider_SliderNotchLabel_dbACW">Auto</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue