vrubleg / soundkeeper

Prevents SPDIF/HDMI digital audio playback devices from sleeping.
https://veg.by/projects/soundkeeper/
MIT License
229 stars 9 forks source link

Windows 11 and sleep #17

Open filthyfreak opened 1 week ago

filthyfreak commented 1 week ago

First of all, I must give my thanks for this developing this software, it is keeping my headset from turning itself off all the time which is a nuisance.

This issue has previously been mentioned here.

To summarize, SoundKeeper prevents Windows 11 from entering sleep mode. It is not an issue in Windows 10 or older operating systems.

I am not satisfied with the proposed solution of allowing Windows 11 to go into sleep mode no matter what is occurring on the screen, for example you could be watching a movie or Youtube video and the computer will go to sleep.

With Windows 10 updates becoming deprecated soon perhaps it's time to revisit this problem and implement a proper solution?

vrubleg commented 1 week ago

Microsoft needs to either provide a way to stream audio using WASAPI without blocking automatic sleep mode (that is currently not possible), or fix NtPowerInformation(SystemPowerInformation, ...) (that does not work on Windows 11).

I have ideas how to workaround it, but the priority of this task is low since I don't use Windows 11 yet, and there is a tiny hope that Microsoft could still eventually provide the required API in newer updates.

Manual sleep mode should work. For now, you can just set up a hotkey like Win+Ctrl+L that locks your desktop and switches your PC to sleep mode, and use it whenever you leave your computer for long time.