Back to Blog
Guide

Why Is My Mac Not Going to Sleep? Find the Cause in One Command

Run pmset -g in Terminal. The sleep line names every app that is keeping your Mac awake right now, such as a browser tab playing audio, a Zoom call or Amphetamine. How to read it, the settings that keep a Mac awake on purpose, and how to find what wakes a sleeping Mac at night.

Slack Green Team
September 26, 2026
November 3, 2026
5 min read
Share:
mac
macos
sleep
pmset
troubleshooting

Reading on your phone?

Run the idle test on your computer

Slack sets you away on your computer, so this free test runs there. Send yourself this page and press Start at your desk.

Your Mac is not going to sleep because an app or a system service is holding a sleep assertion, a request that tells macOS to stay awake. To see which one, open Terminal and run pmset -g. The sleep line ends with "sleep prevented by" and a list of process names. The usual ones are coreaudiod (something is playing audio, often a browser tab or a video call), a browser, Zoom or Teams during a call, sharingd (Handoff or AirDrop), Time Machine, and keep-awake apps such as Amphetamine or caffeinate. Close the app, stop the audio, or turn off the setting, and the Mac sleeps on its normal timer. If you keep the Mac awake only so Slack stays green, you can let it sleep: Slack Green keeps your dot green from a server while the Mac sleeps, free for 7 days with no card.

Keeping a Mac awake does not keep Slack green by itself: with nobody touching it, an awake Mac still shows you away in Slack after 10 minutes.

Why is my Mac not going to sleep: pmset -g lists what prevents sleep, such as coreaudiod, a browser playing audio, sharingd and Amphetamine

Find what is keeping your Mac awake

Run this in Terminal. It needs no admin password:

# the sleep line lists every process that is blocking sleep right now
pmset -g | grep -i sleep

This is real output from a MacBook that refused to sleep:

 sleep                1 (sleep prevented by powerd, coreaudiod, coreaudiod, sharingd, Amphetamine, Helium)
 displaysleep         10 (display sleep prevented by Amphetamine)

Two apps are playing audio (coreaudiod appears once per audio stream), Handoff is active (sharingd), Amphetamine is holding the Mac and the display awake, and a browser (Helium) holds its own assertion. powerd with "Prevent sleep while display is on" is normal and goes away when the display sleeps.

For details, list the assertions with their names and how long each has been held:

pmset -g assertions
pid 404(coreaudiod): [...] 00:26:31 PreventUserIdleSystemSleep named: "com.apple.audio...preventuseridlesleep"
    Created for PID: 87244.
pid 660(sharingd): [...] 00:09:22 PreventUserIdleSystemSleep named: "Handoff"
pid 847(Amphetamine): [...] 242:29:48 PreventUserIdleSystemSleep named: "Amphetamine (Single-Use - System)"
pid 42972(Helium): [...] 00:02:51 NoIdleSleepAssertion named: "Playing audio"

The Created for PID line under coreaudiod names the app that owns the audio. Look it up with ps -p 87244 -o comm=. Without Terminal, open Activity Monitor, choose the Energy tab, and look at the Preventing Sleep column.

Keeping the Mac awake does not keep Slack green, because Slack sets you away 10 minutes after your last keyboard or mouse input. A server-side tool keeps your Slack dot green with no input, even while the laptop sleeps or the lid is closed.

The usual causes, and the fix for each

Common reasons a Mac will not sleep and the fix: audio, calls, keep-awake apps, Handoff, backups, Battery options, external devices
What pmset showsCauseFix
coreaudiodAudio or video is playing, even muted, often a background tabPause the video or close the tab
Browser name, "Playing audio"A page holds a wake lockClose the tab
zoom.us, Microsoft Teams, SlackA call or huddle is openLeave the call
Amphetamine, caffeinate, KeepingYouAwakeA keep-awake app or command is onTurn it off, or press Ctrl+C in Terminal
sharingdHandoff, AirDrop or screen sharingUsually clears by itself; turn off Handoff in General > AirDrop & Handoff
backupdTime Machine is backing upLet it finish
mds, mds_storesSpotlight is indexingLet it finish, often after an update
Only powerdNothing is blocking; check the settings belowSee the next section

