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:
- Energy Saver / Battery settings System Settings โ Energy Saver (desktop) or Battery โ Options (laptop). "Turn display off after" slider. If it's set to a few minutes, there's your answer.
- Lock Screen settings Separate from sleep. Controls how fast you need a password after the screen dims.
- 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 Check if there's a scheduled sleep time lurking in Energy Saver. Can force sleep even while you're actively using the Mac.
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 actually 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 โ Privacy & Security โ Profiles.
- 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