Why won’t my Mac sleep? How to find the app keeping it awake

An app or a part of macOS is holding a power assertion that says “don’t sleep yet”. To see which one, run pmset -g assertions in Terminal: anything listed with PreventUserIdleSystemSleep or NoIdleSleepAssertion is keeping the Mac awake. In Activity Monitor, the Energy tab shows the same thing per app in the Preventing Sleep column. Stop what that app is doing or quit it, and the Mac sleeps on its normal schedule.

Updated · commands checked on macOS 27.2

Ask macOS in Terminal

Two commands, no administrator password. The first gives the short answer:

pmset -g

The two sleep lines on our Mac (shortened):

 sleep                1 (sleep prevented by cameracaptured, coreaudiod, coreaudiod, powerd, Claude)
 displaysleep         10 (display sleep prevented by Telegram)

The sleep line names every process stopping the Mac from sleeping, and displaysleep names the ones keeping the screen on. For details, list the assertions themselves:

  1. Open Terminal from Applications › Utilities.
  2. Run pmset -g assertions.
  3. Under Listed by owning process, look for PreventUserIdleSystemSleep, NoIdleSleepAssertion or PreventSystemSleep. The name in brackets after the pid is the process holding the Mac awake.
  4. If the entry says Created for PID, run ps -p with that number and -o comm= to see which app it is.
  5. Stop what that app is doing (pause the audio, end the call, close the tab) or quit the app. The Mac then sleeps on its normal schedule.
pmset -g assertions

On our Mac (shortened: ids replaced with […], some entries left out):

Listed by owning process:
   pid 613(cameracaptured): […] 00:32:39 PreventUserIdleSystemSleep named: "cameracaptured-idleSleepPreventionForBWFigCaptureDevice"
   pid 615(coreaudiod): […] 00:32:47 PreventUserIdleSystemSleep named: "com.apple.audio.BuiltInSpeakerDevice.context.preventuseridlesleep"
	Created for PID: 24159.
	Resources: audio-out BuiltInSpeakerDevice
   pid 418(powerd): […] 01:54:04 PreventUserIdleSystemSleep named: "Powerd - Prevent sleep while display is on"
   pid 25708(Claude): […] 07:51:22 NoIdleSleepAssertion named: "Electron"

Each entry reads: process ID and name, how long it has been held (hours:minutes:seconds), the assertion type, and the name the app gave it. Here an Electron app had kept the Mac from idle sleep for almost eight hours.

TypeWhat it stops
PreventUserIdleSystemSleep, NoIdleSleepAssertionIdle sleep. The display can still turn off. Apple’s header calls the second one the older name of the first.
PreventUserIdleDisplaySleep, NoDisplaySleepAssertionThe display turning off (and so the Mac sleeping).
PreventSystemSleepSystem sleep. caffeinate -s creates it; its man page says it works only on a power adapter.
UserIsActiveCounts as you using the Mac. Ours carried “Timeout will fire in 600 secs”.

coreaudiod plays sound for other apps, so its entries say Created for PID. Look that number up:

ps -p 24159 -o comm=
/Applications/Telegram.app/Contents/MacOS/Telegram

In Activity Monitor

Open Activity Monitor (Applications › Utilities) and click Energy. Apple describes the Preventing Sleep column as whether the app is keeping your Mac from going to sleep. If you don’t see it, choose View › Columns and turn it on. Click the column header to sort by it.

Activity Monitor tells you whether an app is preventing sleep, not why. There’s no column for the assertion’s name or for the app behind coreaudiod; that’s what pmset -g assertions is for.

What the usual names mean

These are the ones we saw on our own Mac in a single day. Each links to a page with more detail.

In pmsetUsually means
coreaudiodSound is playing or the microphone is in use. “Created for PID” names the app.
powerd: “Prevent sleep while display is on”macOS itself, while the screen is on. Normal; it goes away when the display turns off.
cameracapturedThe camera or microphone is being captured, for example during a video call.
bluetoothd: “com.apple.BTStack”Bluetooth activity. On our Mac each one lasted about a minute and a half.
WindowServer: UserIsActiveYou touched the keyboard, mouse or trackpad. It times out by itself.
Google Chrome“Playing audio”, “Video Wake Lock” or “Download in progress”.
An Electron app: “Electron”Desktop apps built on Electron. One held the Mac awake for hours on our test Mac.
caffeinateSomeone (or a script) ran the caffeinate command.
nsurlsessiond, cloudd: “NSURLSessionTask …”Background downloads and iCloud syncing. Usually a few seconds each.

The full list is in What keeps a Mac awake.

When it stayed awake earlier

pmset -g assertions shows only now. To see why the Mac didn’t sleep an hour ago, search the power log for the moments the display turned off, the sleeps, and the assertions that were still being held:

pmset -g log | grep -E "Display is turned|Entering Sleep|Summary.*(NoIdleSleepAssertion|PreventUserIdleSystemSleep)"

On our Mac (shortened):

2026-11-11 12:15:37 +0200 Notification         Display is turned off
2026-11-11 12:15:37 +0200 Assertions           PID 1749(Claude) Summary NoIdleSleepAssertion "Electron" 00:45:01  […]
2026-11-11 12:30:37 +0200 Assertions           PID 1749(Claude) Summary NoIdleSleepAssertion "Electron" 01:00:01  […]
2026-11-11 12:45:37 +0200 Assertions           PID 1749(Claude) Summary NoIdleSleepAssertion "Electron" 01:15:01  […]
2026-11-11 12:52:50 +0200 Notification         Display is turned on

The display turned off at 12:15 and came back on at 12:52 with no “Entering Sleep” line in between: the Mac was awake the whole time. The Summary lines, written every 15 minutes for an assertion that’s still held, show who: an Electron app holding NoIdleSleepAssertion, by then for 45 minutes and counting.

On our Mac the log started at the last restart, so read it before you restart.

With SleepPilot

SleepPilot (Mac App Store) lists the apps holding your Mac awake right now by app name, grouped by app, and counts sound played through coreaudiod against the app playing it. If an app keeps the Mac awake longer than a time you choose while nobody is using it, SleepPilot warns you, and its Show button brings that app to the front so you can stop it. It doesn’t quit apps for you.

Questions

The screen turns off, but the Mac doesn’t sleep. Why?

Display sleep and system sleep are separate. An app holding PreventUserIdleSystemSleep lets the display turn off but keeps the Mac awake; Apple’s power-management header says exactly that. Run pmset -g assertions to see which app it is.

Is powerd’s “Prevent sleep while display is on” the problem?

No. That’s macOS keeping the Mac awake while the screen is on, and it’s released when the display turns off. Look at the other entries. More about powerd.

Can Activity Monitor show what kept the Mac awake last night?

No. The Preventing Sleep column shows only what’s happening now. For the past, read the power log with pmset -g log, as shown above.

Could it be a setting rather than an app?

Yes. On a Mac laptop, check System Settings › Battery › Options › Prevent automatic sleeping on power adapter when the display is off; on a desktop, the similar switch is in Energy. Apple also suggests turning off sharing services you don’t use, in System Settings › General › Sharing. In Terminal, pmset -g shows the sleep timer; the man page says 0 means it never sleeps.

Is it safe to quit coreaudiod or powerd?

Don’t. They’re parts of macOS that hold the Mac awake on behalf of something else. Stop the app behind them instead: the audio player, the call, the browser tab.

Sources

Related

SleepPilot for Mac

Keeps your Mac awake until the job is done, then lets it sleep. Shows which apps keep it awake when it should be sleeping.

Coming soon to the Mac App Store

macOS 14 Sonoma or later · Apple silicon and Intel