Mac laptops automatically sleep when you close the lid, or they fall asleep due to inactivity. However, sometimes Mac goes to sleep if you are downloading files or have left them alone for some time. This feature saves battery, and that is one thing that all apple users want more.

The sleep mode on Mac prevents your battery from degrading quickly. But if you’re frustrated by your Mac which keeps sleeping, then this article might help you.

Sleep Mode: Your Mac’s Energy Saver

Before we learn how to keep Mac from sleeping, let’s read up a little on its sleep mode.

Once you stop using your Mac for some minutes, the display becomes a little dim. After this, your screensaver activates and stays on for about ten minutes. Sleep mode is an energy saver for your Mac.

If you leave it a little bit longer, the screen will go black. This process is called sleep mode. 

Sleep mode halts all activity but keeps the background processes on. This is why your Mac is not entirely shut down but rather just asleep.

If you press a key or move your mouse, the screen will immediately light up.

The sleep mode effectively saves the battery. However, it could hinder your research work. For example, if you’re noting down something from your MacBook or it could interfere with some other tasks such as transferring data or copying files.

Waking your Mac to turn the display on can be nerve-racking, so you should know how to keep your Mac awake. It’s also beneficial to understand how to manage Mac’s system preferences.

How to Prevent Computer from Sleeping by Changing System Preferences 

In your system preferences, there is an option called energy saver. To make changes check your MacBook settings.

  • Start by clicking the apple logo at the top left of your desktop. You can also search system preferences in the spotlight search option.
  • Open system preferences. From here, click on energy saver, which has an icon of a light bulb. In these settings, enable the first option, which says “prevent the computer from sleeping automatically” when the display is off.
  • Next, disable the checkbox for “put hard disks to sleep when possible.”

These two settings will prevent your MacBook from sleeping. Another option includes “Enable power nap while on battery power.”

All these options help to preserve the battery. Making these changes will work with MacBook Air, MacBook Pro, or any apple computer and prevent them from sleeping.

How to Control Mac Sleep and Wake Settings

You can set sleep settings for your Mac. You can select a specified time after which your Mac goes to sleep. For example, if you choose a specified time of ten minutes, your Mac will sleep after ten minutes of inactivity.

To specify sleep settings, choose the Apple menu. Navigate to system preferences and click energy saver.

You have to click on change settings. This will open a window of network settings in system preferences.

From here, you set the time for your Mac to wait before it goes to sleep.

  • Drag the display sleep slider.
  • Drag the computer sleep slider.

You can also set specific options to keep your mac awake. For example, you can select “wake for Bluetooth connectivity or network access.” 

You can also set prescribed days on which your Mac follows its sleep and wake routine. You can change it to specific days or just every day. 

Setting Your Mac’s Sleeping Schedule

You can set a sleep schedule if you do not want to manually adjust your Mac’s sleep mode.

This predefined schedule can help you a lot if you use your MacBook daily. 

  • To set up a regular schedule, launch settings. 
  • Go to system preferences and open energy saver.
  • Click schedule and mark the box for “startup or wake.”
  • Select sleep and set the time as you need before clicking OK.

How to Completely Turn Off Sleep Mode

If you wish to turn off sleep mode on your MacBook completely, you must follow these steps. 

  • Click the apple logo at the top left of your screen.
  • Select system preferences. 
  • Open energy saver. 
  • Look for a turn display off slider.
  • Slide this to never. 

These settings will prevent your Mac from sleeping.  

Using Terminal to Turn Off Sleep Mode Temporarily

You can temporarily turn off sleep mode by using a command called “caffeinate.”

The sleep mode will stay off for as long as the terminal window is open. 

To use the terminal, follow these steps:

  • Go to Application. 
  • Click on Utilities.
  • Type caffeinate in terminal and press Enter.

After applying this command, your Mac will stay awake for as long as the terminal window is open.

When you close the window, a notification will appear on your screen. If you click “close,” your Mac will sleep automatically. 

Is It OK to Disable Sleep Mode Permanently? 

Sleep mode is vital to preserving the battery. It also minimizes apps and limits your background processes.

In the long run, this also saves your battery health.

Temporarily turning off sleep mode helps you to work, and it is safe to do so. However, if you want to preserve your battery health, it is advisable to keep sleep mode.

How to Keep MacBook from Sleeping with the Lid Closed?

Do you want to continue with a download with the lid closed? Or do you want to install your favorite game overnight? 

But as soon as you close the lid of a MacBook, the system goes to sleep instantly. 

Closing the lid makes the MacBook sleep even if you select “never go to sleep” from system preferences. 

Therefore, some third-party apps allow you to keep your Mac running even with the lid closed to avoid this. 

You can download insomnia, an app from the Mac apple store. This will keep your Mac from sleeping when you close the lid. 

Caffeinated and amphetamine are other utilities that you can download from the mac apple store to prevent Mac from sleeping.   


It is effortless to change sleep time on Mac. It only requires changing a couple of settings to keep your Mac from going to sleep.

However, if your Mac crashes every time it goes to sleep automatically, check apple support for further information.