How to Prevent Your Mac from Sleeping

The best way to prevent your Mac from sleeping is Shake It On, a menu bar app that uses mouse movement to reset the idle timer. Unlike changing Energy Saver to 'Never,' it only keeps your Mac awake when specific conditions are met.

The problem

macOS wants your Mac to sleep. It's aggressive about it. 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 System Settings → Energy Saver (or Battery on laptops). You can drag the "Turn display off after" slider all the way to "Never." 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.

Note
Energy Saver is a global on/off switch. It doesn't know anything about what you're doing or when you need your Mac awake.

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.

Shake It On lives in your menu bar and uses organic mouse movement to prevent sleep. Set it once and forget it. Get Shake It On for $9.99

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: If your IT department has locked Energy Saver settings via MDM, you can't change them. Mouse movement works anyway because macOS treats it as normal user input.
  • 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.

Tip
Grant Accessibility permission when prompted during setup. Shake It On needs it to generate mouse movement events. After that, it runs quietly in the background with no dock icon.

Frequently Asked Questions

Can I prevent sleep only during certain hours?
Yes. Shake It On has a schedule feature that lets you set specific hours and days of the week. Outside those times, your Mac sleeps normally.
Will this work if my IT department locked the settings?
Yes. Shake It On uses mouse movement, which macOS treats as real user activity. It bypasses MDM-locked Energy Saver settings.
Keep your Mac awake the easy way.
Shake It On lives in your menu bar and uses organic mouse movement to prevent sleep. Set it once and forget it.
Get Shake It On for $9.99
One-time purchase. No subscription. Free updates forever.