Why won’t my Mac sleep?
Something is holding a power assertion: a small “don’t sleep” flag that any app can set. One Terminal command names it. Most of the time it’s audio, a browser tab, a video call, Docker, or a caffeinate someone forgot.
Updated
The quick answer
Open Terminal and run:
pmset -g assertions
The bottom half, Listed by owning process, names every app currently preventing sleep:
Listed by owning process:
pid 412(coreaudiod): [0x0001...] 01:12:03 PreventUserIdleSystemSleep named: "com.apple.audio.context..."
pid 9012(Google Chrome): [0x0002...] 00:05:11 PreventUserIdleDisplaySleep named: "Video Wake Lock"
pid 53120(caffeinate): [0x0003...] 03:40:17 PreventUserIdleSystemSleep named: "caffeinate command-line tool"
Each line gives the process, how long it has held the assertion, the type, and a name the app chose. Quit or close the thing responsible and the line goes away.
A shorter summary is in plain pmset -g, which prints something like sleep 1 (sleep prevented by coreaudiod, Google Chrome) when anything is blocking.
Read the assertion type
| Type | Effect |
|---|---|
PreventUserIdleDisplaySleep | Screen stays on, so the Mac does too |
PreventUserIdleSystemSleep | Screen can turn off, Mac stays awake |
PreventSystemSleep | Stronger system sleep block; on a laptop it applies on power adapter |
UserIsActive | You touched the keyboard or mouse recently. Normal, and it expires |
If the screen turns off but the Mac never sleeps, look for PreventUserIdleSystemSleep. If the screen itself never turns off, look for PreventUserIdleDisplaySleep.
The usual culprits
| Process | Why | Fix |
|---|---|---|
coreaudiod | An app has an audio stream open | Close muted or paused media tabs, quit call apps |
| Chrome, Safari, Firefox | Video playing (even in a background tab) | Pause or close the tab |
| Zoom, Teams, Slack huddles, FaceTime | Call or screen share in progress | Leave the call, quit the app |
caffeinate | A script, build tool or AI agent started it | kill <pid> from the assertions list |
| Docker, OrbStack, UTM, Parallels | A VM is running | Stop containers or quit the VM app |
backupd | Time Machine backup in progress | Let it finish |
| Amphetamine, KeepingYouAwake, Stat Space | You (or a rule) asked for it | Turn the session off |
caffeinate deserves a second look. Agent sessions and long scripts often start it with -w tied to another process, or with no time limit. If its parent is gone, it may never stop on its own. See cleaning up after Claude Code for other things agents leave running.
Check your settings too
If no app holds an assertion and the Mac still won’t sleep, check:
- System Settings › Lock Screen: “Turn display off on battery when inactive” and “…on power adapter when inactive”. Set to Never, the display never sleeps.
- System Settings › Battery › Options (laptops) or Energy (desktops): “Prevent automatic sleeping on power adapter when the display is off” keeps the Mac awake with the screen dark.
- A connected input device that keeps reporting activity: a drawing tablet, game controller or wobbly mouse can reset the idle timer. Unplug it and see whether sleep starts working.
Your current values are all in pmset -g: sleep is minutes until system sleep (0 means never), displaysleep the same for the screen.
If it sleeps, then wakes up
That’s a different problem. Look for the wake reason:
pmset -g log | grep -E 'Wake from|DarkWake' | tail -20
Common reasons are network access (another device looking for a shared service), Bluetooth devices, a scheduled wake, or Power Nap. Turn off Wake for network access under Battery › Options or Energy if nothing on your network needs to reach the Mac.
History: what kept it awake last night
pmset -g log keeps several days of assertion history. To see what held the Mac awake for a long time:
pmset -g log | grep -E 'Assertions.*(Released|TimedOut)' | tail -30
Released lines include how long each assertion was held, which is the quickest way to find the app that kept the Mac up overnight.
Seeing it live
Stat Space’s Awake tab has a Blocking sleep list of every other app holding an assertion, named after the app rather than its helper process. It keeps a 7-day history, and if your Mac stayed awake for a while with the lid closed, it tells you which app did it (for example “Docker kept your Mac awake for 40 min with the lid closed”). It’s free. From the terminal, statspace blockers prints the same list. See Keep awake.
Questions
What does PreventUserIdleDisplaySleep mean?
That app is keeping the screen on, which also keeps the Mac awake. Browsers set it while video plays, and so do presentation and video-call apps. PreventUserIdleSystemSleep lets the display turn off but keeps the Mac running.
Why does coreaudiod keep my Mac awake?
An app has an audio stream open, even a silent one. A muted browser tab, a paused video, a call app or an audio interface driver can do it. Close the tab or quit the app and the assertion disappears.
My Mac goes to sleep but wakes up at night. Is that the same problem?
No, that’s a wake, not a blocked sleep. Check pmset -g log | grep -E 'Wake from|DarkWake' for the reason, and turn off Wake for network access if you don’t need it.
Does Power Nap stop my Mac sleeping?
No. Power Nap wakes the Mac briefly while it sleeps to fetch mail and updates, then lets it sleep again. On Apple Silicon these show up as DarkWake entries in the log.
Know what your Mac is doing, without adding to it.
Free, no account. Pro is $9.99 once for the first 100 buyers.