-
Notifications
You must be signed in to change notification settings - Fork 64
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
Thinkpad T14s: Fan keeps running during suspend #181
Comments
Hi @JunnanZ, do you actually mean that the fan keeps running during suspend? I.e. your laptop completely turns off (screen, CPU, hard disk etc.) but the fan keeps running? In that case, you have faulty hardware because thinkfan has no influence whatsoever on what happens during suspend. Or did you mean the switch to |
I have the same issue (Thinkpad T14s Gen3, Intel): When I close the lid with the fan running it will keep running forever, as soon as I open the lid (given I waited a short time), thinkfan kicks in, sees the temperature being down and shuts down the fan. When I have no thinkfan running and things being on "auto" it doesn't happen. I wonder if it would be possible to shift to auto upon suspend but I don't know how feasible it is to get that signal into thinkfan. I'll add my configuration as soon as I get home. |
My thinkfan.conf:
|
Well. That sounds absolutely crazy tbh because when the laptop is on standby no program is being executed and everything except the RAM is supposed to be turned off IN HARDWARE. That being said, we could try to implement a workaround by switching the fan off in software BEFORE the system goes to sleep... |
Or set it to "auto" not off because it might need running for a short while? I wonder if the BIOS/EFI can't handle the fan state being explicitly set? |
I'm experiencing the same issue with the T14 Gen 3 (Intel). Seems the fan is set to "disengaged" by the kill interrupt which is not good enough for "modern S2" sleep. The BIOS has a S3 sleep option, and in fact I'm getting correct fan behavior when entering sleep with it. However, S3 sleep is bugged in the current version of the BIOS 1.29/1.07 and will not wake up instead crashing and causing a system reboot. I'm not sure if this fan behavior is universal across all S2 sleeping systems but it might be a good idea to offer control over the sleep state default in the config to avoid future problems with more systems moving to "modern" sleep. Then the user can fiddle with it in case of sleep issue, auto, disengaged, 0, etc. |
Update: I was incorrect about thinkfan setting fan state to disengaged on sleep, it appears that thinkfan does not change the fan level whatsoever when getting the kill signal. As a hack to get my fan to spin down safely on S2 sleep I'm currently using this very simple service unit file. Since the fan level is set to auto instead of forced to zero this hack should be fairly safe, even if thinkfan fails to start back up or update the fan speed on wake up or whatever other edge case might exist. /etc/systemd/system/thinkfan-sleep-hack.service
Then make sure to |
There is no way to do anything on a The signal that is meant to terminate an application cleanly is |
What I meant by "kill signal" above was "signal from kill command". Didn't think too hard about what literal signal was being sent. Looks like pkill is SIGTERM by default, although i can't find what Below is the thinkfan unit file that puts thinkfan to sleep.
|
Wait, figured it out. I think it's sending SIGWINCH which should be on window resize? Not sure why that would be the signal. |
wait a minute 🤨 |
Just looked it up, I'm still on version 1.3.1. A tag from back in feb. That SIGPWR change came later in april. So SIGWINCH is still correct for this install. |
You're exactly right. Now currently, thinkfan does not do anything special to the fan on sleep. The signal is only there to tell thinkfan that sensor and/or fan I/O errors should be ignored during the next few cycles. |
Thanks for this solution! I was having the same issue on my Thinkpad P15s Gen 2. This should keep it sleeping on battery much longer. Now to figure out why the system gets so hot when connected to AC power, even when it's done charging. But that's a different issue -- the fan responds to the temperature as it should. |
same issue on Lenovo Yoga X390, Manjaro Linux. |
I just noticed the issue myself on a new P series Thinkpad. However the problem went away after updating to the latest firmware version. So if anyone is still experiencing this: What firmware version are you currently running (check |
Lenovo Yoga X390, Manjaro Linux
|
Huh... So your BIOS is from 07/06/2023. Maybe there's a chance they'll eventually publish a fixed version, but apparently not all models are treated the same. Looks like we might have to implement a workaround for this :-/ |
@vmatare
|
Same issue with a Lenovo X13 Gen 4, if thinkfan has control of the fan and the fan is running when suspend is triggered, it will keep running indefinitely. Update: I've managed to get it working - YMMV. Thanks to #181 (comment) For reference, my system's bios is as follows.
|
I have a T16 Gen 1 running Fedora 39 Cinnamon Spin and was also having this problem. I changed the sleep and wakeup unit files to call scripts to stop and continue thinkfan and also set the fan to auto before sleep. You can see the configs here https://gist.github.com/jlongua/849936e07cc417cb00f1ec3ba4ed8dd8 |
Modern laptops by default enter "Suspend-to-Idle" mode, in which some parts of the hardware isn't switched off and e.g. ACPI thermal loops in the BIOS continue running. The allows for a nice cooloff of residual heat while the system is already suspended. Except the fans must be in AUTO mode for this to work correctly; leaving them in a fixed-speed mode will result in them spinning forever. |
Output from
systemctl status thinkfan
before and after suspend:The fan keeps running at the same speed during suspend.
The text was updated successfully, but these errors were encountered: