How to Prevent Mac from Sleeping: 4 Methods to Try

Jerome Peng
Last updated: May 29, 2024

In this post, we will explain in detail how to prevent your Mac from sleeping when the display is off or when the lid is closed. Keep reading.

"How can I prevent my MacBook from going into sleep mode during several hours of download?"

- A Question from Reddit.

Did Mac/MacBook go to sleep so fast? This post will introduce how to change Sleep Mode settings to prevent Mac from sleeping so fast.

Stop Mac from sleeping

How to Stop Your Mac from Sleeping

You can adjust settings related to the Sleep mode to stop your Mac from sleeping or keep your Mac running when the lid is closed. Below we'll guide you to change these settings together. Let's get started.

Change Energy Saver Settings

For most Macs/MacBooks, the quickest way to prevent your Mac from sleeping is to change the Energy Saver settings.

Here is how:

  • For desktop Mac:

Go to Apple menu>System Settings>Energy Saver>Enable Prevent automatic sleeping when the display is off.

Mac sleep settings
  • For MacBook Air/Pro:

Go to Apple menu>System Settings>Battery>Options>Prevent automatic sleeping on power adapter when the display is off.

Screenshot: macOS Sonoma 14.2 MacBook Pro

Check Mac System Sleep Settings
Tip
Do you know how to use the screenshot application on a Mac? Are you familiar with how to set up screenshot shortcuts? The article "How to Screenshot on Mac/MacBook (Sequoia/Sonoma/Ventura) - 4 Ways" provides a complete explanation of how to screenshot on a Mac.

Change Lock Screen Settings

  1. Go to Apple menu>System Settings>Lock Screen.
  2. Set Start Screen Saver when inactive "Never".
  3. Set Turn display off when inactive "Never".

Or if you just want to stop Mac from sleeping so fast, select a desired period rather than Never.

Tip
If your Mac gets hot during use, it may be a sign of excessive tasks. Use BuhoCleaner to delete unnecessary files, uninstall resource-consuming apps completely, free up memory, and enhance the speed and responsiveness of your Mac.

Turn Off Sleep Mode via Terminal

For users who are familiar with Terminal, you can prevent your Mac from sleeping by following the steps below:

  1. Open Terminal: Launch Terminal via Spotlight.

  2. Disable Sleep: To prevent your Mac from sleeping, enter the command sudo pmset -a disablesleep 1 and press Enter. You may need to enter your administrator password.

Disable sleep mode Terminal
  1. Enable Sleep: If you want to revert to the default sleep settings, enter the command sudo pmset -a disablesleep 0.

Set Mac Wake from Sleep When Sharing Resources

In the case that you want to stop your Mac from sleeping while sharing resources for a Mac, there is a smarter setting:

Set your computer to wake from sleep when other users access those resources.

  • For macOS Sequoia, Sonoma, and Ventura:
  1. Click on the Apple menu ➜ System Settings.
  2. If using a MacBook, click on Battery in the sidebar ➜ click on Options ➜ Wake for network access.
Set Mac wake for network access
  • For macOS Monterey/Big Sur/Catalina/Mojave/High Sierra:

Click on the Apple menu ➜ System Preferences ➜ Energy Saver ➜ Wake for network access ➜ Uncheck Wake for network access.

Besides preventing Mac from sleeping, there are many other sleep mode-related settings you may want to change.

Disable "Allow Bluetooth Devices to Wake this Computer"

On macOS Big Sur 11.0 and earlier, you can wake Mac using Bluetooth devices. If you don't want your Mac to wake from sleep with a Bluetooth keyboard or mouse, follow these steps:

  • Click on the Apple menu ➜ System Preferences ➜ Bluetooth.
  • Click on Details ➜ unselect Allow Bluetooth devices to wake this computer.

Conclusion

Are you clear about how to stop Mac from sleeping now? Go and practice these methods!

Jerome is a passionate enthusiast of all things Apple. He is expertise in crafting tech-related articles, with a portfolio of more than 100 articles covering various Apple products like the iPhone, iPad, and Mac.