AaronKelley / DellFanManagement

A suite of tools for managing the fans in many Dell laptops.
GNU General Public License v3.0
245 stars 30 forks source link

Manual mode stops working after laptop wakes up from sleep or hibernate #17

Open bedrin opened 2 years ago

bedrin commented 2 years ago

Thanks for great tool. I've noticed that when my laptop hibernates and wakes up, the fans are always off. It works fine after I enable and disable EC fan control

Rem0o commented 2 years ago

That's normal. Going out of wake will reset everything, that's expected.

A simple event sub to https://docs.microsoft.com/en-us/dotnet/api/microsoft.win32.systemevents.powermodechanged?redirectedfrom=MSDN&view=dotnet-plat-ext-6.0

That reapply everything when waken back from sleep will do the trick, I do the same in an other app.

bedrin commented 2 years ago

Another nice (optional) feature would be to put fans to manual-off mode automatically before putting laptop to sleep

Rem0o commented 2 years ago

@bedrin you can't reliably execute code "before" going to sleep from a dotnet app as far as I know. You can catch the event, but your process will get paused at any given point when the sleep state will come active. You can't "hold" it back to execute code.