Run pmset -g in Terminal: a SleepDisabled 1 line means system sleep is switched off for the whole Mac, and the sleep line names every process that is preventing sleep right now. Turn SleepDisabled off with sudo pmset -a disablesleep 0, quit the processes that pmset -g assertions lists, then check Sharing and Wake for network access in System Settings.
This guide is written by Matyas Rathonyi, who makes Clamshell for Mac, an app that keeps a Mac awake on purpose; it is one of the things this guide shows you how to check and turn off. Everything else here is built into macOS and free. The check order follows Apple's own troubleshooting page and the pmset manual, and every command below that reads a setting was run on an Apple silicon MacBook Pro with macOS 27.2 on November 15, 2026. The output is real, trimmed, with IDs removed. No settings were changed for this guide.
Check in this order
- Is sleep switched off for the whole Mac? No sudo is needed to read it:
pmset -g | grep SleepDisabled1means system sleep is disabled. It is set bysudo pmset disablesleep 1, a common tip for running a MacBook with the lid closed, or by a keep-awake app that uses the same switch, and it stays set until something sets it back to 0. Follow how to undo sudo pmset disablesleep 1, then come back if the Mac still stays awake.0means the switch is not the cause; go on. - Which processes are preventing sleep? The
pmsetmanual says that whenever processes override the power settings, it lists them in-gand-g assertions. The short version is thesleepline:
On the Mac this guide was checked on, it namedpmset -g | grep " sleep "caffeinate,coreaudiodandpowerd. - Find the owner of each hold. Run
pmset -g assertionsand look at the section titledListed by owning process. Each line starts with a process ID and name, then the kind of hold. The two to look for arePreventUserIdleSystemSleepandPreventSystemSleep. The table below says how to release the common ones. Without Terminal, open Activity Monitor, click Energy, and sort by the Preventing Sleep column, which Apple describes as "Whether this app is preventing your Mac from going to sleep." - Check sharing and remote sessions. Apple says people using shared services on your Mac, such as a shared printer or shared files, can prevent it from sleeping. Open System Settings, click General, then Sharing, and turn off the services you do not use. An open SSH or other remote login also counts: when
ttyskeepawakeis 1 inpmset -g, the manual says an active remote session prevents idle sleep. Log out of sessions you are done with. - Check the sleep timers. Apple's page sends you to System Settings, Lock Screen, for the "Turn display off" timers, and to Battery settings to turn off "Prevent automatic sleeping on power adapter when the display is off".
- Work through Apple's remaining causes. Apple lists apps that access a disk (it names Music), Spotlight indexing ("your Mac won't go to sleep" while it indexes), malfunctioning USB or Thunderbolt devices, and stray key presses or clicks. On a Mac with Apple silicon, Apple's advice for power issues is to restart it.
What the output looks like
This is pmset -g on the Mac this guide was checked on (macOS 27.2), trimmed to the lines that matter here:
System-wide power settings:
SleepDisabled 0
Currently in use:
powernap 1
sleep 1 (sleep prevented by caffeinate, coreaudiod, [...], powerd)
ttyskeepawake 1
womp 1
And the matching part of pmset -g assertions, with IDs and long names shortened and lines wrapped to fit:
Assertion status system-wide:
PreventUserIdleSystemSleep 1
PreventSystemSleep 0
Listed by owning process:
pid 26309(caffeinate): 00:51:36
PreventUserIdleSystemSleep
named: "caffeinate command-line tool"
Details: caffeinate asserting on behalf
of Process ID 25946
pid 539(coreaudiod): 00:43:01
PreventUserIdleSystemSleep
named: "com.apple.audio.AudioTap-...
.context.preventuseridlesleep"
Created for PID: 714.
When the owner is a helper such as caffeinate or coreaudiod, the on behalf of Process ID or Created for PID field points at the program that asked. Look it up with ps -p 25946 -o comm=, using the number from your own output.
Common holders and how to release them
| What holds sleep | How it shows up | How to release it |
|---|---|---|
A leftover sudo pmset disablesleep 1 | SleepDisabled 1 under System-wide power settings in pmset -g | sudo pmset -a disablesleep 0, then check it reads 0 (full steps) |
caffeinate | A caffeinate process in the assertions list, often "asserting on behalf of" another process | Press Control-C in the Terminal window running it, or quit the program it waits for; its manual says the hold ends when that process exits |
| An app that is working | The app's name in the assertions list, or Yes under Preventing Sleep in Activity Monitor's Energy tab | Let the download, export or playback finish, or pause or quit the app |
| Audio | coreaudiod with a Created for PID line | Look up that PID and stop the playback or recording in that app |
| A remote login | ttyskeepawake 1 and an open SSH or Terminal session from another computer | Log out of the session |
| Shared services | Not always in pmset; turned on in General, Sharing | Turn off the services you do not use |
If it is the lid that does nothing
Apple lists closing the display as one way to put a Mac laptop to sleep, so a closed MacBook that keeps running has something overriding that. Besides SleepDisabled, there are two common reasons:
- Apple's closed-display setup. With an external display connected, Apple's support article says a closed Mac laptop should be "connected to power and using an external keyboard and mouse". In that setup it is meant to stay awake. Disconnect the display, or choose Sleep from the Apple menu.
- A keep-awake app that works with the lid closed. Several apps do this, including Clamshell for Mac (next section). Check your menu bar for one and end its session.
If Clamshell for Mac is installed
Clamshell keeps a Mac awake on purpose. While it is armed, closing the lid does not put the Mac to sleep, and idle sleep does not interrupt work either. Here is how to tell and how to stop it:
- Look at the menu bar icon. An armed or paused session changes the color of Clamshell's menu bar icon. Arming with a right-click stays on until you turn it off; opening the lid does not end it.
- Disarm it or quit it. Disarm from the menu bar menu, or quit Clamshell. Normal lid sleep returns when you disarm, quit or restart.
- Turn off the modules that arm by themselves. With Always On While Plugged In, Home Server, Arm While an App Runs, Arm on a Wi-Fi Network, Arm on a Schedule or Arm When a Drive Connects turned on, Clamshell arms again by itself later, and the Keep Awake module keeps the Mac awake with the lid open. Each has its own switch in the Modules section of Clamshell's Settings.
If it sleeps, then wakes up by itself
That is a different problem: the Mac does sleep, and something wakes it. Apple names Wake for network access first. On a Mac laptop it is in System Settings, Battery, Options; Apple's fix is to choose Never. On macOS 26, the same Options sheet also has Enable Power Nap, which Apple says has the Mac check for email, calendar and other iCloud updates while sleeping; Apple's macOS 27 Battery settings page no longer lists it. To see when and why your Mac woke, read pmset -g log, which the manual describes as the history of sleeps and wakes. The guide on battery drain while asleep walks through that log line by line.
Frequently asked questions
Why is Sleep greyed out on my Mac?
Apple has no support page about a greyed-out Sleep item, so check the setting that switches system sleep off for the whole Mac first. Run pmset -g | grep SleepDisabled in Terminal. If it reads 1, it was set by sudo pmset disablesleep 1 or by a keep-awake app that uses the same switch, and sudo pmset -a disablesleep 0 turns sleep back on. If it reads 0, look at what pmset -g assertions lists as preventing sleep.
Why won't my Mac sleep when I close the lid?
Apple lists closing the display as a way to put a Mac laptop to sleep, so something is overriding it. The usual causes are SleepDisabled set to 1, Apple's closed-display setup (an external display with power, keyboard and mouse connected), or a keep-awake app that works with the lid closed, such as Clamshell for Mac while it is armed.
How do I see what is preventing my Mac from sleeping?
Run pmset -g assertions in Terminal. The top half counts each kind of sleep hold, and the list below names the process that owns each one. pmset -g also shows a short version on its sleep line. Without Terminal, open Activity Monitor, click Energy and look at the Preventing Sleep column.
Do I need sudo to check why my Mac won't sleep?
No. Reading settings with pmset -g, pmset -g assertions and pmset -g log works without sudo. The pmset manual says it must run as root only to modify settings, for example to undo disablesleep.
Does restarting fix a Mac that won't sleep?
A restart ends the processes that were holding sleep, and Apple suggests it on Apple silicon Macs for power issues. It does not reliably clear SleepDisabled, which is a saved setting, so check pmset -g | grep SleepDisabled after the restart.
Related guides
- How to undo sudo pmset disablesleep 1
- What pmset disablesleep does on a Mac
- MacBook battery drains overnight while asleep? Check for DarkWake
- Why caffeinate does not keep a Mac awake with the lid closed
- How keep-awake apps work with the lid closed
Sources checked November 15, 2026: Apple's If your Mac sleeps or wakes unexpectedly, Activity Monitor energy, Battery settings (macOS 26), Put your Mac to sleep or wake it and external display troubleshooting; the pmset(1) and caffeinate(8) manual pages on macOS 27.2. Output shown was captured on that Mac the same day. Clamshell behavior is described from its published facts. Clamshell is an independent app, not affiliated with or endorsed by Apple.