Win How does Kodi tell Windows that it is busy, i.e. suppress the Win power management?
#1
Question 
Hello Kodi developers,

in C++ it is a simple set of two code lines to get this done:
cpp:
// disable Windows- and monitor sleep mode
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED);

// do something, e.g. play music

// enbale Windows- and monitor sleep mode
SetThreadExecutionState(ES_CONTINUOUS);

I would guess that something equal is also made by Kodi. How does (should) it work?

I'm asking because it seems that this Kodi feature is not working always:

Playing video (TV stream) in Kodi -> the Windows power management is aware about it, i.e. it does not kick in after the defined timeout. All is running fine.
Playing music (radio stream) in Kodi -> the Windows power management is not aware about it, i.e. it does kick in after the defined timeout and the PC goes to sleep.

System: Kodi 19.4 / 64 Bit Win10 21H2

Bye!

_Michael_
Reply
#2
I did a workaround (link).
Reply

Logout Mark Read Team Forum Stats Members Help
How does Kodi tell Windows that it is busy, i.e. suppress the Win power management?0