Warning icon
MacPaw stands with Ukraine. Here’s how you can help our country win with just several clicks.

How to turn off sleep mode on Mac

8 min read

If there’s one thing that MacBook owners always want more of, without doubt, it’s battery life. Even though the latest MacBooks can give you up to 21 hours of web browsing or video playback, the more you use your Mac the more your battery capacity will gradually decrease, until you’ll eventually have to keep it plugged in practically all the time. 

The good thing is there are quite a few third-party tools that let you extend your battery life and, by default, your Mac comes with some great solutions for preserving your battery for as long as possible too. One of them is Sleep Mode. 

Let’s explore what Sleep Mode on Mac is, how to use it, and how to prevent Mac from sleeping when you need it to be turned on at all times. 

What’s sleep mode on Mac? 

You’ve probably noticed that when you don’t use your Mac for a minute or two, the display would become slightly dimmed. Your screensaver will then be activated shortly and probably stay on for another 10 minutes. Finally, the screen will go completely black. That’s Sleep Mode. 

Sleep Mode essentially stops all your visible Mac activity but keeps the vital processes going. That’s how it differs from a complete shut down. In Sleep Mode, your Mac is still able to check your Mail app in the background, for example. And once you click on the screen or hit any key, the computer will wake up instantly, without any loading process. 

Generally, sleep mode works perfectly for what it’s intended to do: saving battery while you’re away from your MacBook. Sometimes, however, it could interfere with what you’re doing. For example, you could be comparing a spreadsheet with a physical report or downloading something, which requires your Mac to stay awake. Using your keyboard to wake your Mac up could be annoying, especially if your screen auto-locks as well.

So how to keep Mac from sleeping? There are a few ways. 

How to stop Mac from sleeping 

Since sleep mode is one of the built-in features on your Mac, you can control how it’s activated. The process will differ depending on your macOS version. 

How to keep MacBook from sleeping on macOS Big Sur and Monterey

Big Sur and Monterey have two sets of settings — Battery and Power Adapter — that help control sleep mode, based on whether your Mac is plugged in or not. Both can be found in System Preferences > Battery. 

stop mac from sleeping

To prevent your Mac from sleeping when it’s disconnected from power, go to the Battery section of your Battery settings, and drag the “Turn display off after” slider to Never.  

If you want to keep your Mac from sleeping when it’s plugged in, go to Power Adapter in the Battery settings and check the box next to “Prevent your Mac from automatically sleeping when the display is off.” Then, move the slider to adjust the ‘Turn display off after” setting. 

prevent mac from sleeping

There’s one caveat, though. If you leave your Mac connected to power and awake for long periods of time, its battery will start deteriorating over time. There’s lots of evidence that MacBooks live longer if you don’t keep them 100% charged and plugged in at all times. In fact, Macs seem to be the healthiest when they operate at 40-60% charge.  

AlDente Pro can help protect your battery, while you’re taking care of your daily tasks. You don’t have to fiddle with its settings every time — just set up the charging limit, so your battery stops charging when that limit is met. And yes, it stops charging even if your Mac is plugged in! It’s a great tool to complement sleep mode. 

aldente pro mac

How to make Mac not sleep on macOS Catalina and older

On older operating systems, there’s an option in your System Preferences called Energy Saver. Just as on modern macOS, it has the Battery and Power Adapter sections, so it’s just a slightly different UI. There’s a slider for inactivity time after which the screen will be turned off and a few checkboxes you might want to pay attention to: 

  • Put hard disks to sleep when possible
  • Slightly dim the display while on battery power
  • Enable Power Nap while on battery power
  • Prevent computer from sleeping automatically when the display is off (Power Adapter only). 

energy saver mac sleep turn off

The options are pretty self-explanatory. Power Nap means allowing your Mac to back up to Time Machine and check email, calendar, and iCloud while asleep. It’s recommended that you keep all the boxes checked to preserve your battery. 

Summing up, if you’re wondering “why does my Mac keep going to sleep?” It’s only because the “Turn display off after” slider is set to some specific time. The easiest way to stop your Mac from sleeping is to move that slider all the way to the right (in Battery and Power Adapter tabs) to Never and click OK when asked to confirm. 

How to seamlessly control Mac sleep 

While you now know how to stop Mac from sleeping by using Energy Saver, it’s not the best option when you only want your Mac not to sleep for the next hour, for example, but act in normal, battery-friendly mode the rest of the time. Coming back to the Battery menu and tweaking the slider every time is just too burdensome. We suggest using Lungo instead. 

