Back to Blog
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
September 27, 2026
November 3, 2026
5 min read
Share:
mac
macos
sleep
pmset

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.

A Mac that keeps going to sleep is almost always following its display timer. On current macOS, when the display turns off for inactivity, the Mac itself goes to sleep about a minute later. On battery that timer is often very short: the MacBook we tested for this page turns its display off after 2 minutes on battery. To fix it, open System Settings > Lock Screen and set Turn display off on battery when inactive and Turn display off on power adapter when inactive to a longer time. On a laptop plugged in, also turn on System Settings > Battery > Options > Prevent automatic sleeping on power adapter when the display is off. If the Mac sleeps even while you use it, or the settings are greyed out, read the reason in the power log first, below. If you keep the Mac awake for a green Slack dot, Slack Green keeps that dot green from a server even while the Mac sleeps, free for 7 days with no card.

If you keep your Mac awake so Slack stays green, an awake Mac is not enough. With nobody touching the Mac, Slack still shows you away after 10 minutes.

The opposite problem, a Mac that will not sleep, is in why is my Mac not going to sleep.

Find out why your Mac went to sleep

macOS writes every sleep and wake to a power log, with the reason. Open Terminal and run:

# every sleep in the log, with the reason macOS recorded
pmset -g log | grep "Entering Sleep"

Each line reads like this real one from a MacBook Pro (Mac14,5, M2 Max, macOS 26.5):

2026-09-26 23:34:35 +0900 Sleep  Entering Sleep state due to 'Clamshell Sleep':TCPKeepAlive=active Using AC (Charge:80%) 30 secs

The part in quotes is the reason. To count the reasons over the whole log, which covers about a week:

pmset -g log | grep -oE "due to '[^':]+" | sort | uniq -c | sort -rn
 169 due to 'Maintenance Sleep
  31 due to 'Sleep Service Back to Sleep
   4 due to 'Clamshell Sleep
   2 due to 'Software Sleep pid=396
Reason in the logWhat happenedFix
Idle SleepNo keyboard or mouse input until the timer ran outLengthen the display timer, or use caffeinate
Clamshell SleepThe lid was closedUse closed-lid mode, see below
Software SleepAn app, a hot corner or you chose Sleep; the pid is the processCheck hot corners and the app with that pid
Low Power SleepThe battery ran lowPlug in
Maintenance Sleep, Sleep Service Back to SleepThe Mac woke briefly in the background and went backNormal, nothing to fix

Most lines in a normal log are Maintenance Sleep: the Mac wakes in the dark for Power Nap, network upkeep or backups and goes straight back. Those are not what you notice. Look for Idle Sleep and Clamshell Sleep near the time the Mac slept on you.

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.

Check your sleep timers

The timers live in pmset. Run:

pmset -g custom

This is the battery section from the same MacBook:

Battery Power:
 displaysleep         2
 sleep                1
 disksleep            10

displaysleep 2 turns the display off after 2 minutes without input. sleep 1 means the Mac sleeps about a minute after that. So this MacBook sleeps roughly 3 minutes after you stop typing on battery. On power it waits for its 10-minute display timer.

Fix it in System Settings

Every sleep setting and where it lives on each macOS version is in how to change sleep settings on a Mac.

  • Lengthen the display timer. Open System Settings > Lock Screen. Set Turn display off on battery when inactive and Turn display off on power adapter when inactive to the time you want, or Never on power.
  • Keep a plugged-in laptop awake with the display off. Open System Settings > Battery > Options and turn on Prevent automatic sleeping on power adapter when the display is off. On a desktop Mac the same switch is under System Settings > Energy.
  • Separate the screen lock from sleep. In Lock Screen, Require password after screen saver begins or display is turned off sets when you need your password. A long display timer with a short password delay keeps the Mac awake but locked.
  • Check hot corners. In System Settings > Desktop & Dock > Hot Corners, a corner set to Put Display to Sleep sends the Mac to sleep whenever the pointer touches it. This is a common cause of "Software Sleep" in the log.
  • Turn off Low Power Mode to test. System Settings > Battery > Low Power Mode. It reduces energy use and can make a MacBook feel quicker to dim.

The Mac also sleeps whenever you close the lid, unless it is in closed-lid mode: connected to power, an external display, and an external keyboard or mouse. The setup is in keep a laptop awake with the lid closed.

Keep the Mac awake from Terminal

For a download, a render or a long call, macOS includes caffeinate. It keeps the Mac awake until you press Control-C:

# keep the display and the Mac awake until Control-C
caffeinate -d

# keep the Mac awake for one hour (3600 seconds), display may sleep
caffeinate -i -t 3600

To change the timers themselves from Terminal, use pmset with -b for battery and -c for the charger:

# display off after 15 minutes on battery, 30 on power
sudo pmset -b displaysleep 15
sudo pmset -c displaysleep 30

Setting sleep 0 stops system sleep completely. Use it on a desktop Mac, not on a laptop you carry, because a laptop that never sleeps drains its battery in a bag. Menu bar apps such as Amphetamine and KeepingYouAwake do the same as caffeinate with a timer and a switch; they are compared in KeepingYouAwake vs Amphetamine.

Settings greyed out: your company controls the timer

On a work Mac, a configuration profile from your IT department can set the display timer and the screen lock, and the settings appear greyed out or reset after you change them. Check System Settings > General > Device Management. If a profile is listed there, the short timer is a security policy, and the fix is to ask IT. Keep-awake apps may still keep the Mac awake, but the lock may still come on; the same policy on Windows is explained in why your computer locks after 15 minutes, and Mac options are in keep your Mac screen from locking.

FAQ

Why does my Mac go to sleep after 2 minutes? Its battery display timer is set to 2 minutes, and the Mac sleeps a minute after the display turns off. Change it in System Settings > Lock Screen.

Why does my MacBook go to sleep when I close the lid with an external monitor? Closed-lid mode needs the charger connected and an external keyboard or mouse as well as the display.

Why does my Mac sleep while I am watching a video? Video players normally keep the display awake. If the log says Idle Sleep, the app did not ask; if it says Software Sleep, check hot corners.

Does my Mac need to stay awake for Slack to show me active? No. Slack shows you away after 10 minutes without keyboard or mouse input, awake or not. Keep Slack active on Mac covers the options.

Related Articles

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
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