Guide

Why won't my Mac stay asleep? How to find what keeps waking it

Your Mac wakes by itself or won't stay asleep. Here's how to read the wake reason with pmset -g log, find the process holding it awake with pmset -g assertions, and fix the usual culprits.

You put your Mac to sleep, and minutes later the fan spins or the screen flickers on. Or it simply refuses to sleep at all. macOS keeps a detailed record of why it woke and what is holding it awake - you just need two commands to read it. Here’s how to find the culprit and shut it up.

Step 1: what is holding the Mac awake right now?

If the Mac won’t sleep, something is holding a power assertion. List them:

pmset -g assertions

Near the bottom, under “Listed by owning process,” you’ll see which app is responsible, e.g.:

pid 543(Music): [...] PreventUserIdleSystemSleep named: "com.apple.music.playing"
pid 981(AwakeMate): [...] PreventUserIdleSystemSleep named: "AwakeMate: Auto (claude)"

That tells you exactly who to blame - a browser tab playing audio, a download, a caffeinate you forgot, or a keep-awake app doing its job. (If it’s AwakeMate, that’s expected while a watched tool runs; it releases when the work stops.)

Step 2: why did it wake?

If it keeps waking from sleep, read the sleep/wake log and look for the wake reason:

pmset -g log | grep -i "wake"

You’ll see lines like:

Wake from Standby due to RTC (Alarm)
Wake from Standby due to EC.LidOpen/Lid Open
Wake from Standby due to WiFi (Network)

The reason in parentheses is the smoking gun:

  • RTC (Alarm) - a scheduled wake (pmset repeat/schedule) or Power Nap. Check pmset -g sched.
  • Network / WiFi - Wake for network access (Wake on Demand).
  • USB / a device name - a mouse, keyboard, or dock nudging it.
  • EC.LidOpen - you (or a bag) opened the lid.

Step 3: fix the usual culprits

Most self-waking Macs come down to a handful of settings. Check current values with pmset -g, then:

Wake for network access (womp / Wake on Demand) - the Mac wakes to answer network requests:

sudo pmset -a womp 0

Power Nap - periodic wakes to fetch mail, sync iCloud, and run Time Machine:

sudo pmset -a powernap 0

TCP keep-alive - on some Macs this keeps waking to hold network connections (turning it off can affect Find My / push while asleep):

sudo pmset -a tcpkeepalive 0

Remote-login sessions - an open SSH session can keep the Mac awake (ttyskeepawake):

sudo pmset -a ttyskeepawake 0

Bluetooth devices - “Allow Bluetooth devices to wake this Mac” lives in System Settings under Bluetooth (Advanced); a twitchy mouse is a classic offender.

Scheduled events - if the wake reason was RTC, review and clear schedules:

pmset -g sched
sudo pmset repeat cancel

Step 4: re-check

After a change, put the Mac to sleep and read the log again:

pmset -g log | grep -i "wake" | tail -5

The wake-reason lines will tell you whether the change stuck.

When “won’t sleep” is actually intended

Sometimes the Mac is doing exactly what you asked. If pmset -g assertions shows a keep-awake tool (or caffeinate) holding PreventUserIdleSystemSleep, that’s the point - it’s keeping the Mac up while real work runs. The trick is only holding it while the work is happening, not around the clock.

That’s what AwakeMate is for: instead of a blanket “never sleep,” it holds the assertion only while the apps and tools you choose are active - and shows up in pmset -g assertions with a clear reason like “AwakeMate: Auto (claude)” so you always know why the Mac is up. When the work stops, the assertion drops and normal sleep resumes.

For the broader picture, see why your Mac sleeps during long tasks and the full pmset guide.

Let your Mac stay awake on its own

AwakeMate keeps your Mac awake only while the tools you care about are running - builds, AI agents, renders, downloads - then lets it sleep. No commands to remember. Free 14-day trial.