Restart fan control after a suspend/resume cycle
The core claim holds. I read lm-sensors issue 172 with gh issue view 172 -R lm-sensors/lm-sensors and it is still OPEN, titled "Fancontrol doesn't work after waking from sleep", and the reporter names the real mechanism: on resume /sys/class/hwmon/hwmonN/pwm*_enable is no longer 1, so the fans sit where the reset left them until the service restarts. The Arch wiki Fan_speed_control page has a matching section, "Fancontrol stops working after suspend-wake cycles", which cites that same issue and points at a systemd sleep hook, so both cited sources do say what the record claims. The hook contract was confirmed on this machine against man 8 systemd-suspend.service from systemd 261.2-1: the executables live in /usr/lib/systemd/system-sleep/, the first argument is pre or post and the second is the sleep action, so the record's case $1 in post) script is correct, and strings /usr/lib/systemd/systemd-sleep contains only /usr/lib/systemd/system-sleep, confirming there is no /etc equivalent to prefer. Two things were wrong. First, the danger claim that scripts in that directory "may be removed by systemd package upgrades" is false on Arch: pacman does not delete files it does not own, and this workstation has an unowned /usr/lib/systemd/system-sleep/keyboard-backlight sitting alongside nvidia (nvidia-utils) and unmount-fuse (omarchy-settings 4.0.2-1) that has survived updates, so I replaced that line with the real hazard, which is that pwmconfig stops fans one at a time while it measures them. Second, the record offers only the sleep hook, while the Arch wiki Power_management/Suspend_and_hibernate page carries a note that systemd considers the hook a hack and runs the hooks concurrently with no ordering, and directs the reader to a custom systemd unit instead, which is the form the wiki's own amdgpu-fancontrol example uses with After=suspend.target and WantedBy=suspend.target. I put the unit first and kept the hook as a labelled second method, with the point that a file there must be chmod +x or it is ignored silently. I also added where fancontrol comes from, because pacman -Q fancontrol fails on Omarchy 4: it is shipped by lm_sensors 1:3.6.2-1 at /usr/bin/fancontrol with /usr/lib/systemd/system/fancontrol.service, and lm_sensors is already installed here as a mesa dependency, so a reader on Omarchy has the tool but has fancontrol.service disabled and no /etc/fancontrol, which is what the unit's ConditionFileNotEmpty=/etc/fancontrol checks. Nothing here is Omarchy-specific and nothing in the Omarchy 4 layout interferes. NOT exercised: I did not suspend this workstation, did not install the hook or the unit, and did not create /etc/fancontrol, so the restart-on-resume behaviour is confirmed from the upstream issue and the systemd man page rather than observed.
A misconfigured /etc/fancontrol can stop the fans entirely and let the CPU or GPU overheat. pwmconfig itself stops each fan in turn to measure it, so do not run it on a machine that is already hot or under load, and watch sensors for a few minutes after any change.
Symptom
My custom fan curve works fine until I suspend the machine. After resume the fans are stuck, either full blast or off entirely, until I restart the service by hand.
Cause
An open lm-sensors bug, lm-sensors/lm-sensors#172. On resume the hwmon pwm*_enable attributes are reset out of manual mode, so the hardware or the driver takes the fans back and fancontrol neither notices nor reasserts them. The fans then stay wherever the reset left them, usually full speed or off, until fancontrol.service is restarted. The bug is in fancontrol itself and not in Omarchy, so it behaves the same on any Arch system.
Fix
fancontrol has no package of its own. It ships in lm_sensors, which is already installed on Omarchy 4 as a mesa dependency, and fancontrol.service only starts once /etc/fancontrol exists. Check that first:
pacman -Q lm_sensors
systemctl is-enabled fancontrol.service
ls -l /etc/fancontrol
Then restart the service on resume. Either method works. The systemd unit is the better one, because systemd-sleep runs the sleep hooks in parallel with no ordering and systemd-suspend.service(8) calls them a hack.
**Method 1, a systemd unit (preferred):**
sudo tee /etc/systemd/system/fancontrol-resume.service <<'EOF'
[Unit]
Description=Restart fan control after resume
After=suspend.target hibernate.target hybrid-sleep.target
[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl restart fancontrol.service
[Install]
WantedBy=suspend.target hibernate.target hybrid-sleep.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable fancontrol-resume.service
**Method 2, a sleep hook.** systemd-sleep runs every executable in /usr/lib/systemd/system-sleep/ with pre or post as the first argument and suspend, hibernate, hybrid-sleep or suspend-then-hibernate as the second:
sudo tee /usr/lib/systemd/system-sleep/fancontrol.sh <<'EOF'
#!/bin/sh
case $1 in
post) /usr/bin/systemctl restart fancontrol.service ;;
esac
EOF
sudo chmod +x /usr/lib/systemd/system-sleep/fancontrol.sh
The chmod +x is not optional. A file in that directory that is not executable is ignored with no error.
If fancontrol.service fails after a kernel update rather than after a suspend, it is a moved hwmon path and not this bug. Check which:
systemctl status fancontrol.service
journalctl -b -u fancontrol.service
sensors
grep -E 'DEVPATH|DEVNAME|FCTEMPS|FCFANS' /etc/fancontrol
fancontrol refuses to start with Configuration appears to be outdated, please run pwmconfig again when the recorded DEVPATH no longer matches the hwmonN numbers, which can reorder across reboots. Correct the numbers in /etc/fancontrol, or regenerate the file:
sudo sensors-detect
sudo pwmconfig
To stop the numbers reordering in the first place, pin the module load order: take the modules listed in /etc/conf.d/lm_sensors and put them one per line in /etc/modules-load.d/modules.conf.
Verify
Suspend and resume, then confirm the fan RPM tracks temperature again with watch -n2 sensors and that systemctl is-active fancontrol reports active. To see which restart path fired, systemctl status fancontrol-resume.service for the unit and journalctl -b -u systemd-suspend.service for the sleep hook, which logs the hook's output.