My desktop once woke itself up in the middle of the night, lit up the monitor, and sat there with its fans spinning. Nobody had touched the mouse.
Instead of flipping power settings at random, I opened an admin terminal and asked Windows what happened. As with most of the Windows 11 changes I make and the ones I avoid, the fix starts with finding the cause first.
Popular Now: G.Skill replaces a $150 RAM kit now selling for $1,199, earning a customer for life in the processThe last wake source is a clue, not a verdict
Every command here needs an elevated terminal, so press powercfg /lastwake. It reports what pulled the PC out of its last sleep.

On my desktop, it named a PCI Express Root Port, which sounds vague. A root port is a bridge, so the real culprit sits behind it, most likely my Realtek network adapter.
However, the answer isn't always there. My laptop came back with a wake source count of zero. On a desktop, Event Viewer keeps a record of each wake. Open it, go to Windows Logs > System, and click Filter Current Log.

Best Deals: DELL Optiplex 7060 SFF Desktop Computer
Price Trend:
Prices last scanned 4 hours and 50 minutes ago
7 days ago: $374.50 USD30 days ago: $368.49 USD
7 days ago: $439.99 USD30 days ago: $379.99 USD
7 days ago: £612.3330 days ago: £614.33
Pick Power-Troubleshooter from the Event sources list, then open an entry and read its Wake Source line. On a Modern Standby laptop, this log mostly says Unknown, so check the sleep study's exit reasons instead.


To see every device currently set to wake the PC, run powercfg /devicequery wake_armed. My desktop listed the usual trio: the keyboard, the mouse, and that Realtek adapter.
Our Latest TweakTown Guides
- Snipping Tool handles most of my screenshots, but this open-source app still does the jobs it can't
- I almost uninstalled 7-Zip after File Explorer learned RAR, and then I hit the gaps
- Your Windows PC is enforcing policies you never set, and one command lists them
- Here's the four Windows 11 components I only add when a job calls for them
- I stopped reaching behind my monitors after PowerToys added this brightness control

To take one off the list, run powercfg /devicedisablewake "device name" with the exact name in quotes. If you prefer clicking, open Device Manager, right-click the device, select Properties, and untick "Allow this device to wake the computer" on the Power Management tab. For a network adapter, "Only allow a magic packet to wake the computer" is a gentler middle ground.
Guide Q&A
Powered by TweakBot
From TweakTown's coverage of this guide.
How can you trace the actual device behind a PCI Express Root Port wake source reported by powercfg /lastwake?
What does a Modern Standby sleep study's Top Offenders list reveal when a laptop spends little time in the LOW POWER STATE?
How can you configure a Realtek network adapter to wake a PC only for magic packets?
What are the risks of overriding a Windows power request labeled Legacy Kernel Caller?
Want something else? Ask TweakBot.

Running powercfg /deviceenablewake "device name" undoes it. I'd leave the keyboard armed, or you'll need the power button every morning.
Scheduled tasks can set an alarm you never agreed to
If the wake came from a timer instead, powercfg /waketimers shows which one is armed and when it will fire. On my desktop, it was named the Maintenance Activator, and Automatic Maintenance there was set to run at 2:00 AM.
That timer comes from Automatic Maintenance, so its switch isn't in Task Scheduler. Open Control Panel, go to System and Security > Security and Maintenance, expand Maintenance, and click Change maintenance settings. Untick "Allow scheduled maintenance to wake up my computer at the scheduled time" and click OK.


For ordinary tasks, open Task Scheduler, find the task, and untick "Wake the computer to run this task" on its Conditions tab. The same tab matters when you build your own Windows maintenance jobs that run on autopilot.

For a blanket fix, press powercfg.cpl, and press Enter. Click Change plan settings, then Change advanced power settings. Expand Sleep > Allow wake timers and set both On battery and Plugged in to Important Wake Timers Only. Windows then keeps timers it treats as important, such as an update restart, and ignores the rest.

When your PC won't sleep, something asked it not to
When a PC ignores its sleep timer, an app or driver has usually filed a power request telling Windows to stay awake. Run powercfg /requests while the problem is happening, since it only shows requests that are active at that moment.

The output splits into categories. DISPLAY keeps the screen on, SYSTEM blocks sleep, and EXECUTION lets a process keep running when Windows would otherwise pause it. Each entry carries a tag, too. [PROCESS] points to an app, [SERVICE] to a background service, and [DRIVER] to a device driver.
Closing a forgotten browser tab often solves it. My desktop had a sneakier case. SYSTEM showed a [DRIVER] entry called Legacy Kernel Caller, a generic label that hides its source. I quit iCUE and Armoury Crate first, but the entry only vanished when I closed Chrome.
On a later run, SYSTEM named a driver instead: Realtek audio, reporting an active audio stream. Closing Chrome cleared that one too, which points to Chrome's audio as the cause.

When something should keep running but shouldn't keep the PC awake, set an override. powercfg /requestsoverride process chrome.exe display stops Chrome from keeping the screen on. I'd avoid overriding a driver entry like Legacy Kernel Caller, since that generic label can cover more than one source.
The request type must match the entry's category: Display, System, or Awaymode. powercfg /requestsoverride on its own lists your overrides, and repeating a command without the request type removes one.
Sleep study shows what your laptop did while you were away
On a laptop, run powercfg /a and check the top of the list. Mine shows Standby (S0 Low Power Idle) Network Connected, which means Modern Standby, so it keeps running small jobs while it looks asleep. If yours only lists Standby (S3), sleep study has far less to tell you, so stick with the first three commands.

On a Modern Standby laptop, run powercfg /sleepstudy /output "$env:USERPROFILE\Desktop\sleepstudy.html" in the same PowerShell window, then open the file. In Command Prompt, swap in %USERPROFILE% instead. Adding /duration 7 covers a full week.
The session table lists each standby stretch with its battery drain and a % LOW POWER STATE TIME column, which tracks how long the laptop spent in its deepest idle state. A low percentage means something kept it busy, and the Top Offenders list inside that session points to the likely culprit.
One 31-minute session on my laptop spent 0% of its time there, and Top Offenders listed the USB host controller as active 99% of the time. Each session also records an exit reason, such as a key press or the power button, though it won't always name a device.
Fewer wake permissions make for quieter nights
Once the PC sleeps through the night, revisit the wake_armed list every few months, especially after adding a new mouse or backup software, since either can quietly add a wake permission or timer. If a laptop still drains faster than it should while it's awake, run powercfg /energy with your apps closed. It checks the awake side of power use that the sleep study doesn't cover.







