Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fans keep working after suspend #6

Closed
emrebicer opened this issue Oct 15, 2022 · 6 comments · Fixed by #9
Closed

Fans keep working after suspend #6

emrebicer opened this issue Oct 15, 2022 · 6 comments · Fixed by #9

Comments

@emrebicer
Copy link
Contributor

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?

@TamtamHero
Copy link
Owner

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 :')

@emrebicer
Copy link
Contributor Author

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?

@TamtamHero
Copy link
Owner

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...

@emrebicer
Copy link
Contributor Author

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.

@TamtamHero
Copy link
Owner

Nice, well done !
Please open a PR :)

@TamtamHero
Copy link
Owner

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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants