How to Not Let MacBook Pro Sleep When Lid Closed with External Monitor

This site contains affiliate links. As an Amazon Associate, We earn a commission from qualifying purchases at no extra cost to you.

The sleep function on your MacBook Pro is a handy way to conserve the battery when you aren’t actively using it. But sometimes it goes to sleep when you don’t want it to, like when you connect it to a monitor and close the lid. 

You can stop your MacBook Pro from going to sleep when you close the lid while connected to an external monitor by adjusting settings in Energy Saver in System Preferences (System Settings on macOS Ventura and above). 

I’m Jon, a Mac guru, and owner of a 2019 MacBook Pro. I routinely connect my MacBook to external displays and close the lid. And when I first did this, I had to change some settings to stop it from going to sleep. 

So, I put together this guide to help you keep your MacBook Pro awake while you work on an external display. Keep reading to learn how. 

The Quickiest Method

There are several ways to get the job done, but the one I’m showing below is the easiest.

Step 1: Click The Apple Logo 

To start, open the Apple menu. Click on the Apple logo in the top left corner of your screen. Select “System Preferences (System Settings on macOS Ventura and above)” beneath “About This Mac” in the drop-down menu.

Step 2: Open Battery

In the “System Preferences (System Settings on macOS Ventura and above)” window, locate the “Battery” icon. It is a green battery icon, usually near the bottom of your screen. Click open it.

Step 3: Go To The Power Adapter Tab

Once the “Battery” window opens, switch to the “Power Adapter” tab. You can find this tab on the left of the window next to “Battery.” Click on it to adjust the settings.

Step 4: Change The Settings

Now, your last step is to change the settings. Adjust the “Turn display off after” slider to “Never.” This tells your computer to remain on without a specified timeout period. 

Alternatively, you can check the box that says “Prevent your Mac from automatically sleeping when the display is off” to prevent it from sleeping when you close the lid. 

Now even when the lid is closed, your Mac will remain on until you change these preferences or click the Apple logo in the top left and select “Sleep.” 

Step 5: Check Your Work

Check your handiwork by testing the setting change. Ensure your Mac is connected to a power source and an external mouse, keyboard, and monitor. Then, close the lid of your MacBook and see if it stays awake. 

Alternative Method 1: Use the Caffenate Command in Terminal 

Another easy way to keep your MacBook Pro awake while the lid is closed is using the caffeinate command in Terminal.

First, open Terminal in Launchpad, type “caffeinate“ into the command prompt, and hit Return.

As long as the Terminal window is open, your MacBook Pro will not go to sleep. However, you will need to run this command every time before closing your Mac’s lid. 

Alternative Method 2: Install an App to Prevent Sleep

Changing the settings should do the trick to keep your MacBook on while connected to an external monitor. However, if you want to keep your Mac on for other reasons when it’s not connected to an external monitor, you might consider installing an app to prevent it from sleeping while you’re inactive.

For instance, if you have something downloading but need to transport your Mac, you’ll need it on with the lid closed for safe transportation. 

Or, perhaps, you want to listen to music without the bright display glaring back at you. Whatever your reasons might be, an app might be your best bet. 

A few apps designed to keep your Mac from sleeping when the lid is closed include:

However, these apps do exactly what Terminal’s simple “caffeinate” command does. But, if you prefer an app, these three are highly rated.


While the sleep function is an excellent feature to promote your MacBook’s battery health, it can sometimes be a nuisance. Thankfully, switching the settings in Battery, installing an app, or using the caffeinate command is quick and easy. 

After a few simple steps, you’ll be ready to use your external monitor without keeping your MacBook Pro’s lid open. 

Which method did you use to keep your MacBook Pro awake? Let us know in the comments!

About Jonathon Jachura
Jonathon is a mechanical engineer with over ten years of experience. He is an Apple fan who currently holds a Macbook Pro (512 GB, 16GB RAM), iPad Pro 12.9", iPhone 11 Pro Max, Apple Watch 3, and 4x Acer 23" monitors.

Leave a Reply

Your email address will not be published. Required fields are marked *