Why does my computer wake itself up or refuse to go to sleep?
Something is asking it to wake — a scheduled task, a network signal, a peripheral or a driver. The system will tell you what, if you ask it the right question.
- Difficulty
- intermediate
- Time
- 30 min
- Read
- 4 min
- Safety
- caution
Short answer
Both platforms record what woke the machine. On Windows, a command-line query reports the last wake source and which devices are permitted to wake it; on a Mac, the system log records a wake reason. The usual culprits are scheduled maintenance and updates, a mouse or keyboard on a desk that gets knocked, wake-on-network settings, and a connected device sending a signal. Disable waking for the device responsible rather than disabling sleep altogether.
Do this first
Safety
Step by step
- Find out what woke it, rather than guessing.Windows records the last wake source and can list every device permitted to wake the machine, both through its power configuration command-line tool. macOS records a wake reason in the system log. This turns the problem from a mystery into a named device or task.
- Check the obvious physical causes first.A mouse on a desk that someone brushes, a wireless mouse on a shared surface, a games controller, or a laptop lid that is not quite closed. These account for a large share of cases and are solved by moving something.
- Look at scheduled maintenance.Both platforms run maintenance, updates and backups at set times and will wake a machine to do it. That is intended behaviour and can be turned off in the scheduled task or the update settings, at the cost of that work not happening.
- Check network wake settings.Wake-on-LAN and its wireless equivalent let another device on the network wake the machine. It is useful for remote access and a nuisance otherwise, and it can be triggered by ordinary network chatter on some adapters. It is a setting on the network adapter.
- Deal with peripherals individually.Each device that can wake the machine can usually have that permission removed in its properties. Remove it for the ones you do not want — typically the mouse and network adapter — and keep it for the keyboard if you wake the machine that way.
- Now take the opposite problem: it will not sleep.Something is holding it awake. Windows can list active power requests, and macOS shows processes preventing sleep. Media playback, an open video call, a download, a file being written over the network, and a disc in a drive are the usual holds.
- Check for a stuck application.A media player that thinks it is still playing, a browser tab with audio or video, or a presentation application will legitimately assert that the display must stay on. Closing it releases the hold immediately.
- Consider the firmware and drivers.Sleep behaviour is where firmware and driver bugs surface most visibly. If the machine has never slept properly, check for a firmware update from the manufacturer and update the graphics and network drivers before spending longer on settings.
If it doesn't work
Wakes at the same time every night
Cause: A scheduled maintenance or update task with permission to wake the machine — Fix: Find the task in the scheduler and remove its wake permission, or change its time. Do not disable updates themselves.
Wakes seconds after being put to sleep
Cause: A device asserting a wake immediately — commonly the network adapter or a USB device — Fix: Query the last wake source, then remove that device's wake permission. A USB device that does it repeatedly may need a driver update or a different port.
Laptop is hot in the bag with the lid closed
Cause: Woke after being packed and could not sleep again, or lid-close is set to do nothing — Fix: Set lid-close to sleep or hibernate, and hibernate before travelling. Check the machine is not on a modern standby setting that keeps it partly awake.
Screen will not turn off during video
Cause: Correct behaviour — the player is asserting a display request — Fix: Nothing to fix. If a player continues to hold it after being closed, quit it properly rather than closing the window.
Mac wakes for network access
Cause: Wake for network access is enabled, allowing sharing and remote access to wake the machine — Fix: Turn it off in energy settings if you do not use remote access or shared printing to that machine.
Questions people ask
Is waking for updates a bad thing?
No — it is how a machine that is off in the evening stays patched. The problem is usually that it wakes somewhere it should not, like a bag. Fix the location, not the updates.
Should I just turn sleep off?
It removes the symptom and costs you battery life and unnecessary heat. Find the wake source; it usually takes ten minutes.
Why does my desktop wake when I switch a light on?
Almost always a mouse on the same desk being nudged, or a shared surface transmitting vibration. Occasionally a power supply reacting to a mains disturbance. Try removing the mouse's wake permission first.