The Big Picture: Who Can Knock on the Door?
A sleeping person wakes for some knocks and ignores others: a fire alarm, yes; a passing car, no. A sleeping PC is the same. Only certain wake events are allowed to wake it, and Windows lets you see and control the list.
This matters because a PC that wakes by itself in the night (or never sleeps) usually has a wake event or a power request you did not know about.
10.1 What Can Wake a Sleeping PC
| Wake source | Where it comes from | Common? |
|---|---|---|
| Power button | The motherboard, on standby power | Always |
| Keyboard or mouse | A USB or PS/2 device | Yes (allowed per device) |
| Lid open | A sensor in the laptop | Yes |
| Timer | A scheduled task or Windows maintenance | Yes |
| Network | Wake-on-LAN magic packet, or other network patterns | On some PCs |
| USB devices | A phone, hub or other device | Possible |
| Bluetooth devices | A paired keyboard or mouse | Possible |
| Other | Modem ring, a PCI Express wake signal | Rare |
How it works inside: each wake-capable device uses standby power to watch for its event (Chapter 4's +5 V standby rail). When the event happens, the device raises a wake signal. The firmware and acpi.sys (Section 1) tell Windows which device woke the PC, using the _PRW data in the tables.
10.2 Wake-on-LAN
What it is: Wake-on-LAN (WoL) lets another computer switch a sleeping PC on across the network. The sending computer transmits a special message called a magic packet: a block of data that contains the target network card's MAC address (its hardware ID, Chapter 27) repeated many times. A network card on standby power listens for it. If the address matches, it wakes the PC.
Other PC / phone app Sleeping PC (standby power)
| magic packet (MAC repeated) network card is listening
|-------------------------------------> match -> WAKE SIGNAL
PC wakes (S3/S4/S5)
What you need (all three):
| Requirement | Where |
|---|---|
| The firmware allows it | A setting such as "Wake on LAN" or "Power on by PCIe" in the BIOS/UEFI setup (Chapter 5) |
| The driver allows it | Device Manager → network adapter → Power Management tab → "Allow this device to wake the computer" (and, if wanted, "Only allow a magic packet to wake the computer") |
| The network carries the packet | Usually the wired network (Ethernet); Wi-Fi support is rarer and varies (hedge) |
Safety note: Wake-on-LAN has no password in its basic form, so it works only on trusted networks. If you do not use it, leaving it off is a good habit.
10.3 Wake Timers
What it is: A wake timer is a clock alarm set by a program or Windows to wake the PC at a given time.
Typical sources:
| Source | Example |
|---|---|
| Task Scheduler | A task with "Wake the computer to run this task" ticked (Chapter 12 and Chapter 15) |
| Windows maintenance / Update | Automatic maintenance at night; update installs may be scheduled to wake the PC (Chapter 35) |
| Alarms and backup programs | Apps that run a job at a set time |
The power plan has a setting Allow wake timers (Section 7) with values like Enable, Disable, or Important wake timers only. If your PC wakes at the same time every night, a wake timer is the likely cause.
See them (read-only):
powercfg /waketimers
It lists active wake timers: which program set it and when it will fire, or says there are none. You may need to run it in an administrator window on some PCs (hedge).
10.4 Device-Initiated Wake (USB, Keyboard)
What it is: A device can wake the PC itself. For example, pressing a key on a USB keyboard sends activity on the USB port; the USB controller tells the system to wake.
| Device | Typical behaviour |
|---|---|
| Keyboard | Usually allowed to wake the PC |
| Mouse | Usually allowed; a moving or jittery mouse (or a laser mouse on a vibrating desk) can wake it by accident |
| USB hub or phone | Sometimes allowed; a connecting device can cause a wake |
| Bluetooth devices | Possible if the adapter allows it |
Control it per device: Device Manager (Chapter 14) → open the device → Power Management tab → untick "Allow this device to wake the computer" (this is a setting change; for the lab, only look). USB selective suspend (Section 8) is separate: it lets idle ports doze, but it does not decide who may wake the PC.
10.5 Finding Out What Woke the PC (Read-Only Commands)
| Command | What it shows | Notes |
|---|---|---|
powercfg /lastwake | What woke the PC the last time | May show a device, a timer or a reason code; it can be unclear after a full shutdown |
powercfg /devicequery wake_armed | The devices currently allowed to wake the PC | A list of device names |
powercfg /devicequery wake_programmable | Devices whose wake setting can be changed | Longer list |
powercfg /waketimers | Active wake timers | See 10.3 |
powercfg /requests | What is stopping sleep right now | See Section 3.6; may need admin |
All of these only read. They do not change anything.
A simple detective path:
PC woke by itself?
|
+--> powercfg /lastwake (who/what woke it)
+--> powercfg /waketimers (a scheduled alarm?)
+--> powercfg /devicequery wake_armed (which devices may wake it)
|
v
Then fix the cause: untick a device's wake option, or turn off the
task's "wake the computer" option, or set Allow wake timers = Disable.
Summary
| Term | Plain meaning |
|---|---|
| Wake event | Anything allowed to wake a sleeping PC |
| Wake-on-LAN | A magic packet containing the NIC's MAC address wakes the PC |
| Magic packet | The special wake message |
| Wake timer | A scheduled alarm that wakes the PC |
| "Allow this device to wake the computer" | Device Manager's per-device wake switch |
powercfg /lastwake | Shows the last wake source |
powercfg /devicequery wake_armed | Lists devices allowed to wake the PC |
powercfg /waketimers | Lists active wake timers |