What to Know
- System Settings > Lock Screen > Turn display off on power adapter when inactive > Never.
- Then, go to Battery > Options. Turn on Prevent automatic sleeping on power adapter when the display is off.
- Install Amphetamine to keep your MacBook awake with the lid closed without connecting a monitor.
This article explains how to prevent your MacBook from sleeping when the lid is closed.
How to Keep Your MacBook On When Closed
You'll need to change a few settings to stop your MacBook from going to sleep with the lid closed.
-
Click System Settings or System Preferences from the Apple menu in the upper left corner.
-
Click Lock Screen, then select the menu next to Turn display off on power adapter when inactive. Pick Never.
If you don't see that option, go to Battery > Power Adapter instead, then select the slider and move it to Never.
-
Click Battery from the menu, then choose Options. Switch on the toggle next to Prevent automatic sleeping on power adapter when the display is off.
In some versions of macOS, this option is in the Power Adapter menu and it's called Prevent computer from sleeping automatically when the display is off.
-
Plug your MacBook into power.
-
Connect your MacBook to an external monitor using an adapter if necessary.
-
You can now close your MacBook without the external display turning off. Note that the display on the MacBook itself does turn off, just not the external monitor.
If you want to use your MacBook in this configuration permanently, you can use the Mac sleep scheduler to have it sleep and night and wake up in the morning automatically.
Why Does My MacBook Sleep When I Close the Lid?
Your MacBook sleeps when you close the lid for several reasons, depending on whether it's plugged in. When plugged in, it sleeps to help conserve energy and allow it to charge more quickly, as it uses much less power while asleep. When running on battery power, it sleeps when you close the lid to conserve battery power. Since you typically don't need to use your MacBook when the lid is closed, the default setting is for the display to turn off and the MacBook to sleep whenever the lid is closed.
The most common reason to want to keep a MacBook from sleeping when the lid is closed is if you're going to use it with an external monitor and keyboard. Apple makes that reasonably easy if you follow the instructions provided in the previous section.
Can You Keep a MacBook From Sleeping With the Lid Closed Without a Monitor?
Apple only provides you with one way to keep your MacBook from sleeping with the lid closed: tweak the energy-saver settings, connect the battery charger, and plug in an external monitor.
No option in the battery or energy-saving settings allows a MacBook to remain awake with the lid closed if an external monitor isn't plugged in. That means you'll have to install a third-party app, like Amphetamine, to keep your MacBook from sleeping without plugging in an external monitor.