Mac won't sleep, or Sleep is greyed out? Find what keeps it awake

By Matyas Rathonyi. Published November 15, 2026. Guides

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.

SleepDisabled1 means sleep is off for the whole Mac
AssertionsName the process holding sleep
SharingShared services can hold sleep
No sudoTo read; only changes need it

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.

A terminal checks SleepDisabled and finds 0, then reads the sleep line and finds sleep prevented by caffeinate, then lists assertions and finds caffeinate holding PreventUserIdleSystemSleep. $ pmset -g | grep SleepDisabled SleepDisabled 0 $ pmset -g | grep " sleep " sleep 1 (prevented by caffeinate) $ pmset -g assertions caffeinate: PreventUserIdleSystemSleep
Setting first, then holders.SleepDisabled is one switch for the whole Mac. If it reads 0, the sleep line and the assertions list name the process that is holding sleep.

Check in this order

  1. Is sleep switched off for the whole Mac? No sudo is needed to read it:
    pmset -g | grep SleepDisabled
    1 means system sleep is disabled. It is set by sudo 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. 0 means the switch is not the cause; go on.
  2. Which processes are preventing sleep? The pmset manual says that whenever processes override the power settings, it lists them in -g and -g assertions. The short version is the sleep line:
    pmset -g | grep " sleep "
    On the Mac this guide was checked on, it named caffeinate, coreaudiod and powerd.
  3. Find the owner of each hold. Run pmset -g assertions and look at the section titled Listed by owning process. Each line starts with a process ID and name, then the kind of hold. The two to look for are PreventUserIdleSystemSleep and PreventSystemSleep. 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."
  4. 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 ttyskeepawake is 1 in pmset -g, the manual says an active remote session prevents idle sleep. Log out of sessions you are done with.
  5. 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".
  6. 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.

Three bars over time. An app's hold lasts while the app keeps working. A caffeinate hold lasts until caffeinate or the process it waits for exits. SleepDisabled 1 keeps going past a restart until you set it to 0. App at work caffeinate SleepDisabled 1 restart
Holds end at different times. A process's hold ends when that process lets go or exits; the caffeinate manual says its assertion lasts until caffeinate, or the process it waits for, exits. SleepDisabled is a saved setting and stays until you set it to 0.

Common holders and how to release them

What holds sleepHow it shows upHow to release it
A leftover sudo pmset disablesleep 1SleepDisabled 1 under System-wide power settings in pmset -gsudo pmset -a disablesleep 0, then check it reads 0 (full steps)
caffeinateA caffeinate process in the assertions list, often "asserting on behalf of" another processPress 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 workingThe app's name in the assertions list, or Yes under Preventing Sleep in Activity Monitor's Energy tabLet the download, export or playback finish, or pause or quit the app
Audiocoreaudiod with a Created for PID lineLook up that PID and stop the playback or recording in that app
A remote loginttyskeepawake 1 and an open SSH or Terminal session from another computerLog out of the session
Shared servicesNot always in pmset; turned on in General, SharingTurn 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:

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:

  1. 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.
  2. Disarm it or quit it. Disarm from the menu bar menu, or quit Clamshell. Normal lid sleep returns when you disarm, quit or restart.
  3. 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

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.