Quick fix: Open Terminal (Admin) and run powercfg -lastwake to see what woke the PC. Then disable wake sources: powercfg -devicequery wake_armed lists devices allowed to wake. Disable each with powercfg -devicedisablewake "DeviceName". Also check scheduled tasks set to wake the PC.
You put your PC to sleep at midnight. At 3 AM the fans spin up, screen turns on briefly. You wake to a hot laptop or empty battery. The cause is a device or scheduled task waking the PC. Two commands identify the culprit and lock it down.
Affects: Windows 11 (and Windows 10) laptops and desktops.
Fix time: ~15 minutes.
What causes this
Wake events come from several sources: USB devices (mouse movement, keyboard press, USB charging trigger), Wake-on-LAN network packets, scheduled tasks set to wake the PC, Windows Update automatic maintenance, connected accessories like a Bluetooth mouse, or BIOS-level wake events (RTC alarm, power button vibration). Windows logs the last wake source for diagnosis.
Method 1: Identify what woke the PC
Diagnostic step. Find the cause before disabling things.
- Open Terminal (Admin).
- Run:
powercfg -lastwakeOutput describes the last wake source: device name, instance path, friendly name. Identifies the culprit.
- For wake history (last N wake events):
powercfg -waketimersLists scheduled tasks set to wake the PC.
- To see all devices allowed to wake:
powercfg -devicequery wake_armed - Common culprits to investigate:
- HID-compliant mouse — mouse movement (jostled bag wakes laptop)
- Realtek PCIe GbE Family Controller — network packets via Wake-on-LAN
- Intel(R) USB 3.0 — USB controller wake events
- Microsoft Update Orchestrator — scheduled task
- Read Event Viewer: Windows Logs → System → filter for Source Power-Troubleshooter, Event ID 1. Each wake event is logged with the source.
This identifies what to disable next.
Method 2: Disable wake from specific devices
The targeted fix.
- Note the device name from
powercfg -devicequery wake_armed. - Disable specific device’s wake permission:
powercfg -devicedisablewake "HID-compliant mouse"Replace device name with one from the query output.
- For mouse and keyboard combined: disable USB wake. Device Manager → USB Root Hubs → right-click each → Properties → Power Management tab → untick “Allow this device to wake the computer.”
- For Wake-on-LAN: Device Manager → Network Adapters → Wi-Fi or Ethernet → Properties → Advanced tab. Find Wake on Magic Packet, Wake on Pattern Match, Wake on LAN. Set each to Disabled.
- To verify after disable: re-run
powercfg -devicequery wake_armed. The disabled device should not appear in the list. - To re-enable:
powercfg -deviceenablewake "DeviceName".
This stops device-level wake events.
Method 3: Disable scheduled tasks that wake the PC
For when wake source is a task, not a device.
- From
powercfg -waketimersoutput, note scheduled tasks set to wake (e.g., Microsoft Update Orchestrator, UpdateOrchestrator\Schedule Scan). - Open Task Scheduler.
- Navigate to the task: e.g., Microsoft → Windows → UpdateOrchestrator → Schedule Scan.
- Right-click → Properties. Switch to Conditions tab.
- Untick Wake the computer to run this task. Click OK.
- For UpdateOrchestrator: this is owned by Windows and may re-enable itself after updates. A more robust fix: disable Automatic maintenance wake: Control Panel → Security and Maintenance → Maintenance → Change maintenance settings → untick Allow scheduled maintenance to wake up my computer at the scheduled time.
- For commonly-wake-causing tasks:
- Microsoft → Windows → UpdateOrchestrator → Maintenance Install: disable wake.
- Microsoft → Windows → UpdateOrchestrator → Reboot: disable wake.
- Microsoft → Windows → TaskScheduler → Maintenance Configurator: review.
- After changes:
powercfg -waketimersshould show fewer or no tasks.
This addresses scheduled-task-driven wake events.
How to verify the fix worked
- Run
powercfg -devicequery wake_armed. Output is empty or shows only devices you intentionally allow. - Run
powercfg -waketimers. Lists no tasks that wake. - Put the PC to sleep overnight. Morning: PC is still asleep, battery level matches what you’d expect for ~0.5%/hour passive drain (laptop) or 0% (desktop after S5 shutdown).
If none of these work
If PC still wakes unexpectedly, deeper causes apply. BIOS RTC alarm: some BIOS configurations have a built-in “wake at time” setting. Enter BIOS, find Power Management → RTC Alarm → Disable. Power button or lid vibration: laptops with light keyboards can register key-press events from jostling. Test by sleeping the laptop on a stable surface vs. in a moving bag — if only bag-sleep wakes it, hardware sensitivity is the cause. Adjust lid-close behavior: Power Options → Choose what closing the lid does → Sleep (not Hibernate; hibernate writes to disk and powers off, more wake-resistant). Modern Standby (S0): laptops with Modern Standby don’t actually sleep — they stay in S0 low-power. Various background tasks can wake the system. The only fix is to use Hibernate instead of Sleep, or use shutdown command for unattended periods. USB devices that draw power constantly: external HDD enclosures, USB-powered LED lights, USB hubs — unplug or use a powered hub to isolate from PC’s USB power.
Bottom line: powercfg -lastwake identifies the wake source. powercfg -devicedisablewake <name> disables device-level wakes. Disable task-level wakes via Task Scheduler properties.