Why Macs sleep in the first place
macOS puts your Mac to sleep when you're not using it. Saves energy, extends battery, reduces wear. There's an idle timer watching for mouse and keyboard input. Long enough without any, the display dims, then the system goes down.
Fine most of the time. The problem: macOS can't tell the difference between "I went to lunch" and "I'm waiting for a 4-hour render."
The usual suspects
If your Mac keeps sleeping when you don't want it to, check these first:
- The display-off timers System Settings โ Lock Screen. A MacBook has two: one on battery, one on the power adapter. If the battery one is set to a couple of minutes, there's your answer. Step-by-step: change the sleep time on a Mac.
- "Prevent automatic sleeping" is off Battery โ Options on a MacBook, Energy on a desktop. Without it, the system sleeps soon after the screen goes dark.
- Lock Screen password delay Separate from sleep. Controls how fast you need a password after the screen goes off.
- Hot Corners Got "Put Display to Sleep" assigned to a corner? You might be triggering it by accident when you park the cursor.
- Power Nap Lets your Mac do background stuff during sleep (email, iCloud). Doesn't prevent sleep, just makes it more productive.
- Scheduled sleep Run
pmset -g schedin Terminal to see if a scheduled sleep time is lurking. It can force sleep even while you're using the Mac.
Mac goes to sleep even though the settings say Never
If the display timers are already at their longest and the Mac still sleeps, the timer isn't what's putting it to sleep. Check these, in order:
- You changed one timer, not both. On a MacBook the battery and power adapter timers are separate. Unplug and the other one applies.
- "Prevent automatic sleeping" is off. The screen stays on, but once it does go off the system follows.
- The lid closed. Closing a MacBook without an external display and power always sleeps it, whatever the timers say.
- A schedule or a profile.
pmset -g schedlists scheduled sleep. A management profile from your company can override the timers: look in System Settings โ General โ Device Management. - Very low battery. macOS sleeps a nearly empty MacBook to protect your work.
To see what is and isn't holding the Mac awake right now, run pmset -g and read the sleep line. Our guide to "sleep prevented by powerd" explains the output.
Quick fixes and why they're limited
Set the display timeout to "Never" in Energy Saver. Works. But it's global. Mac won't sleep until you manually close the lid or put it to sleep. Forget on a laptop and your battery is dead by morning.
On a corporate machine, IT might have locked these settings entirely via MDM. No scheduling, no conditions. All or nothing.
The conditional approach
What you want is a tool that keeps your Mac awake only when specific conditions are met. Shake It On does this. Moves the mouse slightly at regular intervals, resetting the idle timer, but only when your rules say to.
Some examples:
- Awake only during work hours (weekdays, 9-6)
- Awake when plugged in, sleep on battery
- Awake when a specific app is running (Xcode, Handbrake, etc.)
- Pause during video calls (camera detection)
- Pause when Focus/DND is on
Set it up once. Your Mac stays awake when you need it and sleeps when you don't.
Other things that cause unexpected sleep
- Low battery override macOS forces sleep below ~5% battery, no matter what
- MDM/corporate policies IT can lock Energy Saver via a management profile. Check System Settings โ General โ Device Management.
- Clamshell behavior Closing the lid sleeps your Mac unless you have an external display, power, and an external keyboard or mouse all connected
- Thermal throttling Rare, but extreme heat can trigger an emergency sleep to protect hardware