Mac Keeps Going to Sleep: Causes and Fixes
Find out why your Mac keeps going to sleep: Lock Screen timers, hidden pmset schedules, auto log-out, the lid, low battery and paused keep-awake apps.
TroubleshootingUpdated 9 min read
On this page
A Mac that keeps going to sleep is usually following its own timers. The display turns off when the Lock Screen timer runs out. A laptop then goes to sleep soon after, unless Prevent automatic sleeping on power adapter when the display is off is turned on. To fix it, open System Settings, lengthen the display timer in Lock Screen, and turn on that option in Battery (or the matching option in Energy on a desktop Mac).
If those settings look right, work through the checks below in order: hot corners, hidden pmset schedules, automatic log-out, the lid, low battery, and keep-awake apps that have paused or stopped.
Why your Mac keeps going to sleep: match the symptom
| What you see | Most likely cause | Section to check |
|---|---|---|
| Screen goes black, but music or a download keeps going | Display sleep | Lock Screen timers |
| Screen goes black, and downloads and connections have stopped when you return | System sleep after the display turns off | Battery or Energy options |
| Screen goes dark when the pointer touches a screen corner | Hot corner | Hot corners |
| Mac sleeps at the same time every day | A repeating pmset schedule | Scheduled sleep |
| You return to the login window and your apps have closed | Automatic log-out | Automatic log-out |
| MacBook sleeps when you close the lid, or when the battery is nearly empty | Lid or battery | Lid and battery |
| A keep-awake app was on and the Mac slept anyway | The app paused, stopped, or is set to Manual | Keep-awake app |
Check whether it's display sleep or system sleep
Display sleep turns off only the screen. The Mac keeps running, so audio plays, downloads continue, and a key press brings the screen back at once (possibly at the lock screen). System sleep stops everything. Downloads pause, network connections drop, and apps freeze until you wake the Mac.
The power log records why the Mac went to sleep. This read-only command shows the last 20 sleeps:
pmset -g log | grep "Entering Sleep" | tail -n 20Each line has a time and a reason in quotes. Idle Sleep means a timer ran out. Clamshell Sleep means the lid closed. Software Sleep means something asked the Mac to sleep, such as the Apple menu or an app. You may also see other reasons logged after the Mac wakes briefly in the background. The log is long, so the command can take a few seconds.
To see your current timers, run this read-only command:
pmset -gdisplaysleep and sleep are in minutes, and 0 means never. If an app is holding the Mac awake right now, the sleep line says "sleep prevented by" and names it.
Check the Lock Screen timers
This is the most common cause.
- Open System Settings and click Lock Screen in the sidebar. If you don't see it, type "Lock Screen" into the search field.
- On a MacBook, set Turn display off on battery when inactive and Turn display off on power adapter when inactive. On a desktop Mac, set Turn display off when inactive.
- Check Start Screen Saver when inactive too. A screen saver isn't sleep, but if Require password after screen saver begins or display is turned off is set to a short time, coming back to a locked screen can look like waking from sleep.
A longer timer is usually a better choice than Never, which leaves the screen lit whenever you walk away.
Check the Battery or Energy options
On a laptop, the display timer also drives system sleep. Once the screen is off, the Mac sleeps soon after unless you tell it not to.
- Open System Settings and click Battery.
- Click Options….
- Turn on Prevent automatic sleeping on power adapter when the display is off.
This applies only on power. There's no matching switch for battery, so a laptop on battery sleeps after the display turns off.
On a desktop Mac, the setting is Prevent automatic sleeping when the display is off, in Energy (called Energy Saver in older macOS versions). On any Mac, if the option isn't where you expect, type "automatic sleeping" into the System Settings search field.
While you're in the Battery pane, look at Low Power Mode. It trades performance for battery life. If the problem only shows up with Low Power Mode on, set it to Never while you need the Mac to stay up. If you can't find it, search for "Low Power Mode".
If any of these settings are grayed out, the Mac is usually managed by an organization. Ask your IT team.
Check hot corners
A hot corner can turn off the display the moment the pointer touches a screen corner, which is easy to do by accident.
- Open System Settings and click Desktop & Dock.
- Scroll to the bottom and click Hot Corners….
- If a corner is set to Put Display to Sleep or Start Screen Saver, change it to the dash (no action), or move the action to a corner you don't brush past.
Check scheduled sleep with pmset -g sched
macOS can sleep, shut down or restart on a schedule set with pmset. Since macOS 13, System Settings has no screen for these schedules, so one set years ago, by a script, or by an IT tool can keep running without you knowing. The clue is a Mac that sleeps or shuts down at the same time every day.
To list scheduled power events, run this read-only command:
pmset -g schedRepeating events are listed with their days and time. One-off events show a full date. A one-off event fires once and is then gone, so a daily sleep almost always comes from a repeating event.
The next command deletes every repeating power event. Copy the pmset -g sched output first if you might want it back. It asks for your administrator password:
sudo pmset repeat cancelTo undo it, recreate the schedule with sudo pmset repeat, using the times you saved (man pmset lists the exact syntax). If the schedule comes back after you remove it, a management profile or script is setting it. On a work Mac, ask IT.
Check automatic log-out
Automatic log-out looks like sleep, but it's worse: you return to the login window and your apps have quit.
- Open System Settings and click Privacy & Security.
- Scroll to the bottom and click Advanced….
- Turn off Log out automatically after inactivity, or set a longer time.
If you can't find it, type "log out automatically" into the System Settings search field.
Check the lid and the battery
- The lid: closing a MacBook's lid puts it to sleep. The exception is clamshell mode, when the Mac is on power with an external display connected. Blocking idle sleep (what
caffeinate -ior a normal Glowmoth session does) doesn't change this. See using a MacBook with the lid closed for the setup. - The battery: when a laptop's battery runs critically low, macOS puts it to sleep whatever is keeping it awake. Plug in.
Check whether a keep-awake app has paused or stopped
Keep-awake tools such as caffeinate -i or -d and Glowmoth's normal sessions stop idle sleep only. They don't stop lid sleep, low-battery sleep, Sleep in the Apple menu, or a scheduled pmset sleep.
If you use Glowmoth, Option-click the moth icon in the menu bar to open the panel (a plain click works too, unless you set left-click to toggle), and read the header. Then check these causes:
- The panel says Paused. A safety limit released every reason at once. By default, Pause on low battery kicks in below 20% while on battery, and Pause when the Mac is running hot is on. The panel says why, for example "Paused at 19% battery. Will resume when you plug in." Plug in or let the Mac cool down. To override the pause for 30 minutes, click Resume Anyway (30 min). Both limits are in Settings ▸ Safety; see battery and heat safety limits.
- The panel is set to Manual. Manual ignores everything except a session you started yourself: rules, apps, processes, folders, coding agents, scheduled runs and command-line leases. Switch the panel's Automatic | Manual control back to Automatic, or turn on Keep awake automatically in Settings ▸ Automation.
- You clicked Stop Everything. This ends your session and suspends all automatic reasons until you start a session again. Nothing in the panel shows that they're suspended. Start a session, or quit and reopen Glowmoth.
- Your session ended. A timed session stops at its end time. Two settings end a session early: End the session when the screen locks and Stop the session when switching to battery. Also check Settings ▸ Sessions ▸ When a Session Ends ▸ Then. If it's set to Sleep the Mac, the Mac sleeps when the last reason runs out on its own.
- Only the screen goes dark. If Keep Display On is off, or Let the screen saver start when I'm away is on, Glowmoth keeps the Mac awake and lets the display sleep. That's expected.
- The trial has ended. The panel says "Your trial has ended. Enter a MacSuite license to keep your Mac awake." Without a valid license or trial, Glowmoth keeps nothing awake.
In the panel, click Show More to open Also Keeping This Mac Awake. Under the list of other apps, it flags the traps covered above: "Scheduled to sleep/shut down/restart at …" (a one-off schedule within 24 hours), "Set to sleep every day … at …" (a repeating schedule) and "Logs out after N minutes of inactivity." More fixes are in Troubleshooting Glowmoth.
Keep it awake only when you need to
If you want the Mac to stay awake whenever it's plugged in, you don't need an app. Use the Battery or Energy option above and set a longer display timer. Mac sleep settings explained goes through each option.
To keep the Mac awake for one job, the built-in caffeinate command is free. This keeps the display and the Mac awake until you press ⌃C (Control-C) in that Terminal window:
caffeinate -dThis keeps the Mac awake for two hours (7,200 seconds) and lets the display sleep:
caffeinate -i -t 7200Neither command changes a setting; the effect ends when the command stops or the time runs out. The catch is that it lives in a Terminal window you have to keep open. The caffeinate command guide covers more flags.
Glowmoth puts this in the menu bar. You can choose a duration (15 minutes to 8 hours by default), a clock time such as 18:00, or Indefinitely. It can also stay awake while an app runs, a download finishes or a rule is true, and the panel always says why the Mac is awake. It needs macOS 14 or later. Glowmoth is part of MacSuite, and you can try it free for 7 days. For other ways to do this, see how to stop your Mac from going to sleep.
When to contact Apple or your IT team
Get help if the power log still shows sleeps you can't explain after you've ruled out everything above. First, start up in safe mode or log in to a new user account. If the problem goes away there, a login item or other third-party software is the likely cause.
On a work Mac, contact IT first, since a management profile can enforce sleep and log-out settings. Otherwise, contact Apple Support. Tell them:
- your Mac model and macOS version
- the output of
pmset -gandpmset -g sched - the "Entering Sleep" lines from the power log, with their times
For a Glowmoth problem, contact our support. Include the text in the panel header and what you expected to happen.
If your problem is the opposite, see Mac won't sleep.