Screensaver not activated after idle time

Bełko, Bartłomiej 1 Reputation point
2020-11-30T14:24:34.797+00:00

I am looking for a way to find out why sometimes screensaver is not activated on our Windows 10 1809 VDI (virtual machines). So the question is how Windows is calculating idle time which is taked for starting screensaver? We have a GPO configured to start screensaver after 15min of idle time (User Configuration - Administrative templates - Control Panel - Personalization - Screen saver timeout). It happens (especially when machines have longer uptime) then screen saver is not activated. I found out this nice script https://gallery.technet.microsoft.com/Checking-the-session-idle-06350f77
but tested it with active skype call which last more than 15 minutes and during this time I was not touching mouse or keyboard. Script was counting to 15 mins but screensaver was not activated. Why? How skype is preventing it?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,524 questions
0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. Dave Patrick 426K Reputation points MVP
    2020-11-30T14:43:37.807+00:00

    Some of these may render something useful.

    powercfg /requests
    powercfg /lastwake
    powercfg /sleepstudy
    powercfg /systemsleepdiagnostics
    powercfg /systempowerreport

    --please don't forget to Accept as answer if the reply is helpful--

    1 person found this answer helpful.
    0 comments No comments

  2. Bełko, Bartłomiej 1 Reputation point
    2020-11-30T15:28:37.047+00:00

    Thank a lot - this one looks quite interesting for me: powercfg /systemsleepdiagnostics
    It generates data like below for mine machine from today
    43763-image.png

    This machine was not activating screen saver before 12:00 (mine time is UTC +1) - then I restarted it and now it is working. So I am looking for a clue why it was not activating screen saver before 12:00 Details from report:
    43629-image.png

    and part of output from Power requests section (there is quite a lot of rows)
    43742-image.png

    How to conclude from this data?

    0 comments No comments

  3. Dave Patrick 426K Reputation points MVP
    2020-11-30T15:43:17.507+00:00

    Looks like something happens at 30 sec intervals. Procmon may also be useful.
    https://learn.microsoft.com/en-us/sysinternals/downloads/procmon

    --please don't forget to Accept as answer if the reply is helpful--

    0 comments No comments

  4. Eleven Yu (Shanghai Wicresoft Co,.Ltd.) 10,671 Reputation points Microsoft Vendor
    2020-12-01T03:05:08.363+00:00

    Hi,

    tested it with active skype call which last more than 15 minutes and during this time I was not touching mouse or keyboard. Script was counting to 15 mins but screensaver was not activated.

    Although your mouse and keyboard are idle, Windows knows not to start the screensaver as the application skype is running. Below article mentioned "If an application is running that has a computer-based training (CBT) window open, or has a non-Windows program, such as one run from the MS-DOS prompt, as the foreground application, Windows will not start the screensaver."
    https://computer.howstuffworks.com/question679.htm

    Also, you can try setting with registry. Refer to Moikerz's answer in below thread.
    https://community.spiceworks.com/topic/870464-gpo-screensaver-timeout-not-working

    Thanks,

    Eleven

    If the Answer is helpful, please click "Accept Answer" and upvote it. Thanks.

    0 comments No comments

  5. Bełko, Bartłomiej 1 Reputation point
    2020-12-01T08:25:43.53+00:00

    Thanks for great answers. I expect that this was some application running in the background which prevents screensaver activation. But how to find out such application ? Here is more info from MS about CBT and screen saver : https://learn.microsoft.com/en-us/windows/win32/lwef/screen-saver-library Part of it:
    However, Windows does not start the screen saver if any of the following conditions exist:

    • The active application is not a Windows-based application.
    • A computer-based training (CBT) window is present.
    • The active application receives the WM_SYSCOMMAND message with the wParam parameter set to the SC_SCREENSAVE value, but it does not pass the message to the DefWindowProc function.

    Is it possible to use PRocess monitor or any other tool to look for WM_SYSCOMMAND messages ?