How to stop your MacBook from sleeping when the lid is closed in macOS Sonoma

2023 MacBook Air 15-inch M2 shown open on a surface
(Image credit: Tom's Guide)

Apple's MacBooks typically go to sleep automatically when you close their lids. This is to conserve battery power and, when plugged in, cut down on power consumption for faster charging.

However, sometimes you want to make sure your MacBook's display stays on after you close it. One of the chief reasons is to keep downloads going when you're running on battery power. Another is if you want to keep the lid closed while listening to music, or perhaps a podcast.

Unfortunately, you can't prevent a MacBook from going to sleep with the lid closed if you've updated it to run macOS Sonoma—at least, not from the laptop's system settings. Thankfully, there are third-party apps that can help. Below, we'll show you how to close a MacBook lid without it going to sleep in macOS Sonoma using a free app.

How to close a MacBook lid without it going to sleep

The most straightforward wy to stop your MacBook from going to sleep when you close the lid is by installing Amphetamine, a free third-party app you can download from the Mac App Store (our thanks to Macworld for recommending the app).

Amphetamine is a free utility by William Gustafson. For an app that prevents your Mac from going to sleep, it's pretty robust and filled with numerous customization options. For the purposes of this how-to, we're going to focus on the option to prevent your MacBook from going to sleep entirely.

1. Click on Amphetamine app

(Image: © Apple)

After you've downloaded and installed the Amphetamine app, its icon will appear on the top right corner of the desktop. Click on the Amphetamine icon.

2. Select "Indefinitely"

(Image: © Apple)

From the drop-down menu, select "Indefinitely." This will completely stop your MacBook from going to sleep when you close the lid.

3. Other sleep options

(Image: © Apple)

You're technically done at this point. But as you can see from the image above, Amphetamine gives you a range of sleep options. You're able to create no-sleep sessions that can last for minutes or hours. You can also prevent the MacBook from going to sleep when running specific apps. And of course, you can allow the system to sleep when the display is closed.


And that's how you close a MacBook lid without it going to sleep in macOS Sonoma. While you need a third-party app to make this work, we're grateful a workaround exists. Keep in mind that you can always quit the Amphetamine app if you're worried about impacting your MacBook's battery health.

For more macOS Sonoma tips, check out our guides for how to use video screensavers in macOS Sonoma and how to add widgets to your Mac in macOS Sonoma. If you have an iPhone 15, our guides on how to hide your number on iPhone and how to drop the "Hey" from "Hey Siri" on iPhone.

More from Tom's Guide

TOPICS
Tony Polanco
Senior Computing Writer

Tony is a computing writer at Tom’s Guide covering laptops, tablets, Windows, and iOS. During his off-hours, Tony enjoys reading comic books, playing video games, reading speculative fiction novels, and spending too much time on X/Twitter. His non-nerdy pursuits involve attending Hard Rock/Heavy Metal concerts and going to NYC bars with friends and colleagues. His work has appeared in publications such as Laptop Mag, PC Mag, and various independent gaming sites.

Read more
MacBook Air 13-inch M3
Apple reveals how to prevent your MacBook powering on when you open the lid — here's what to do
The MacBook Pro 2021 (14-inch) on an office table surrounded by accessories
The best MacBook accessories for 2025
MacBook Pro M3 Pro on bench
Your Mac has a built-in screen recorder — here's how to use it
MacBook Pro M3 Pro on bench
Stop using Command+Shift+3 — try these Mac screenshot shortcuts instead
MacBook Air 15-inch and MacBook Air 13-inch, two of the best laptops for battery life
The best laptops for battery life in 2025: our top picks
MacBook Air M2 and HP Envy x360 in split image
I ditched Windows for a MacBook after 30 years — here's why I'm never going back
Latest in macOS
Mac Studio on a desk hooked up to a Studio DIsplay
Mac Studio M3 Ultra: 3 reasons to buy and 2 reasons to skip
Cyberpunk 2077 on MacBook Pro
5 great cloud gaming services for Mac that you should try right now
MacBook Prime Day
The widget you've always wanted comes to your Mac menu bar in Sequoia 15.2
Apple Magic Mouse USB-C
USB-C Mac accessories don't work with older macOS versions — this is a huge pain
How to keep to keep iCloud Drive files downloaded on your Mac
How to keep to keep iCloud Drive files downloaded on your Mac
How to access your passwords from the menu bar in macOS Sequoia
MacOS Sequoia lets you view saved passwords via the menu bar — here's how
Latest in Deals
Ninja Flip Toaster Oven Air Fryer
Score! Save space and money with this epic Ninja Flip Toaster deal
Deals Under $50
Best weekend deals under $50 — 21 budget items I'm adding to my cart now
REI Deals
Epic REI sale live from $11 — 25 outdoor deals I'm shopping this weekend
Walmart sign with Tom's Guide Price Drop badge
Walmart's weekend sale starts from $14 — 27 deals I'm adding to my cart now
Steam Deck OLED
Massive Steam sale offering PC games from under $1 — here's 18 must-buy titles I'd go for
Amazon logo on building with Price drop deals tag
Massive Amazon weekend sale live from $6 — 33 spring deals I'm shopping on apparel, OLED TVs, phones and more