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

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.

How to prevent your MacBook Pro from sleeping when you close the lid while connected to a monitor? Adjust the settings in Energy Saver in System Preferences to keep your Mac awake with the display closed.

Let me introduce you to a few methods to choose based on convenience.

Key Takeaways:

  • Adjust Energy Saver settings so the Mac won’t sleep when the lid is closed while connected to a monitor.
  • Use the “caffeinate” command in Terminal to keep Mac awake with the lid closed.
  • Apps like Insomniac, Caffeinated, and Amphetamine prevent sleep with the macbook lid closed.
  • Customize sleep settings based on your needs – set display timeout or prevent entering sleep mode entirely.

How to Make MacBook Pro Not Sleep When Lid is Closed – 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 

  • Open the Apple menu bar.
  • 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.
Select system preferences

Step 2: Open Battery

  • “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.
Open Battery

Step 3: Go To The Power Adapter Tab

  • “Battery” window
  • Switch to the “Power Adapter” tab. ( left of the window next to “Battery.” )
  • Click on it to adjust the settings.
 Go To The Power Adapter Tab

Step 4: Change The Settings

  • Adjust the “Turn display off after” slider to “Never.”

This tells your computer to remain on without a specified timeout period.

Change The Settings


  • You can check the box that says “Prevent your Mac from automatically sleeping when the display is off”.
Prevent your Mac from automatically sleeping

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.” 

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.

Use the Caffenate Command in Terminal 

Open terminal in launch pad → type “caffeinate” into the command prompt → hit Return.

Open Terminal in Launchpad

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 mode

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 display, 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 mode function is an excellent feature to promote your MacBook’s battery power 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 devices 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 *