A keep-awake command you forgot is easy to miss. caffeinate started in a Terminal tab keeps the Mac awake until that tab closes; caffeinate on Mac covers its flags. Menu bar apps such as Amphetamine, compared in the best apps to keep a Mac awake, can have triggers that turn them on by themselves, for example while a certain app runs or while on power.

Settings that keep a Mac awake on purpose

If pmset shows nothing unusual, check the settings. On a MacBook, open System Settings > Battery > Options; on a desktop Mac, System Settings > Energy:

  • • Prevent automatic sleeping on power adapter when the display is off. When on, the Mac never sleeps while plugged in. Turn it off.
  • • Wake for network access. Lets the Mac wake for file sharing, Find My and remote access. Set it to Only on power adapter or Never.
  • • Enable Power Nap. Lets the Mac wake briefly for mail and backups while asleep.
  • Then check System Settings > Lock Screen: Turn display off when inactive controls when the display sleeps, and the Mac follows a few minutes later. On the Terminal side, pmset -g shows the same values: sleep 0 means system sleep is off, and displaysleep is the display timer in minutes.

    A sleeping Mac keeps waking up

    Read why a sleeping Mac woke up: pmset -g log shows Wake and DarkWake lines with the reason, such as a USB-C plug, Wi-Fi, a calendar alarm or maintenance

    A Mac that goes to sleep and then wakes, often at night, logs every wake with a reason:

    # the last 20 wakes, with what caused them
    pmset -g log | grep -E "DarkWake from|Wake from|DarkWake to FullWake" | tail -20

    A "DarkWake" is a short wake with the display off, for maintenance or network work. A real wake reads "DarkWake to FullWake ... due to UserActivity". Reasons you will see:

  • • wifi or bt: a network or Bluetooth device. Turn off Wake for network access, and disconnect Bluetooth devices you do not use.
  • • USB-C_plug or USB: a charger, dock or USB device was plugged in or changed state.
  • • Maintenance or DHCP lease renewal: normal short DarkWakes; they do not turn the display on.
  • • A calendar or app alarm: pmset -g sched lists scheduled wakes.
  • Still not sleeping

  • Restart the Mac. It clears assertions left behind by apps that crashed.
  • Disconnect external displays, docks and USB devices, then test again. Some docks and USB audio interfaces hold the Mac awake.
  • On a work Mac, check for a device-management profile in System Settings > General > Device Management. Company policy can set sleep and lock times.

For the opposite problem, keeping a Mac awake on purpose, see how to keep a Mac screen from locking. If your Mac sleeps too soon instead, see Mac keeps going to sleep.

FAQ

What is keeping my Mac awake? Run pmset -g in Terminal and read the "sleep prevented by" list, or check the Preventing Sleep column in Activity Monitor's Energy tab.

Why does my Mac not sleep when a video is paused? Some players and browser tabs keep the audio stream open while paused, so coreaudiod holds an assertion. Close the tab or quit the player.

Does a mouse jiggler stop my Mac from sleeping? Yes. Any input resets the idle timer, so a jiggler or a jiggler app keeps the Mac awake while it runs.

Related Articles

Guide

Mac Keeps Going to Sleep? Find the Reason, Then Fix the Timer

A Mac that keeps going to sleep usually has a short display timer: when the display turns off, the Mac sleeps about a minute later. On battery the default can be 2 minutes. How to read the exact reason in pmset -g log, the System Settings that control it, and Terminal commands for when you need the Mac awake.

Slack Green Team
Guide

How to Change Sleep Settings on a Mac (Ventura to Tahoe)

On macOS Ventura and newer, the Mac's sleep timer is its display timer: set it in System Settings > Lock Screen, under Turn display off on battery and on power adapter when inactive. The Mac sleeps about a minute after the display turns off, unless you turn on Prevent automatic sleeping in Battery > Options, or in Energy on a desktop Mac. Every setting, where it lives by macOS version, and the pmset commands.

Slack Green Team
Guide

pmset disablesleep: Keep a Mac Awake With the Lid Closed, and Undo It

sudo pmset -a disablesleep 1 stops all system sleep on a Mac, lid closed included, and sudo pmset -a disablesleep 0 turns normal sleep back on. How to check whether it is on, why it outlives a restart, and the pmset and caffeinate commands to use instead.

Slack Green Team