Closed emrebicer closed 1 year ago
Weird !
Maybe you could write a systemd script that starts/stops the fw-fanctrl
service when suspending/resuming, like this:
https://www.addictivetips.com/ubuntu-linux-tips/run-scripts-and-commands-on-suspend-and-resume-on-linux/
I guess that'd work, even though it's probably not the prettiest way :')
This is exactly what I thought, but unfortunately stopping the service does not stop the fans, after stopping the service I believe the fans will keep spinning at the last set fan speed value. But now that I see #7 is merged maybe I can change the strategy to a custom sleep strategy before sleeping and then back to the default strategy on resume. Just out of curiosity, does it work as expected on Ubuntu / other distros?
Ah! Yes you're right ! Indeed a custom sleep strategy could help you.
Just out of curiosity, does it work as expected on Ubuntu / other distros?
Yup, something like 99.99% of the time for me on Ubuntu. It happened to me once or twice that the fans keep blowing after going to sleep but waking up and sleeping again always fixed it...
With this commit I finally could stop fans on suspend (by hot swapping to a sleep strategy) and continue fans with the default strategy on resume. If you see fit I can open a pull request, otherwise feel free to close this issue.
Nice, well done ! Please open a PR :)
Actually, I discovered when testing your PR that I also have your issue !
I live in a temperate climate and I always use the lazyest
mode, so whenever my laptop goes to sleep, the cpu load drops and the fan goes silent (the lazyest
profile switches off the fan when cpu is under 45°C)
So I naïvely tried current code with deaf
mode like a sort of control group, and it just continued spinning like hell. Yes, I wrote all these profiles but never used them for more than a few seconds x)
So, thanks a lot for fixing this amateur work !
I cloned the repository on my Arch Linux system and ran the install script. It works as intended however the fans will keep working after suspend (sleep), Is there a way to make fans stop and start them on resume?