Skip to content

Diagnosing Display Wakeups

Zac Smith edited this page Jun 26, 2026 · 4 revisions

Diagnosing Display Wakeups

This page helps answer the question:

Why did my screens turn back on after DisplaySnooze turned them off?

The important first split is whether the whole PC woke from sleep, or whether the PC stayed awake and only the displays woke.

Quick Read

DisplaySnooze does not contain any code that turns monitors back on. On Windows, it sends the normal monitor-off command, repeats it for the guard window, and exits.

If the displays wake after the guard window ends, something else caused the wake.

By default:

  • Guard window: 180 seconds
  • Repeat interval: 4 seconds

So if the screens wake 5 minutes later, DisplaySnooze has already exited.

Step 1: Check Whether The PC Actually Woke From Sleep

Run:

powercfg /lastwake

If it says:

Wake History Count - 0

then Windows does not think the computer woke from sleep. That usually means the PC stayed awake and the displays woke while the session was already running.

If it lists a wake source, investigate that device or wake timer.

Step 2: Check Wake Timers

Run:

powercfg /waketimers

If there are no active wake timers, Windows does not currently have a scheduled timer set to wake the PC.

Step 3: Check Devices Allowed To Wake The PC

Run:

powercfg -devicequery wake_armed

Common results include:

  • HID-compliant mouse
  • HID Keyboard Device
  • Ethernet or Wi-Fi adapter

These matter for waking the whole PC from sleep.

Important: if the PC is already awake and only the displays are off, normal mouse or keyboard input can wake the displays even if you disable "allow this device to wake the computer." That setting controls sleep wake, not every display wake while the PC is already awake.

Step 4: Check Active Power Requests

Run PowerShell as Administrator, then run:

powercfg /requests

Look at these sections:

  • DISPLAY
  • SYSTEM

If DISPLAY says None, no app or driver is explicitly asking Windows to keep the screens on.

If SYSTEM lists audio, network files, downloads, media playback, or remote access software, those can keep the PC awake. They do not always explain a display wake, but they explain why the computer is not sleeping.

Step 5: Check Your Display Timeout

Run:

powercfg /query SCHEME_CURRENT SUB_VIDEO VIDEOIDLE

The setting is shown in seconds as a hex number.

Examples:

  • 0x0000012c = 300 seconds = 5 minutes
  • 0x00000258 = 600 seconds = 10 minutes
  • 0x00000e10 = 3600 seconds = 60 minutes

If your display timeout is much longer than the wake timing, the wake probably is not caused by the normal Windows display timeout.

Step 6: Run The Idle-Time Test

This test helps tell whether the display woke because Windows saw input.

It does not record keys, mouse positions, window titles, or private content. It only logs how many seconds Windows thinks the computer has been idle.

Save this as Watch-DisplayWake.ps1 next to DisplaySnooze.exe:

$durationMinutes = 8
$log = Join-Path $env:USERPROFILE "Desktop\display-wake-idle-log.csv"

$source = @"
using System;
using System.Runtime.InteropServices;

public static class IdleProbe
{
    [StructLayout(LayoutKind.Sequential)]
    public struct LASTINPUTINFO
    {
        public uint cbSize;
        public uint dwTime;
    }

    [DllImport("user32.dll")]
    private static extern bool GetLastInputInfo(ref LASTINPUTINFO plii);

    public static uint GetIdleMilliseconds()
    {
        LASTINPUTINFO info = new LASTINPUTINFO();
        info.cbSize = (uint)Marshal.SizeOf(typeof(LASTINPUTINFO));
        GetLastInputInfo(ref info);
        return ((uint)Environment.TickCount) - info.dwTime;
    }
}
"@

Add-Type $source

"Time,IdleSeconds" | Set-Content -LiteralPath $log
Start-Process -FilePath ".\DisplaySnooze.exe" -ArgumentList "180 4"

$stopAt = (Get-Date).AddMinutes($durationMinutes)
while ((Get-Date) -lt $stopAt) {
    $idleSeconds = [math]::Round([IdleProbe]::GetIdleMilliseconds() / 1000, 1)
    "$(Get-Date -Format o),$idleSeconds" | Add-Content -LiteralPath $log
    Start-Sleep -Seconds 1
}

Write-Host "Wrote $log"

Run it:

.\Watch-DisplayWake.ps1

When the screen wakes back up, check the CSV on your desktop.

How to read it:

  • If IdleSeconds drops near 0 when the screen wakes, Windows saw input. Suspect mouse movement, keyboard input, a controller, a USB receiver, Bluetooth, or virtual input software.
  • If IdleSeconds keeps increasing while the screen wakes, it was probably not input. Suspect display re-detection, GPU driver behavior, monitor input auto-detect, remote desktop/streaming software, or virtual display software.

If The Longer Guard Fixes The Symptom

Try:

.\DisplaySnooze.exe 600 5

If the displays stay off with this command, but woke back up with the default settings, the likely pattern is:

  1. Something wakes the displays after the default 180-second guard ends.
  2. A longer guard is still running when that wake happens.
  3. DisplaySnooze sends the monitor-off command again within the next interval.

That means the longer guard can be a good practical workaround.

It does not mean DisplaySnooze caused the wake. It means DisplaySnooze was still around long enough to turn the displays off again.

Example Long-Guard Test Result

In one real 12-minute test, DisplaySnooze was run with a 10-minute guard:

.\DisplaySnooze.exe 600 5

The idle log showed:

  • At 327.8 seconds, IdleSeconds dropped from about 327 seconds to under 1 second.
  • The guard was still active.
  • No other idle reset happened before the 12-minute logger finished.

That means Windows saw input at about 5 minutes 28 seconds.

If nobody touched the mouse or keyboard, the likely cause is a device or program generating input. Common suspects are:

  • A sensitive mouse sensor.
  • A wireless mouse or keyboard receiver.
  • A controller.
  • Bluetooth input.
  • Logitech G HUB, virtual HID devices, macro software, remote-control software, or other tools that create virtual keyboard/mouse devices.

For that pattern, the longer guard can keep the room dark, but the root cause is still worth chasing if you want the wake to stop entirely.

Case Study Pattern

On one tested PC, the diagnostics showed:

  • Windows wake history: 0
  • Active wake timers: none
  • Wake-armed devices: HID mouse, HID keyboard, Ethernet adapter
  • DISPLAY power requests: none
  • SYSTEM power requests: audio streams and open network files
  • Display timeout: 60 minutes
  • Hardware/software context: Logitech HID devices, NVIDIA GPU, virtual display driver, and multiple monitors

That points away from DisplaySnooze and away from a scheduled wake timer.

Best next tests for that pattern:

  1. Run DisplaySnooze with a longer guard:

    .\DisplaySnooze.exe 600 5
  2. Turn the mouse upside down or power it off before the test.

  3. Temporarily close remote desktop, VR, streaming, screen capture, or virtual display software.

  4. Test with only one monitor connected.

  5. Disable monitor auto-source or input auto-detect in the monitor menu if available.

  6. If the whole PC wakes from sleep, disable wake permission for the mouse, keyboard, or network adapter one at a time.

Useful Commands Summary

powercfg /lastwake
powercfg /waketimers
powercfg -devicequery wake_armed
powercfg /query SCHEME_CURRENT SUB_VIDEO VIDEOIDLE
powercfg /requests
powercfg /energy /duration 30

Run powercfg /requests and powercfg /energy from an Administrator PowerShell window.

Clone this wiki locally