Lungo is like a shot (or a few) of espresso for your Mac. This simple utility lives in your menu bar and is the perfect answer for how to change sleep time on Mac. Just click on its icon and choose the time for which you wish to keep your Mac awake, whether it’s 10 minutes, four hours, or indefinitely. You can stop the app at any time as well by clicking on its icon again and selecting Deactivate. Now you don’t need to open Battery settings at all. 

Here’s how to make your Mac stay awake with Lungo: 

  1. Click the Lungo icon in the menu bar
  2. Choose for how long your Mac should stay awake
  3. That’s it! Your Mac is well-caffeinated now.  

lungo macos

How to prevent Mac from going to sleep when closing the lid

Your Mac is designed to sleep when its (eyes?) lid is closed. That’s natural. When the lid is closed, your Mac fairly assumes that you’re not working, so it can take a nap, too. While sleeping, your Mac can charge faster and conserve energy, so you can pick up where you left off once you get back to work. 

In some cases, you might need to keep it on, though — for example, when you connect your MacBook to another monitor but don’t want to keep it “open” all the time. Luckily, you can do that by tweaking your Power Adapter settings:

  1. Go to System Preferences > Battery > Power Adapter
  2. Select “Prevent computer from sleeping automatically when the display is off”
  3. Move the slider to Never. 

Now, if your Mac is connected to an external monitor with its lid closed, it won’t turn off. 

How to prevent Mac from sleeping with Terminal

Another way to fine-tune when your Mac goes to sleep and when it doesn’t is by using Terminal:  

  1. Open Terminal from your Applications folder
  2. Type caffeinate -d to prevent your Mac from sleeping
  3. Press Enter to activate

Here are some other commands you can run instead:  

  • caffeinate -i will cancel idle sleeping
  • caffeinate -m will stop the disk from going idle
  • caffeinate -s will keep your Mac awake while it’s plugged in
  • caffeinate will prevent your Mac from going to sleep while Terminal is running or until you press Control + C
  • caffeinate -t 1800 (or any number) will make sure your Mac is awake for the number of seconds you specified

All commands will stay active for as long as the Terminal session is running.

How to schedule sleep on your Mac

If you’re using your Mac as a data dashboard or other real-time monitoring solution daily, you also have an option of setting your MacBook sleep and active times using a predefined schedule.  

Here’s how to turn off sleep mode on Mac at certain times: 

  1. Open System Preferences > Battery
  2. Choose Schedule
  3. Check the box for “Start up or wake”
  4. Select Sleep, Restart, or Shut Down from the dropdown
  5. Pick the frequency and set the exact times as needed
  6. Click OK.

schedule sleep mac

Now you won’t have to remember to manually adjust your Mac’s sleep and awake settings. But since your Mac is going to be using its battery more actively now, you’ll also benefit from a solution that will extend the length of its cycles.  

Endurance is an automatic MacBook battery enhancer. With no input from your side, it magically grants your MacBook up to 20% longer life on every battery cycle. Endurance does so by tweaking some energy-intensive but non-vital aspects of your Mac, such as dimming the display slightly, turning off Turbo Boost, hiding background apps, pausing certain services, and so on. You can simply set Endurance to turn on as soon as your battery level drops below a certain percentage and then just forget about it.  

How to optimize your Mac

While knowing how to keep Mac from sleeping and extend its battery life using Endurance is great, you can also make your Mac more energy-efficient by getting rid of everything that clogs its systems and overloads its CPU. Think of all the cache files, user logs, launch agents, mail attachments, and uninstalled applications that drag your Mac performance down. Good news is you can get your Mac back in shape in just one click. 

CleanMyMac X is the world’s leading optimization software for your Mac. It not only scans your system and optimizes the use of your Mac’s resources but also identifies any malware, updates your software, and suggests which files you might want to delete based on the last time you’ve used them. In other words, it’s a complete and user-friendly optimization solution at your fingertips. 

cleanmymac x optimize mac

As you can see, learning how to change sleep time on a Mac isn’t difficult. You can do so manually with Battery settings or Terminal, or you can use Lungo as an automated solution. Just don’t forget to get Endurance to extend your battery life, AlDente Pro to set up charging limits, and optimize your system regularly with CleanMyMac X.

AlDente Pro, Lungo, Endurance, and CleanMyMac X are available to you absolutely free for seven days via a trial of Setapp, a productivity service with plenty of Mac and iPhone tools to help solve your daily tasks. 

Get 240+ Mac apps for any job

Sign up to Setapp and try them for free.