fan/ — the throttle fix, as captured and as declared#
Slot: hosts/laptop/fan-throttle-guard.nix (import it from hosts/laptop/default.nix).
What is in here#
| File | Origin on the Arch install | Role |
|---|---|---|
fan-throttle-guard.nix |
written this pass | the whole fix as one NixOS module |
fanfix |
~/.local/bin/fanfix |
CLI + fan-curve daemon (bash, 372 lines) |
stability_guard.py |
/usr/local/lib/motherboardctl/stability_guard.py |
staged ceiling 3200/2400/1800 MHz |
99-cpu-freq-cap.conf |
/etc/tmpfiles.d/ |
the static floor as it is today |
fanfix.conf |
/etc/fanfix.conf |
CURVE="0:60 100:60" |
fanfix-fan.service, motherboard-stability.service |
/etc/systemd/system/ |
the two units, verbatim |
modules-load.conf, uniwill-laptop.conf |
/etc/modules-load.d/, /etc/modprobe.d/ |
module load + force=1 |
fan-ctl, fan-state |
bar plugin daemon-sec.fans/bin/ |
pkexec dispatcher and the read-only poller the widget uses |
Measured state at capture (2026-10-07 15:21 BST, idle, mains)#
scaling_max_freq 3200000 scaling_min 1121095 cpuinfo_max 5169491 boost 1
governor performance driver amd-pstate-epp (status active) profile performance
k10temp Tctl 38 °C · uniwill fan1 4347 rpm pwm1 255 · fan2 0 rpm pwm2 255 · board temp2 37 °C
amdgpu package 7 W · RTX 3070 Ti 37 °C, 20 W, 16 % util (nvidia-smi fan [N/A])
motherboard-stability: active (limit 3200, stage 0, "mains power; normal temperatures")
fanfix-fan.service: enabled but stopped at 15:08 today; EC commanding both fans 100 %
Things that change on NixOS (read before enabling)#
-
fanfix install/uninstallandfan-ctl cap/uncapwrite/etc/tmpfiles.dimperatively. On NixOS the floor is thesystemd.tmpfiles.rulesline in the module; treatinstall/capas a no-op and changecapKhzinstead.uncapstill works at runtime but the guard re-applies 3200 MHz within a second, so stopmotherboard-stability.servicefirst if an uncapped run is wanted. -
fanfix fan setuphas an Arch-only package-install branch. Dead code on NixOS; the module supplieslinuxPackages.acpi_call. Do not runfan setup. -
fanfixelevates withsudoinsideneed_root;fan-ctlexpects to be launched by pkexec from a bar widget. Both need a polkit agent in the session. Which shell provides it is an open question in the capture note. -
stability_guard.pyhard-fails unless exactly 16 cpufreq policies exist and/sys/class/power_supply/AC0/onlineis the mains sensor. Same hardware, so fine, but check the power-supply name on the NixOS kernel. -
fanfix statusfalse-negatives on the latched low-temperature clamp (its detector is temperature-gated). Trust/proc/cpuinfo"cpu MHz" vsscaling_min_freq: cores below the kernel floor = EC clamp. - Never set the global cpufreq
boostto 0 (see module header).
First-boot verification#
fanfix status # cap 3200 MHz · boost 1 · profile performance · fan line present
sudo fanfix fan status # fan-abnormal=1 is expected; universal-fan-ctrl / custom-tables show which EC path is live
fanfix test 30 # all-core stress: expect 0 throttle events, peak < 75 °C
systemctl status motherboard-stability fanfix-fan