How to stop your Mac from sleeping in System Settings
On current macOS (Sonoma, Sequoia, Tahoe and later) the sleep controls are split across two places:
- Open System Settings and click Lock Screen.
- Set "Turn display off on battery when inactive" and "Turn display off on power adapter when inactive" to a longer time. A desktop Mac has one display timer.
- On a MacBook, click Battery, then Options, and turn on "Prevent automatic sleeping on power adapter when the display is off."
- On an iMac, Mac mini or Mac Studio, click Energy and turn on "Prevent automatic sleeping when the display is off."
Still sleeping after that? Something else is in charge, like a schedule, a management profile or a low battery. The guide to why your Mac keeps going to sleep covers each one. Why your Mac keeps going to sleep
The problem
macOS wants your Mac to sleep. It's aggressive about it. Whether you're on a MacBook or a desktop Mac, after a few minutes of no mouse or keyboard activity, the display dims. A few minutes after that, the whole system sleeps. Downloads pause. Remote sessions disconnect. Renders halt mid-frame.
Apple designed it this way on purpose. Sleep saves battery and reduces component wear. But when you're in the middle of something that takes time, sleep isn't helpful. It's destructive.
Why changing your settings doesn't really work
The first thing most people try is the built-in timer: System Settings โ Lock Screen, set the display-off timers to their longest value, then turn on "Prevent automatic sleeping" (Battery โ Options on a MacBook, Energy on a desktop). That stops sleep entirely.
The problem is it stops sleep entirely. Your Mac won't sleep when you walk away for the night. It won't sleep when you close the lid and toss it in your bag. You have to remember to change it back, and you won't.
Shake It On: conditional sleep prevention
Shake It On takes a different approach. Instead of telling macOS not to sleep, it moves your mouse slightly at regular intervals. macOS sees genuine user activity and resets the idle timer. Your Mac stays awake because, as far as it can tell, you're still using it.
The key part is the conditions. You don't just turn it on and leave it. You tell Shake It On when to run:
- Only when plugged into power
- Only when a specific app is running
- Only during work hours on weekdays
- Only when connected to Wi-Fi
- Pause when the camera is on or Focus mode is active
Your Mac stays awake when you need it to and sleeps normally the rest of the time. You set the conditions once and forget about it.
How it works
Shake It On lives in your menu bar. When your conditions are met, it moves the cursor with smooth sine-wave motion every few seconds (you pick the interval and distance). The movement is subtle enough that it won't disrupt what you're doing but enough for macOS to register it as real activity.
This approach has a few advantages over system-level sleep prevention:
- Corporate environments: Shake It On doesn't change any settings your IT department manages. It moves the mouse, and macOS sees real input. Check your company's rules first.
- Remote desktop: VNC, Screen Sharing, and TeamViewer use their own idle timers. System sleep prevention doesn't affect those. Mouse movement does.
- Messaging apps: Slack and Teams set your status based on mouse and keyboard activity. System-level sleep prevention won't keep you "active." Mouse movement will.
It requires macOS 14 or later, works on both Intel and Apple Silicon, and costs $9.99 one-time. No subscription.