At 3:12 in the morning the laptop fan spins up on its own in the living room, the disk LED blinks for a while and half an hour later everything goes quiet again. There is nobody at the keyboard. The explanation is not remotely supernatural, but it is more interesting than it looks: a sleeping computer is not switched off, it is still listening, and there is a fairly long list of things allowed to knock on its door.
Sleeping is not shutting down: the states nobody looks at
All of this is governed by ACPI (Advanced Configuration and Power Interface), the contract the firmware and the operating system sign to divide up the power budget. ACPI defines a ladder of states: S0 is on, S3 is suspend to RAM, S4 is hibernation (the contents of memory are dumped to disk) and S5 is off. In S3 the CPU stops executing instructions and memory is held up by a trickle of current that refreshes every cell thousands of times per second, but the hardware does not go completely dark: a minimum of logic stays alive — the chipset and the network controller, almost always — watching for signals.
Since 2012, many laptops no longer use S3. They use what Intel christened Modern Standby and what in practice gets called S0ix: the machine does not suspend, it drops into a very deep rest inside the powered-on state itself. The cores fall to the lowest C-states (savings states in which the processor stops receiving a clock), the PCIe and USB buses drop to their low-power modes and the screen goes off, but the network link stays up. The upside is obvious: mail arrives, notifications sound and the laptop is ready in a second when you open the lid. So is the downside: there is far more surface for something to wake it, and idle power draw stops being truly zero.
Who is allowed to knock on the door
The underlying mechanism is a set of GPEs (General Purpose Events), lines on the chipset that the firmware wires to whatever it sees fit: the lid, the power button, a USB port, the network card. The operating system does not receive “an email”; it receives an interrupt saying something happened on line 14 and then asks what it was.
Each of those sources can be armed or disarmed, and that is the key to almost every mystery. On Linux you can see it in /proc/acpi/wakeup, with a status column per device; on Windows, with powercfg /devicequery wake_armed. The three sources that cause the most trouble are these:
- The RTC, the real-time clock on the motherboard, which besides keeping time carries a programmable alarm: a register where you write a date and a time, and the chip compares on its own until they match. It does not matter that the operating system is asleep; the comparison is done in hardware.
- Wake-on-LAN, which deserves its own paragraph because it sounds like magic and is brutally simple: someone on the local network sends an Ethernet frame with six 0xFF bytes followed by the machine’s MAC address repeated sixteen times. That is all. No IP, no handshake, no reply: the network controller, still powered, filters that sequence in hardware and pulls the wake line. That is why it works with the operating system completely absent.
- PCIe events (PME, Power Management Events), which let a card — a GPU, a Wi-Fi adapter, an NVMe drive — ask for attention even when the bus is in low power.
Three in the morning is no coincidence
That hour is chosen by software, not by chance. Windows has had an “automatic maintenance” window for years that starts in the small hours and is used to defragment, apply updates, index files and run diagnostic tasks. Many of those tasks carry the “wake the computer to run this task” checkbox, which in Windows translates into a real alarm in the RTC. On Linux the same happens with other tools: anacron, designed precisely for machines that are not on all day, catches up on the daily jobs that were missed; systemd timers with WakeSystem=true write straight to /sys/class/rtc/rtc0/wakealarm; and a backup with RandomizedDelaySec can land in any minute of the window you gave it.
Add to that the applications that bring their own scheduler: cloud backup clients, antivirus, photo indexers, package managers or the classic media server that gets up to fetch cover art. None of them “wakes the computer” in the literal sense; what they do is ask the system to schedule the corresponding alarm.
And why sometimes it does not go back to sleep
The second problem, more annoying than the first, is the reverse: the machine wakes up, does its job and stays on. Here the culprit is not an event but a power request. Operating systems let drivers and applications declare “do not suspend me, I am working”: a sound card with an open stream, an SMB network share someone has mounted, a browser tab in a video call, a paused player. Those requests pile up and the system, obediently, does not go to sleep.
On Windows they are listed with powercfg /requests. On Linux the equivalent is the logind inhibitors (systemd-inhibit --list). And there is one subtle detail that explains the strangest cases: the /sys/power/wakeup_count file. The kernel increments that counter every time an event arrives that would wake the machine; if the suspend process reads the value and, when writing it back, the number has changed, it aborts the attempt. It is an explicit race between “I am going to sleep” and “something has just arrived”, and when a device flickers nonstop, suspend gets cancelled in a loop with nothing visible to the user.
How to find out exactly who it was
There is no need to guess. On Windows, powercfg /lastwake says which device caused the last wake-up, powercfg /waketimers lists the scheduled alarms and Event Viewer keeps two very concrete clues: event Kernel-Power 42 on entering suspend and Power-Troubleshooter 1 on leaving it, with the source and the time. On Linux, journalctl -b shows the time jump between the last message before suspending and the first one after, and rtcwake -m no -l lets you read — without triggering it — the alarm currently set in the motherboard clock.
What you can do without breaking anything
The sensible move is not to disarm everything: if you remove the wake-ups, you lose security updates and backups, which is worse than a fan at three in the morning. What is proportionate is selective surgery. Turn off Wake-on-LAN if you do not use it, untick the wake option on the tasks that do not need it, check in the BIOS whether “power on by RTC” or “power on by PCIe” are enabled, and consider going back to S3 or hibernation if the firmware allows it: a laptop that hibernates when you close the lid does not drain its battery in a backpack and does not wake up because of a network frame.
In the end the conclusion is not very cinematic: there is no ghost, there is a schedule. Someone set an alarm in a register of the motherboard clock, and the clock obeyed.






