Blog

PC Won't Wake From Sleep, or Wakes Up by Itself at Night? Fix It with powercfg

A surprised duck waving next to a sleeping monitor under a night sky and a power button with a question mark

You put the PC to sleep, and at 3 a.m. it wakes up by itself with the fans spinning. Or the opposite: you shake the mouse and the screen never comes back, so you have to hold the power button. The built-in powercfg command tells you the cause right away.

First: find out what woke the PC

  • Right-click Start → Terminal (Admin).
  • powercfg /lastwake: shows the device or event that last woke the PC.
  • powercfg /devicequery wake_armed: lists devices allowed to wake the PC. Usually the mouse, keyboard and network adapter.
  • powercfg /waketimers: shows scheduled tasks set to wake the PC.

If the PC turns on by itself at night

  • The network adapter (most common): Device Manager → Network adapters → double-click your adapter → Power Management tab. Turn off "Allow this device to wake the computer", or leave on only "Only allow a magic packet to wake the computer".
  • You can also turn off a device with a command: powercfg /devicedisablewake "device name" (use the name exactly as it appears in the wake_armed list).
  • Disable wake timers: Control Panel → Power Options → Change plan settings → Change advanced power settings → Sleep → Allow wake timers → "Disable".
  • Automatic maintenance: Control Panel → Security and Maintenance → Maintenance → Change maintenance settings, then untick "Allow scheduled maintenance to wake up my computer at the scheduled time".

If the PC won't wake up from sleep

  • Let the keyboard and mouse wake it: in Device Manager, open your device under Keyboards and Mice and other pointing devices, and on the Power Management tab turn on "Allow this device to wake the computer". With a wireless receiver, try a different USB port.
  • Update the graphics driver: often the PC is awake but the screen stays black. Install the latest driver from the NVIDIA, AMD or Intel website.
  • Find what blocks sleep: if the PC never goes to sleep at all, run powercfg /requests to see which program is keeping it awake.
  • Check supported sleep states: powercfg /a lists the sleep modes your PC supports. If a newer laptop using "Modern Standby (S0)" has frequent problems, the powercfg /sleepstudy report shows what drained the battery.
  • Turn off Fast startup: Control Panel → Power Options → Choose what the power buttons do → "Change settings that are currently unavailable" → untick "Turn on fast startup". This can reduce sleep and shutdown glitches.

Still not fixed?

  • Check your motherboard (BIOS) settings for options like "Wake on LAN", "USB Wake" or "RTC Alarm" that may be turned on.
  • Try Hibernate instead of Sleep. Run powercfg /hibernate on in an admin terminal and it appears in Power Options.

Reference: Microsoft Learn – Powercfg command-line options

Blog

← Back to the list Back to top ↑