Req [Windows] Option to Disable Windows Screen Saver
#1
Lightbulb 
I would to request the ability for Kodi for Windows to optionally prevent the windows screen saver from turning on when Kodi is running. This would prevent conflicts between Kodi's built-in screen saver and the Windows screen saver while still allowing the windows screen saver to remain active and functional when Kodi is not running.

This could be handed by the Win32 SetThreadExecutionState call.

http://www.pinvoke.net/default.aspx/kern...utionstate


Code:
[DllImport("kernel32.dll")]
static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags);

[FlagsAttribute]
enum EXECUTION_STATE : uint
{
    ES_AWAYMODE_REQUIRED = 0x00000040,
    ES_CONTINUOUS = 0x80000000,
    ES_DISPLAY_REQUIRED = 0x00000002,
    ES_SYSTEM_REQUIRED = 0x00000001
}

To prevent the windows screen saver from starting:

Code:
SetThreadExecutionState(EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS);


To re-enable the windows screen saver when Kodi exists:

Code:
SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS);
Reply
#2
Windows screensaver should already be disabled as long as kodi is in fullscreen mode - no?
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#3
I think there's a bug as it seems the logic got inverted at some point, since with Kodi fullscreen the OS screensaver will kick in, however with Kodi minimised the OS screensaver is blocked from kicking in, so the inverse of what should happen.
Reply
#4
(2017-03-13, 01:42)jjd-uk Wrote: I think there's a bug as it seems the logic got inverted at some point, since with Kodi fullscreen the OS screensaver will kick in, however with Kodi minimised the OS screensaver is blocked from kicking in, so the inverse of what should happen.

I have observed this behavior before. I wasn't aware that there was any screen saver blocking functionality in place. Maybe my feature request should be re-classified as a bug instead? There are many threads on the windows sub-forum related to Kodi + windows screen saver crashes and black screen issues, so I think fixing this issues could help with stability.
Reply
#5
It's not my particular area of knowledge, so to be honest I'm not sure there is intentional blocking going on so it could be a side effect of something else that happens when Kodi is minimised. The only thing I can be sure of is that the observed behaviour is the opposite of what I'd expect.
Reply
#6
(2017-03-13, 01:42)jjd-uk Wrote: I think there's a bug as it seems the logic got inverted at some point, since with Kodi fullscreen the OS screensaver will kick in, however with Kodi minimised the OS screensaver is blocked from kicking in, so the inverse of what should happen.

I have problems with this one too. I am usig Kodi Matrix v19.0 and I use it to DLNA cast to my Smart TV. I have it autostarted, minimized on windows 10 when I log in, just to run in the background, provided I want to remote controll it with Yatse from my Android device. In some other cases I restore the (windows 10) Kodi window and start a movie from my PC, which gets properly DLNA streamed to my TV. So far everything is great. 

My problem is:
- if I configure Kodi to run in a normal window, it somehow prevents the Windows 10 screen saver from starting, and my computer is continuously glowing (I want the Windows 10 screensaver to start after 5 minutes)
- or, if I set Kodi to run in fullscreen, the screensaver starts properly, but Kodi can't be minimized, as if I minimize it to the taskbar (using Win+D keyboard shortcut, minimizing all windows), the moment I click any other icon on the taskbar Kodi activates too and goes fullscreen in the background, acting like a live wallpaper for my entire day.

So the ideal operation would be: Kodi runs in a minimized normal window, and windows screensaver starts when it needs to.
Or as a compromise, if the screensaver can only start, when Kodi is in fullscreen, I am willing to use Kodi in fullscreen, provided it can be minimized when I don't need it, and it stays (!) there as long as I want (and does not activate, when I click anything on the taskbar). 

Until this gets fixed, I am stuck with a setup, where I either can't have my screensaver started automatically after 5 minutes, or i have to watch the Kodi fullscreen window continously as my new windows wallpaper Sad

BTW as said by this other user, here in the forum earlier, it seems strange, that the screensaver works when Kodi is in fullscreen and it is blocked when Kodi is a normal window. If anything the exact opposite would make sense to block the screensaver in fullscreen and behave as a normal app (and let screensaver start) when in a normal window. 

Can someone enlighten me please why is this the way it is and what should I do?
Reply

Logout Mark Read Team Forum Stats Members Help
[Windows] Option to Disable Windows Screen Saver1