Power assertions
What is keeping my Mac awake?
Run pmset -g assertions in Terminal to see which processes currently hold power assertions that can prevent system sleep or display sleep. Those assertions, plus sharing services, disk-accessing apps, and sleep settings, are what keep a Mac awake.

How to see what is keeping a Mac awake
Run pmset -g assertions in Terminal to list the processes that currently hold I/O Kit power assertions, which can prevent system sleep or display sleep.
pmset -g assertions
man pmset on macOS says processes may override power management settings with I/O Kit power assertions, and that -g assertions displays a summary of those assertions (Mac OS X 10.6 and later). Apple’s Energy Efficiency Guide for Mac Apps gives the same command for checking whether an app is preventing sleep.
You do not need a keep-awake app to run this. The listing is the same whether the holder is the caffeinate command or another process.
A trimmed snapshot checked on this Mac on 2026-10-01 (unrelated process lines omitted):
Assertion status system-wide:
UserIsActive 1
PreventUserIdleDisplaySleep 1
PreventSystemSleep 0
PreventUserIdleSystemSleep 1
NetworkClientActive 0
Listed by owning process:
pid 36015(caffeinate): [0x0006…] 00:01:24 PreventUserIdleSystemSleep named: "caffeinate command-line tool"
Details: caffeinate asserting for 300 secs
Localized=THE CAFFEINATE TOOL IS PREVENTING SLEEP.
Timeout will fire in 216 secs Action=TimeoutActionRelease
pid 569(powerd): [0x0001…] 99:48:39 PreventUserIdleSystemSleep named: "Powerd - Prevent sleep while display is on"
pid 50531(Claude): [0x0005…] 21:26:58 NoIdleSleepAssertion named: "Electron"
A 1 in the system-wide block means at least one assertion of that type is on. A 0 means none are. The lines under Listed by owning process name the holders.
pmset -g (no extra word) prints the live power settings and, when processes have overridden them, the same assertion list. pmset -g assertionslog prints a running log of assertion creations and releases.
How to read pmset -g assertions
Each Listed by owning process line names a process ID, a process name, an assertion type, and a short reason string after named:.
Apple’s Energy Efficiency Guide shows the same shape: pid 3741(Fire): ... PreventUserIdleSystemSleep named: "Batch processing files". The quoted string is the reason the caller passed in (in that example, the reason argument to beginActivityWithOptions:reason:). Technical Q&A QA1340 says IOPMAssertionCreateWithName takes a brief string that macOS can show when it needs to explain why the Mac is not sleeping, limited to 128 characters. Apple’s IOPMLib.h in the macOS SDK calls that string the assertion name (kIOPMAssertionNameKey) and asks callers to describe the task, such as “Checking mail” or “Compiling”.
Read a line left to right:
pid 36015(caffeinate)is process 36015, namedcaffeinate.- The hex id in brackets is the assertion id macOS assigned.
00:01:24is the elapsed time shown for that assertion.PreventUserIdleSystemSleepis the type.named: "caffeinate command-line tool"is the reason string.
Some assertions add Details, Localized, or Timeout lines. On this Mac, a timed caffeinate hold printed Timeout will fire in 216 secs Action=TimeoutActionRelease. IOPMLib.h defines TimeoutActionRelease as the action that releases the assertion when the timeout expires.
The type names that matter for “the Mac will not sleep” are the ones that block idle system sleep or idle display sleep. The definitions below were checked against the installed SDK and Apple’s published IOPMLib.h, alongside Apple’s sample output and a live assertion listing:
| Type | What it does |
|---|---|
PreventUserIdleSystemSleep |
Prevents automatic system sleep after idle user activity. The display may still dim and idle sleep. Lid close, the Apple menu, low battery, and other sleep reasons can still put the Mac to sleep. No effect in Dark Wake. (IOPMLib.h) |
PreventUserIdleDisplaySleep |
Prevents the display from turning off after idle user activity. Does not turn a dark display back on. While the display is held, the system cannot idle sleep. No effect in Dark Wake. (IOPMLib.h) |
PreventSystemSleep |
IOPMLib.h marks kIOPMAssertionTypePreventSystemSleep as deprecated in 10.9 and “not supported in any OS X releases.” pmset -g assertions still prints a PreventSystemSleep status row. man caffeinate on macOS still documents -s as creating an assertion to prevent system sleep, valid only on AC power. |
UserIsActive |
Appears as a system-wide row and as per-process lines in Apple’s sample and on this Mac. IOPMAssertionDeclareUserActivity in IOPMLib.h declares that the user is active, powers the display on, and postpones display sleep up to the Energy Saver display-sleep setting. |
NoIdleSleepAssertion |
Deprecated in 10.7. IOPMLib.h says to use PreventUserIdleSystemSleep instead. Live output on this Mac still shows NoIdleSleepAssertion named: "Electron" on some apps. |
NoDisplaySleepAssertion |
Deprecated in 10.7. IOPMLib.h says to use PreventUserIdleDisplaySleep instead. |
PreventDiskIdle |
Prevents attached disks from dropping into lower power states. Does not, by itself, prevent system sleep. Apple’s Energy Efficiency Guide lists it in the system-wide block. (IOPMLib.h) |
NetworkClientActive |
Keeps the computer awake while OS X serves active network clients. On AC power it can hold dark wake or full wake. On battery it can prevent idle sleep. IOPMLib.h calls the assertion a suggestion; macOS may still sleep. |
Other rows showed up in the system-wide block on this Mac, or in Apple’s sample: BackgroundTask, ApplePushServiceTask, ExternalMedia, SoftwareUpdateTask, InternalPreventDisplaySleep, PreventSystemSleepSecurityIndicator. Those names are real. Published meanings for them were not in the pages opened for this guide, so they stay unlabeled.
A Kernel Assertions section can appear under the process list. This Mac printed Kernel Assertions: 0x104=USB,MAGICWAKE with owners such as a USB hub and en0. Treat that as observed output, then confirm USB and Thunderbolt devices against Apple’s sleep page below.
Assertions block idle sleep. They do not block forced sleep. QA1340 and the I/O Kit Power Management Release Notes both say lid close, Sleep from the Apple menu, a thermal emergency, and low battery still sleep the Mac. The release notes also say an assertion is released when the process exits, dies, or crashes.
Why a Mac won’t sleep
A Mac may stay awake because of a sleep-preventing assertion, sharing activity, disk access, Spotlight indexing, connected devices, or a sleep setting. Apple’s sleep troubleshooting guide covers these causes.
Start with pmset -g assertions. If PreventUserIdleSystemSleep, NoIdleSleepAssertion, PreventSystemSleep, or PreventUserIdleDisplaySleep is 1, read the owning process.
man pmset points at I/O Kit power assertions and at caffeinate(8). Apple’s Energy Efficiency Guide shows an app holding PreventUserIdleSystemSleep named "Batch processing files". The I/O Kit release notes give backups and long computations as reasons to prevent idle sleep, and a movie or slideshow as a reason to prevent display sleep.
The caffeinate command can create a hold. man caffeinate on macOS says caffeinate creates assertions: -i prevents idle system sleep, -d prevents display sleep, -s prevents system sleep on AC power, and -u declares that the user is active. On this Mac, caffeinate printed PreventUserIdleSystemSleep named: "caffeinate command-line tool".
If your Mac sleeps or wakes unexpectedly lists causes beyond an individual assertion row. Apps that access a disk can keep a Mac from going to sleep; Apple names Music (reading songs) and DVD Player (reading a disc). People using shared services can prevent sleep, for example a printer connected to the Mac or shared files. Check System Settings → General → Sharing and turn off a service you do not need.
Other people can wake the Mac remotely to use shared resources. On a laptop, Apple puts “Wake for network access” under System Settings → Battery → Options. On a desktop, the control is under Energy.
Apple’s unexpected-sleep page also tells you to check Lock Screen for “Turn display off on battery when inactive” and “Turn display off on power adapter when inactive”, and to turn off “Prevent automatic sleeping on power adapter when the display is off” in Battery settings. The Energy settings page for a desktop Mac defines that last option as preventing the Mac from going to sleep automatically when its display is off.
The same sleep page says a Mac will not go to sleep while Spotlight is indexing the hard disk, and that indexing can take several hours. Malfunctioning USB and Thunderbolt storage and devices may keep a Mac from going to sleep; disconnect them, then reconnect one at a time. Processes running in the background can prevent sleep: Apple tells you to open Activity Monitor from Applications → Utilities and click CPU.
man pmset documents ttyskeepawake: prevent idle system sleep when any tty (for example a remote login session) is active. A tty is inactive only when its idle time exceeds the system sleep timer.
A download alone is not proof of a sleep-preventing assertion. Check the process list for a hold instead of assuming a transfer keeps the Mac awake. Napless Pro (coming soon) includes planned automatic keep-awake for downloads, as listed in its Free and Pro summary.
If you came here because you want the Mac to stay awake on purpose, start with every way to keep a Mac awake and the app comparison. This page stays on the holders.
When a Mac sleeps while an app says it is awake
A Mac can sleep despite an app’s “awake” status if its assertion has ended, failed, or cannot prevent the kind of sleep requested.
man pmset is blunt: processes override sleep by using I/O Kit power assertions, and pmset -g assertions lists those processes. The icon is not in that list. If the app is missing, check for a helper process that owns its assertion. A missing app name alone does not show whether another process or a standing preference is preventing sleep.
An assertion can fail to create: QA1340 checks the creation result before relying on the hold. A timed hold can expire (TimeoutActionRelease in IOPMLib.h). The process can exit and drop every assertion it owned (I/O Kit release notes). Forced sleep (lid, Apple menu, heat, low battery) ignores idle-sleep assertions.
Read the full listing alongside the app status. A zero means that particular assertion type is off, but zeroes in the system-sleep rows do not rule out a display hold: PreventUserIdleDisplaySleep also blocks idle system sleep while it applies. Check NetworkClientActive, kernel assertions, and sleep settings too. If an active row belongs to a different process, inspect that holder or helper before drawing a conclusion.
How Napless checks keep-awake
Napless reports honest status in its menu, and Check Health plus napless doctor inspect keep-awake and assertions while Napless is running.
An orange triangle in the Napless menu means keep-awake needs attention. The menu bar icon switches to a warning glyph. The line under Keep Awake names the problem. The menu then adds Check Health… and Dismiss.
Check Health… opens Keep-Awake Health. So does Check Keep-Awake Health… in Settings → General. The sheet lists keep-awake, protection, assertions, and incidents, plus the other checks Napless can inspect. A problem line can offer Fix when Napless has a repair. Check Again runs a new check.
From Terminal, with Napless running:
napless doctor
napless doctor --json
If napless is not on your PATH, use the helper inside the Direct app:
'/Applications/Napless.app/Contents/Helpers/napless' doctor
Napless has to be running. If it is not, the command prints Napless isn't running and exits 69.
The orange triangle covers failed checks, keep-awake that could not be held, and sleep while Napless was keeping the Mac awake. Napless Help also lists a closed-lid restoration failure among warning reasons; that diagnostic description does not mean Keep Awake With Lid Closed is available. A deliberate pause (heat, battery, Low Power Mode) shows a reason with no orange triangle.
Honest status, Check Health, and napless doctor ship in free Napless. Napless is free to download. Napless Pro ($7.99 one time, up to 3 Macs) is coming soon and is not for sale today. Keep Awake With Lid Closed is coming in an update.
You can do the same assertion check without Napless: run pmset -g assertions and read the table above.
How to see Preventing Sleep in Activity Monitor
Activity Monitor’s Energy pane has a Preventing Sleep column that shows whether an app is preventing the Mac from going to sleep.
View energy consumption in Activity Monitor lists that column on the Energy pane: “Whether this app is preventing your Mac from going to sleep.” Open Activity Monitor (Applications → Utilities), then click Energy.
Apple’s archived Energy Efficiency Guide gives View → Columns → Power Assertion as the way to reveal the column. That archived menu label may differ from the version installed on your Mac.
Activity Monitor is a yes/no per app. pmset -g assertions is the typed list: which assertion, which pid, which reason string, how long it has been held. Use both when an Energy row says Yes and you want the type.
Apple’s unexpected-sleep page also sends you to Activity Monitor → CPU for background processes that may be preventing sleep. That CPU view is load, not the assertion list.
How to read sleep and wake history with pmset -g log
pmset -g log prints a history of sleeps, wakes, and other power management events. man pmset calls that log an admin and debugging tool.
pmset -g log
The store path printed at the top of a run on this Mac was /var/log/powermanagement. Lines are timestamped. Event names observed here include Sleep, Wake, WakeDetails, Notification, and Assertions.
A trimmed pair checked in this Mac’s log, with date, time, and trailing details omitted:
Sleep Entering DarkWake state due to 'Clamshell Sleep'
Wake DarkWake to FullWake from Deep Idle [CDNVAB] : due to Notification Using AC
Use the log when the Mac slept and you want the time and the stated reason. Use pmset -g assertions when the Mac is still awake and you want the current holder. Use pmset -g assertionslog when you want creations and releases as they happen.
man pmset also documents pmset -g stats for sleep and wake counts since boot and pmset sleepnow for immediate system sleep. Counts provide history, while sleepnow deliberately puts the Mac to sleep and can interrupt work. A forced sleep does not test whether an idle-sleep assertion was working; use the assertion listing to identify the holder.
Questions
How do I see what is keeping my Mac awake?
Run pmset -g assertions in Terminal. macOS lists each process that holds a power assertion, and those assertions can prevent system sleep or display sleep.
What does PreventUserIdleSystemSleep mean?
PreventUserIdleSystemSleep stops the Mac from sleeping automatically after a stretch of idle user activity. The display may still dim. Lid close, the Apple menu, and low battery can still put the Mac to sleep.
Why does my Mac sleep when an app says it is keeping it awake?
A menu bar status is not proof of a sleep-preventing assertion. Check pmset -g assertions for that app or its helper, then check other holders and sleep settings before deciding whether the Mac can idle sleep.
How does Napless check what is keeping a Mac awake?
Napless shows honest status in the menu. Check Health and the napless doctor command inspect keep-awake, protection, assertions, and incidents while Napless is running.
What does pmset -g log show?
pmset -g log prints a history of sleeps, wakes, and other power management events. man pmset calls that log an admin and debugging tool.


