PC Wakes Up From Sleep on Its Own
Short answer
Open Terminal as administrator and run powercfg /lastwake — it names the exact device or task that woke the PC last time. Then run powercfg /waketimers to list scheduled tasks permitted to wake it. Between those two commands you get the culprit by name, which is almost always a maintenance task, a network adapter, or a mouse on a desk that vibrates.
On this page
A PC that wakes itself at 3am is not haunted and it is rarely faulty. Something asked it to wake, Windows granted the request, and it wrote down what did it.
The mistake almost everyone makes is working through a list of generic power settings — disable wake on mouse, disable wake on LAN, disable everything — when two commands name the actual cause in about ten seconds.
Ask Windows what woke it
Right-click the Start button, choose Terminal (Admin), and run:
powercfg /lastwake
The output names the wake source from the most recent wake. You will typically get one of these:
| What it reports | What it means |
|---|---|
A device path like HID-compliant mouse |
A USB or input device |
Wake Source Count: 0 |
The wake was manual, or the record was cleared |
A task name under Timer |
A scheduled task woke it |
Power Button |
Someone or something pressed it |
Then list everything currently permitted to wake the machine on a timer:
powercfg /waketimers
If that returns nothing, no scheduled task currently holds a wake permission and
the cause is a device. If it names NT TASK\Microsoft\Windows\UpdateOrchestrator\ Reboot or a maintenance task, you have your answer.
Run powercfg /lastwake after the next unexpected wake rather than after you
have woken it yourself, otherwise it just reports your keyboard.
Scheduled tasks: the 2am wake
Automatic Maintenance is the most common single cause, and it is set to 2am on a default Windows installation. It is allowed to wake the computer to run updates, Defender scans and drive optimisation.
Change it rather than killing it:
Control Panel → System and Security → Security and Maintenance → Maintenance → Change maintenance settings. Set a time when the machine is normally on, and untick Allow scheduled maintenance to wake up my computer at the scheduled time.
Windows still runs maintenance; it just waits until the machine is awake.
Windows Update’s own wake permission
Separately from maintenance, Windows Update can wake a machine to install updates. Settings → Windows Update → Advanced options has a toggle along the lines of waking the device to install updates when plugged in. Turn it off if the overnight wakes are the problem.
Anything else holding a wake timer
If powercfg /waketimers named a task you do not recognise, find it in Task
Scheduler. Press Win+R, type taskschd.msc, and use the path from the
command output to locate it. On the task’s Conditions tab, untick Wake the
computer to run this task.
Backup software, manufacturer update utilities and media servers are the usual third-party offenders.
Devices: the mouse on a slightly wobbly desk
If the wake source is a device, Windows will have named it. The blanket fix for a whole class of devices is to review which ones hold the permission.
Open Device Manager (Win+X → Device Manager), expand the relevant category, double-click the device, and go to the Power Management tab. Untick Allow this device to wake the computer.
Worth checking, in order of likelihood:
- Mice under Mice and other pointing devices. A high-DPI gaming mouse registers desk vibration as movement. This is the single most common device cause.
- Keyboards under Keyboards. Less sensitive, but a key resting against something counts.
- Network adapters under Network adapters. Wake-on-LAN is useful on a server and pointless on a home desktop. The same tab usually has Only allow a magic packet to wake the computer, which is a good middle ground if you want WoL but not wakes from stray broadcast traffic.
- USB hubs and controllers under Universal Serial Bus controllers. A cheap unpowered hub can generate electrical noise that reads as a wake event.
Keep the keyboard’s permission if you rely on it to wake the PC. Clearing every device’s wake permission means the power button becomes the only way to wake it, which is fine for a desktop and awkward for a laptop with the lid shut.
Listing every armed device at once
Rather than clicking through Device Manager, this lists everything currently permitted to wake the system:
powercfg /devicequery wake_armed
It returns device names exactly as Windows knows them, which makes finding the right entry in Device Manager much faster.
Laptops and Modern Standby
Many laptops from the last several years do not use traditional S3 sleep at all.
They use Modern Standby, which Windows reports as S0 Low Power Idle, where
the system stays partly running so mail and messages keep syncing.
Check which your machine uses:
powercfg /a
If the output says standby S3 is not supported but S0 low power idle is available, you are on Modern Standby. That changes the picture: the machine never fully suspends, so an app can hold it active, and the lid-closed behaviour depends on what software is doing rather than on a hardware state.
There is no supported setting to switch a Modern Standby laptop back to S3 — it is a firmware design decision. What helps is reducing what runs: close applications before closing the lid, and check Settings → System → Power & battery → Screen, sleep & hibernate timeouts so the machine moves to hibernate after a period rather than staying in standby indefinitely. Hibernate writes memory to disk and genuinely powers down.
The hibernation file that enables this is a large, permanent allocation on C:, and whether it is worth keeping is covered in whether hiberfil.sys is safe to delete.
When nothing in the logs explains it
A few causes do not show up cleanly in powercfg /lastwake:
- A failing power supply or motherboard producing spurious signals. Rare, but it presents as random wakes with no recorded source and often alongside unexplained shutdowns.
- BIOS wake settings. Wake on RTC alarm, wake on USB, and wake on PCIe are configured in firmware and are invisible to Windows. Enter the BIOS/UEFI with F2 or Del during boot and look under power management.
- A connected TV or monitor using HDMI-CEC. Turning the TV on can wake the PC it is attached to, which is the intended behaviour and surprises everyone the first time.
What does not help
- Disabling sleep entirely. It stops the symptom by removing the state. The machine then runs all night.
- Clearing every device’s wake permission at once before reading the log. You lose keyboard wake for no diagnostic gain.
- Registry edits found on forums for wake behaviour. Most target settings that moved or were removed between Windows versions.
- Turning off fast startup for this specific symptom. It affects shutdown and boot behaviour, not wake sources.
Realistic expectations
Most cases are one of two things: Automatic Maintenance at 2am, or a mouse. Dealing with the one the log names resolves it the same night, and there is rarely a second cause hiding behind the first.
Modern Standby laptops are the frustrating exception. The behaviour is by design, the firmware does not offer a way back to true sleep, and the practical answer is to set a hibernate timeout so the machine stops drifting awake in a bag. Expect to manage it rather than fix it.