How to setup sytemd-hook for fancontrol (suspend issue)?

Hi,
so there is this bug, which stops fancontrol from working after a suspend-resume cycle. According to the Archwiki, one can autorestart fancontrol after resume by setting up a systemd-hook. However I can’t get it working from there.
Can someone explain it for a dummy, what I exactly need to do in order to auto-restart fancontrol after resume?
Thanks!

Edit: Clarified.

Try this:

sudo systemctl edit fancontrol.service

Add the following:

[Service]
Restart=on-failure
RestartSec=5s

Save and close. systemd reloads the service automagically.

Test and see if that works. if it doesn’t, then issue:

sudo systemctl revert fancontrol.service

Somebody else might chime in. I don’t use fancontrol, myself.

No, this won’t help. fancontrol doesn’t crash, so the service doesn’t know about its failure.

The only way (ATM) is to manually restart fancontrol.service - or have it automated, which is what I’m looking for.

Make a fan-resume.service something like:

[Unit]
Description=Restart fancontrol after resume
After=suspend.target

[Service]
Type=simple
ExecStart=/usr/bin/systemctl --no-block restart fancontrol.service

[Install]
WantedBy=suspend.target
1 Like

Thanks, that works!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.