How to Prevent a MacBook From Sleeping When the Lid Is Closed

Change some lock screen and battery settings to make your MacBook act like a desktop Mac when you close the lid

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.

  1. Click System Settings or System Preferences from the Apple menu in the upper left corner.

    The Apple menu on a MacBook
  2. Click Lock Screen, then select the menu next to Turn display off on power adapter when inactive. Pick Never.

    Never chosen in the Lock Screen settings on a MacBook

    If you don't see that option, go to Battery > Power Adapter instead, then select the slider and move it to Never.

    Power Adapter highlighted in MacBook battery settings.
  3. 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.

    The prevent automatic sleeping on power adapter option toggled on for a MacBook

    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.

    The prevent computer from sleeping checkbox highlighted in MacBook battery settings.
  4. Plug your MacBook into power.

  5. Connect your MacBook to an external monitor using an adapter if necessary.

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

FAQ
  • How do I prevent a MacBook from sleeping when plugged in?

    Select System Settings > Battery > Options. Turn on Prevent automatic sleeping on power adapter when the display is off. Also, go to System Settings > Lock Screen > Turn display off on power adapter when inactive, and choose Never to keep your Mac from sleeping.

  • How do I prevent my MacBook from sleeping on battery power?

    If you don't want your MacBook to go into sleep mode after a certain amount of time on battery power, turn off this setting. Go to System Settings > Lock Screen and select the menu next to Turn display off on battery when inactive; change it to Never.

  • Why is my MacBook not sleeping when the lid is closed?

    Ensure the setting for turning off the display is active. Go to System Settings Lock Screen and review those settings. Also, in the Battery menu, choose Options and disable the Prevent automatic sleeping toggle. Also, check Bluetooth wake settings: Bluetooth > Advanced > uncheck Allow Bluetooth devices to wake this computer.

Was this page helpful?