How to Prevent MacBook From Sleeping When Lid Is Closed

MacBooks packing Apple’s in-house silicon chip are quite powerful. Besides harnessing that power on the move, you can also hook them up to a monitor on your desk for a desktop-like experience.

Prevent MacBook from Sleeping with lid closed

One of the flip sides of using a Mac with an external monitor is that it goes to sleep when you close the lid. So you have to keep the lid open or connect your Mac to a charger all the time. Both of these scenarios aren’t ideal.

If this is an issue you face regularly, fret not because there’s a simple fix! Here’s how you can prevent your MacBook from sleeping when you close the lid.

Why Should You Prevent Your Mac from Sleeping

One of the most popular use cases for keeping the Mac awake even with the lid closed is when it’s connected to an external monitor. Keeping the MacBook’s lid open at all times in such a scenario can be distracting as you will have two screens to look at. It can also drain the battery rather quickly.

MacBook with closed lid

The second use-case for keeping your Mac awake with the lid closed is for when you’re downloading large files. If you’re downloading a file that will take a few hours to complete, it’s a good idea to close the lid while keeping it awake so that the download can take place seamlessly.

You can also use this as a simple trick to keep your Mac from sleeping when it is sitting idle. You don’t want your MacBook to go to sleep in the middle of a presentation!

Installing and Setting up Amphetamine

Unfortunately, there is no built-in app or feature on macOS from preventing the Mac from sleeping. There’s a third-party app to acheive that – Amphetamine.

It’s free to download from the App Store and does not have any ads. It’s lightweight, non-intrusive, and works as intended.

Step 1: Download Amphetamine from the App Store on your Mac. Once done, tap on ‘Open.’

ampehtamine on app store

Step 2: You will now see a circular icon on your Mac’s menu bar that looks like a pill. Click on it.

keep mac from sleeping amphetamine

Step 3: Hover your mouse over ‘Quick Preferences’ and uncheck the box next to ‘Allow system sleep when display is closed’.

prevent macbook from sleeping when lid is closed

Step 4: Doing this will trigger a pop-up asking you to install Amphetamine Enhancer. This is a fail-safe app that will ensure your Mac doesn’t go to sleep when the lid is closed. Click on ‘Get Amphetamine Enhancer’.

keep macbook awake

Step 5: A browser window will show you some FAQs about Amphetamine. Scroll down to the bottom of the page and you will find the Github link to download Amphetamine Enhancer.

download link

Step 6: Double-click on the downloaded .dmg file to run it. You will now see a Finder window open up. Drag the ‘Amphetamine’ icon into the ‘Applications’ icon. Once done, close the Finder window.

finder window

Step 7: Open the ‘Applications’ folder on Finder and double-click on Amphetamine Enhancer to run the installer.

keep macbook awake with lid closed app

Step 8: Click on ‘Open’ when prompted.

Open button

Step 9: In the installer window, select ‘Closed-Display Mode Fail-Safe’ in the left column and click on ‘Install.’ Close the installer once done.

prevent macbook from sleeping mode

Amphetamine is now set up on your MacBook. This is a one-time process.

How to Keep Your Macbook Awake With the Lid Closed

Now that Amphetamine is up and running on your Mac, here’s how you can prevent your Mac from going to sleep with the lid closed.

Step 1: Click on the pill-shaped icon on the menu bar to open Amphetamine.

keep mac from sleeping amphetamine

Step 2: Click on ‘Indefinitely’ to start a new session. Your Mac will now stay awake even with the lid closed for an indefinite period until you end the session manually.

prevent macbook from sleeping indefinitely

Step 3: To end a session, tap on the pill icon again and select ‘End current session’.

end sleep session

Step 4: You can also run the app for a set duration. This will keep your Mac awake for that particular duration. Instead of selecting ‘Indefinitely’, select the required ‘Minutes’ or ‘Hours’ option from the menu.

prevent sleep for set duration

If you’ve selected the ‘Indefinitely’ option, make sure to end your session once you’re done using your MacBook. Or else, your Mac will not sleep and it will end up draining the battery completely.

How to Start an Amphetamine Session at Startup

If you want your MacBook to stay awake and not sleep each time you turn it on, you can enable it to start a session each time you log in. Here’s how to do it.

Step 1: Click on the pill-shaped icon on the menu bar to open Amphetamine.

keep mac from sleeping amphetamine

Step 2: Select the ‘Preferences’ option.

amphetamine preferences

Step 3: Check the boxes next to ‘Launch Amphetamine at login,’ ‘Start session when Amphetamine launches,’ and ‘Start session after waking up from sleep.’

prevent macbook from sleeping with lid closed on startup

Step 4: Close the window, and you’re good to go.

Each time you turn on your MacBook, Amphetamine will automatically launch and start a session.

Keep Your Mac Awake

This is how you can prevent your MacBook from sleeping even when the lid is closed. You can connect it to a monitor without issues or download large files in the background overnight. Let us know your use case for keeping the MacBook awake in the comments below.

Last updated on 04 March, 2022

The above article may contain affiliate links which help support Guiding Tech. However, it does not affect our editorial integrity. The content remains unbiased and authentic.