Max: Tweak fan speeds.

This commit is contained in:
Dmitry Voronin 2024-12-17 13:08:58 +03:00
parent 8aee8d1787
commit 2310dbb663

View file

@ -3,7 +3,6 @@
pkgs, pkgs,
... ...
}: let }: let
tbase = 45;
wm2fc = pkgs.callPackage <package/wm2fc> {}; wm2fc = pkgs.callPackage <package/wm2fc> {};
in { in {
# hardware.cpu.amd.ryzen-smu.enable = true; # hardware.cpu.amd.ryzen-smu.enable = true;
@ -31,10 +30,10 @@ in {
ryzenadj ryzenadj
]; ];
script = '' script = ''
ryzenadj --tctl-temp=${toString (tbase+5)} ryzenadj --tctl-temp=50
while true; do while true; do
sleep 60 sleep 60
ryzenadj --tctl-temp=${toString (tbase+5)} &> /dev/null ryzenadj --tctl-temp=50 &> /dev/null
done done
''; '';
}; };
@ -51,32 +50,21 @@ in {
coreutils coreutils
wm2fc wm2fc
]; ];
script = let script = ''
templimit = add: if (tbase+add) > 80 then
"80000"
else
"${toString (tbase+add)}000";
in ''
old=0 old=0
while true; do while true; do
temp=$(cat /sys/devices/pci0000\:00/0000\:00\:18.3/hwmon/*/temp1_input) temp=$(cat /sys/devices/pci0000\:00/0000\:00\:18.3/hwmon/*/temp1_input)
value=0 value=0
if [ $temp -gt ${templimit 35} ] if [ $temp -gt 80000 ]
then value=184 then value=184
elif [ $temp -gt ${templimit 30} ] elif [ $temp -gt 70000 ]
then value=161 then value=128
elif [ $temp -gt ${templimit 25} ] elif [ $temp -gt 60000 ]
then value=138
elif [ $temp -gt ${templimit 20} ]
then value=115
elif [ $temp -gt ${templimit 15} ]
then value=92 then value=92
elif [ $temp -gt ${templimit 10} ] elif [ $temp -gt 49000 ]
then value=69
elif [ $temp -gt ${templimit 5} ]
then value=46 then value=46
elif [ $temp -gt ${templimit 0} ] elif [ $temp -gt 45000 ]
then value=23 then value=23
fi fi