Guides about Mac sleep
Plain answers, the built-in macOS way first. Every command was run on a real Mac before it went on these pages.
- Why won’t my Mac sleep? How to find the app keeping it awakeFind out which app or process stops your Mac from sleeping, with Activity Monitor or pmset in Terminal, and what to do about each one.
- How to keep your Mac awake without changing its sleep settingsThree ways to stop a Mac from sleeping for a while: the caffeinate command, the sleep settings in System Settings, or a menu bar app that turns itself off when the job is done.
- caffeinate on Mac: keep it awake from TerminalWhat the built-in caffeinate command does, its flags (-i, -d, -s, -u, -t, -w) with examples, how to check it’s working, and when it isn’t enough.
- Keep your Mac awake until a Terminal command or AI agent finishesLong builds, ffmpeg encodes and AI coding agents stop when the Mac sleeps. How to keep it awake exactly as long as the command runs, and let it sleep afterwards.
- How to keep your Mac awake while a big download finishesWhy large downloads stop overnight, how to keep the Mac awake until the file is done, and how to tell from Finder that a download is still in progress.
- Why your MacBook battery drains overnightA MacBook that loses a lot of charge while “asleep” is usually awake: an app holding it, a wake for network access, or Power Nap. How to find out which, with the Mac’s own power log.
- Why your Mac wakes up from sleep by itselfHow to read the reason for every wake in the macOS power log, what the common reasons mean, and which settings stop the ones you don’t want.
- Can a MacBook stay awake with the lid closed?Closing the lid puts a MacBook to sleep unless it’s in closed-display mode. What closed-display mode needs, what keep-awake apps can and can’t do, and the heat risk.
What keeps a Mac awake
Every process you might see in pmset -g assertions, what it means and what to do: the full list.