sodcalculator

10 Tech How-To

MacBook Sleep Mode: How to Turn It Off

Guide 10-32839 · Updated · Step by step

To turn off sleep mode on a MacBook, open System Settings (or System Preferences on older macOS), go to Battery (or Energy Saver), and set both “Turn display off on battery when inactive” and “Turn display off on power adapter when inactive” to “Never.” You can also use the caffeinate command in Terminal to temporarily prevent sleep without changing your settings.

Why Your MacBook Sleeps (and Why You Might Want to Stop It)

macOS puts your MacBook to sleep for two main reasons: to save battery power and to protect the display from burn-in. When your Mac sleeps, the screen turns off, active processes pause, and the system enters a low-power state. This is great for extending battery life between charges, but it can be annoying if you’re downloading a large file, giving a presentation, or using your Mac as a media server. In those cases, you want the display to stay on and the system to stay awake.

How to Turn Off Sleep Mode in System Settings (macOS Ventura and Later)

On recent versions of macOS, the sleep settings live in the Battery pane of System Settings. Here’s how to change them:

  1. Click the Apple menu ( ) in the top-left corner and select System Settings.
  2. Click Battery in the sidebar.
  3. Click the info button (i) next to Options (or scroll down to the “Battery Health” section and click Options).
  4. Drag the sliders for “Turn display off on battery when inactive” and “Turn display off on power adapter when inactive” to Never.
  5. You can also uncheck “Prevent automatic sleeping on power adapter when the display is off” if you want to keep the display on but allow the system to sleep. To completely disable sleep, leave this checked and set both sliders to Never.

After this, your MacBook will not sleep automatically, even when the lid is closed (though closing the lid with an external display connected has special behavior—see below).

How to Turn Off Sleep Mode in System Preferences (macOS Monterey and Earlier)

If your Mac runs macOS Monterey or earlier, the steps are slightly different:

  1. Open System Preferences from the Apple menu.
  2. Click Energy Saver.
  3. Drag the “Turn display off after” slider to Never for both “Battery” and “Power Adapter” tabs.
  4. If you want to prevent the Mac from sleeping entirely (not just the display), uncheck “Put hard disks to sleep when possible” and check “Prevent computer from sleeping automatically when the display is off”.

Using Terminal: The caffeinate Command

If you only need to prevent sleep temporarily—say, for a long download or a presentation—the caffeinate command is a clean solution. It doesn’t change your system settings and stops as soon as you close the terminal window or press Ctrl+C.

  • caffeinate -d prevents the display from sleeping.
  • caffeinate -i prevents the system from idle sleeping.
  • caffeinate -s prevents the system from sleeping on AC power (works only when plugged in).
  • caffeinate -t 3600 keeps the Mac awake for 3600 seconds (1 hour) and then stops.

You can combine flags, e.g., caffeinate -d -i -t 7200 keeps the display and system awake for two hours. To stop it early, press Ctrl+C in the Terminal window.

What About Closing the Lid? (Clamshell Mode)

Simply setting the sleep sliders to Never does not prevent sleep when you close the lid. On a MacBook, closing the lid almost always triggers sleep unless you have an external display, keyboard, and mouse connected and the Mac is plugged into power. This is called clamshell mode. To use it:

  1. Connect an external display, keyboard, and mouse (or a USB hub with these).
  2. Plug your MacBook into a power adapter.
  3. Close the lid. The external display stays on and the Mac remains awake.

If you want to close the lid without an external display and keep the Mac running, you can use a third-party app like Amphetamine (free on the App Store) or the caffeinate command with -d and -u flags, but this may cause overheating because the keyboard area is covered. It’s generally not recommended for prolonged use.

Common Problems and Fixes

Even after changing settings, some users find their Mac still sleeps. Here are the usual culprits:

  • Battery settings are separate: Make sure you set the sliders for both “Battery” and “Power Adapter”—they are independent.
  • App Nap: Some apps (like Safari) have a feature called App Nap that slows down background processes. You can disable it per-app by right-clicking the app icon in the Dock, selecting Get Info, and checking “Disable App Nap”.
  • Power Nap: On older macOS versions, Power Nap lets your Mac wake periodically to check email and updates. It doesn’t cause full sleep, but it can wake the display. Disable it in Energy Saver settings if it bothers you.
  • External devices: A USB device or Bluetooth peripheral can wake your Mac. Use the pmset -g assertions command in Terminal to see what’s keeping it awake.
  • System updates: After a major macOS update, settings sometimes revert. Check your sleep settings again after updating.

Frequently Asked Questions

Does turning off sleep mode damage my MacBook?

No, not directly. Running your Mac continuously is fine as long as it has adequate ventilation. However, leaving the display on at full brightness for days can cause screen burn-in on older LCD models and reduce the lifespan of the backlight. It also drains battery faster, so you’ll need to keep it plugged in.

Why does my MacBook still sleep after I set it to Never?

Check that you changed the setting for both battery and power adapter. Also, if you’re using a third-party app like caffeinate, it may override your settings. Finally, some system processes (like a forced logout or a critical thermal event) can still put the Mac to sleep for safety.

Can I set a custom sleep time instead of Never?

Yes, just drag the slider to a specific time (e.g., 15 minutes, 1 hour). The slider offers preset intervals, but you can also use the pmset command in Terminal to set a custom value in minutes: sudo pmset -a displaysleep 30 sets the display to sleep after 30 minutes.

Will closing the lid always put my MacBook to sleep?

Yes, unless you’re in clamshell mode with an external display, keyboard, and mouse connected and the Mac is plugged in. There is no built-in setting to change this behavior—it’s a hardware design choice.

How do I turn sleep mode back on?

Simply go back to the same settings and drag the sliders to a time other than Never. The default is usually 10 minutes on battery and 30 minutes on power adapter.

What’s the difference between “display sleep” and “system sleep”?

Display sleep just turns off the screen; the Mac continues running. System sleep puts the entire Mac into a low-power state, pausing all processes. The sliders in System Settings control display sleep; to control system sleep, you need to use the checkbox “Prevent automatic sleeping…” or the pmset command.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →