By default, macOS is designed for maximum power efficiency. It tries to preserve energy as much as possible to prolong your battery life. As a result, when you stop using your Mac for a certain amount of time, it automatically goes to sleep.

It's impractical to tweak the energy settings for every small task. You don't want the display or computer going to sleep during a presentation, while viewing live stats, or downloading a large file, for example. So we'll show you some ways to stop Mac from sleeping and keep it awake whenever you need to.

1. Energy Saver Preferences

energy saver options Mac desktop

macOS has built-in energy saver tools to customize how long your computer should wait before turning off the screen and going to sleep. To adjust these energy-related settings, open the Apple menu and go to System Preferences > Energy Saver or Battery.

For MacBooks, the Battery tab controls your Mac's behavior while running on battery and the Power Adapter tab controls its behavior when plugged. Drag the Turn display off after slider to Never and click OK from the popup that appears.

When you select Optimized Battery Charging in System Preferences > Battery, macOS intelligently chooses when to charge above 80 percent to help preserve battery health in the long run. To learn more, read about optimized battery charging on Apple devices and the way it works.

You can set the display settings to Never, but make sure to restore them in the default state. If you always keep the display on, your battery life will suffer and you may need a replacement battery sooner than usual. Check out our list of apps to monitor and improve your MacBook's battery life.

For desktop Mac models, like the iMac or Mac mini, you won't have separate tabs, but you will have almost the same controls, including a pair of sliders that control sleep times for your computer and display. Also, select Prevent computer from sleeping automatically when the display is off.

2. KeepingYouAwake

keepingyouawake utility to keep your Mac awake

KeepingYouAwake is a menu bar app based on the caffeinate command-line tool, designed to prevent your desktop Mac or MacBook from sleeping. It's a suitable replacement for the now-defunct Caffeine app. The app lets you choose from multiple preset options, including keeping your Mac awake for 5, 10, 15, or 30 minutes.

After installing, Control-click the menu bar icon and choose Activate for Duration > Indefinitely or for a certain period. You can add your custom preset and choose to automatically deactivate the app if the battery level falls below a particular threshold. It's also possible to automatically activate the app when you connect an external screen to your Mac.

Download: KeepingYouAwake (Free)

3. Lungo

lungo utility to prevent your Mac from sleeping

Lungo is a modern menu bar app to keep your Mac awake. It comes with a built-in dark theme to match macOS's dark mode. On launch, the app provides you with a concise list of pre-defined periods to stave off sleep.

Instead of just being a menu bar tool, you can control Lungo using anything that supports opening a URL with a custom scheme, shell scripts, shortcuts built into macOS Monterey, and a Terminal app. The Shortcuts app makes it possible to automate endless tasks. Read our guide to learn how to use Shortcuts for Mac.

For example, run the following command to activate the app for 10 minutes:

$ open --background 'lungo:activate?minutes=10'

In the same way, type in the following to activate Lungo for 1 hour and 30 minutes.

$ open --background 'lungo:activate?hours=1&minutes=30'

The app supports commands like activate, deactivate, or toggle and parameters like hours and minutes. You can configure the app to launch automatically or pause when the screen gets locked.

Download: Lungo ($2.99)

4. Sleep Control Centre

sleep control centre app to keep your Mac awake

Sleep Control Center is probably the only app that gives you fine controls on whether to allow or prevent sleep under various states or conditions. At its most basic, the app keeps your Mac awake under specific working conditions.

The icon in the status bar displays the current state: if you see open eye in the menu bar which means your Mac will not enter the sleep mode.

In system sleep mode, the display turns off, but the system continues to work. When you close the laptop lid, your Mac will automatically sleep. You can set a timer from the list of pre-defined sessions to configure the sleep mode according to your preferences.

You can also choose to activate the app on different events. For example, when you're giving a presentation, when you connect an external disk, when the battery reaches a critical level, and more. Or prevent sleep even when you shut the laptop lid when connected to a power adapter. It's also possible to set up a Hot Corner action to activate the app, fade the display, launch a screensaver, lock the screen, or deactivate sleep.

While the app is powerful with thorough parameters and pre-defined conditions, the lengthy menu structure makes the interface convoluted. It'll take you some time to figure out all the options and decide what works best.

Download: Sleep Control Center ($5.99, free trial available)

5. Amphetamine

amphtamine utility to prevent Mac from sleeping

Amphetamine is a utility app that can prevent your Mac from sleeping for a certain duration or in certain situations you define. The app is based on the principle of "sessions." To get started, Control-click the menu bar icon and choose a default duration (set to Indefinitely by default).

Or, you can select a situation to ensure your Mac keeps running until the task gets completed. For example, when you're running a particular app to monitor a task, downloading a file, or transferring data to an external drive.

The app offers you a robust set of configuration options. Head to Preferences to customize the app as per your needs. You can create a trigger by defining a set of criteria. Navigate to Preferences > Triggers and check Enable Triggers. Give your criteria a name and click the plus (+) button. From the list that appears, choose an option and proceed.

You can bind several triggers together for more specific workflows.

Since the App Store app is sandboxed, it cannot get a list of every app and process running on your Mac. Amphetamine Enhancer is a helper tool that gives you the ability to use all running processes with Triggers and app-based sessions. The app lets you customize the appearance, change notification parameters, view sleep mode statistics, and more.

Download: Amphetamine (Free)

6. Wimoweh

wimoweh advanced utility to prevent your Mac from sleeping

Wimoweh is a powerful app that provides a detailed view of processes and power assertions that the system has created to prevent sleep. The feature is built into macOS, in which any app can invoke power assertions if they need to prevent the system from going to sleep.

If your Mac stays awake when you don't want it to, use this app to find the rogue process. Go through our guide on Activity Monitor to learn about processes.

The app can prevent your Mac from sleeping by choosing different criteria. You can set a timer, create a per-process schedule for a duration, or choose when a service on another machine is running, say SMB or SSH.

To get started, go through the list of apps with two checkboxes. Tick the Prevent System Sleep to ensure that your Mac does not sleep when an app is running and check the Allow Display Sleep to specify if the display will sleep to preserve energy.

Download: Wimoweh ($1.99)

Take Notice of Your Mac's Warning Signs

Your Mac should not go to sleep when you're in the middle of completing a task. The apps mentioned above will let you keep your Mac awake and configure standby times precisely based on your preferences.

But sometimes, your Mac may face a unique set of problems. It may happen that your machine goes to sleep too fast or stays awake at all times. If this is happening to you, check your logs and take notes before it becomes a major issue.