Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Closing a MacBook’s lid normally puts it to sleep. The correct solution depends on what you want:
- For a desk setup with a monitor, use Apple’s supported closed-display (clamshell) mode.
- For a closed MacBook with no external display, use a utility such as Amphetamine or, less safely, the Terminal
pmsetworkaround.
The Battery setting that prevents automatic sleep while the display is off can help in some situations, but it is not a universal “ignore lid close” switch.
Use closed-display mode with an external monitor
macOS is designed to keep a MacBook running with the lid closed when it is connected to an external display, an external keyboard and mouse or trackpad, and power.
What you need
- An external display connected by USB-C, Thunderbolt, HDMI, or a dock
- An external keyboard and mouse or trackpad
- A power adapter, or a monitor/dock that supplies power over USB-C or Thunderbolt
On a MacBook with Apple silicon, approve the display and input devices while the MacBook is unlocked and the lid is open. If macOS displays an accessory alert, click Allow.
#1 Best Overall
- AN AMAZING MAC AT A SURPRISING PRICE — With an incredibly portable and durable aluminum design, up to 16 hours of battery life,* and the A18 Pro chip, MacBook Neo is ready to go wherever school takes you.
- FOUR STUNNING COLORS. ONE DURABLE DESIGN — Choose from four beautiful colors — Silver, Blush, Citrus, or Indigo — each with a color-coordinated keyboard. And MacBook Neo is made with a durable recycled aluminum enclosure that helps it reach 60 percent recycled content by weight — the most ever in any Apple product.*
- FLY THROUGH EVERYDAY ASSIGNMENTS — Whether you’re cramming for finals, using Apple Intelligence* to summarize class notes, creating presentations, or even playing the latest Apple Arcade game,* MacBook Neo delivers the performance and AI capabilities you need to get things done.
- UP TO 16 HOURS OF BATTERY LIFE — MacBook Neo delivers all day battery life, so you can power through from early morning classes to late night study sessions without worrying about plugging in.
- A VIBRANT 13-INCH DISPLAY* — The gorgeous Liquid Retina display on MacBook Neo supports 1 billion colors, so photos and videos pop and text is crisp for easy reading.
Steps
- Connect the external monitor, keyboard, mouse or trackpad, and power.
- Turn on the MacBook and wait for the macOS desktop to appear on the external display.
- Close the MacBook’s lid.
- If the external display stays black, press a key or click the external mouse or trackpad to wake it.
Power is important. Standard clamshell mode may stop working when you disconnect the charger, because a battery-only MacBook normally sleeps when its lid is closed.
Turn on the power-sleep option in macOS
Current versions of macOS include a setting that prevents automatic sleep while the MacBook is plugged in and its display is off.
- Open the Apple menu and choose System Settings.
- Select Battery.
- Click Options.
- Turn on Prevent automatic sleeping on power adapter when the display is off.
This setting is useful when the display has turned off because of inactivity. It does not generally override the physical lid-close action, and it does not make a battery-powered MacBook reliably remain awake with no external display.
To change the inactivity timeout, open System Settings > Lock Screen. You can adjust:
Rank #2
- BUILT FOR COLLEGE. AND BEYOND — MacBook Air with the M5 chip packs blazing speed and powerful AI capabilities into an incredibly portable design. And with up to 18 hours of battery life,* this thin and light powerhouse is ready to take on almost any major, just about anywhere.
- TEAR THROUGH TOUGH ASSIGNMENTS — With its faster CPU and unified memory, the M5 chip delivers even more performance and fluidity across apps, making multitasking and creative workflows smooth and responsive. A powerful Neural Engine and next-generation GPU with Neural Accelerators give you a powerful platform for AI.
- MAKE QUICK WORK OF YOUR TO-DO LIST — Apple Intelligence helps you write, express yourself, and get things done effortlessly — whether it’s for school or everyday life. With groundbreaking privacy protections, it gives you peace of mind that no one else can access your data — not even Apple.*
- UP TO 18 HOURS OF BATTERY LIFE — MacBook Air delivers incredible battery life with amazing performance, so you can power through a full day of classes without worrying about plugging in.
- A BRILLIANT 13.6-INCH DISPLAY* — The gorgeous Liquid Retina display on MacBook Air supports 1 billion colors, making photos and videos pop with rich contrast and sharp detail, and text appears supercrisp. So everything — from class presentations to movies to games — looks truly stunning.
- Turn display off on battery when inactive
- Turn display off on power adapter when inactive
Those options control when the display turns off after inactivity. They do not change what happens when you physically close the lid.
Keep the MacBook closed without an external display
If you need the MacBook to continue running with its lid closed and no monitor attached—for example, while a download or server process runs—use software that explicitly supports closed-lid sleep prevention.
Use Amphetamine
Amphetamine is available from the Mac App Store and includes a setting specifically related to a closed built-in display.
- Install and open Amphetamine. It runs from the menu bar.
- Open the Amphetamine menu and choose Quick Settings.
- Under Session Defaults, turn off Allow system sleep when display is closed.
- Start a session, such as Indefinitely, While File is Downloading, or While App is Running.
- Make sure the session is active before closing the lid.
Simply starting a generic keep-awake session is not necessarily enough. The Allow system sleep when display is closed option is the relevant Amphetamine setting.
Rank #3
- AN AMAZING MAC AT A SURPRISING PRICE — With an incredibly portable and durable aluminum design, up to 16 hours of battery life,* and the A18 Pro chip, MacBook Neo is ready to go wherever school takes you.
- FOUR STUNNING COLORS. ONE DURABLE DESIGN — Choose from four beautiful colors — Silver, Blush, Citrus, or Indigo — each with a color-coordinated keyboard. And MacBook Neo is made with a durable recycled aluminum enclosure that helps it reach 60 percent recycled content by weight — the most ever in any Apple product.*
- FLY THROUGH EVERYDAY ASSIGNMENTS — Whether you’re cramming for finals, using Apple Intelligence* to summarize class notes, creating presentations, or even playing the latest Apple Arcade game,* MacBook Neo delivers the performance and AI capabilities you need to get things done.
- UP TO 16 HOURS OF BATTERY LIFE — MacBook Neo delivers all day battery life, so you can power through from early morning classes to late night study sessions without worrying about plugging in.
- A VIBRANT 13-INCH DISPLAY* — The gorgeous Liquid Retina display on MacBook Neo supports 1 billion colors, so photos and videos pop and text is crisp for easy reading.
Check Amphetamine’s conditions if the MacBook still sleeps. A session can be configured to end when the battery reaches a chosen level or when another condition is met. Keeping the lid closed does not make the MacBook safe to leave in a bag: it can remain warm while awake and using power.
Use pmset as a temporary system-wide workaround
macOS includes the pmset command. The following command disables system sleep for both battery and power-adapter operation:
sudo pmset -a disablesleep 1
Enter your administrator password when Terminal asks for it. Nothing appears on screen while you type the password.
Check the current power-management state with:
pmset -g
Look for:
SleepDisabled 1
Restore normal sleep behavior when finished:
sudo pmset -a disablesleep 0
This is a broad switch. It disables normal system sleep, not just sleep caused by closing the lid. It is also undocumented by Apple, so treat it as a temporary troubleshooting workaround rather than a permanent configuration.
Recommended Free Tools
Rank #4
- AN AMAZING MAC AT A SURPRISING PRICE — With an incredibly portable and durable aluminum design, up to 16 hours of battery life,* and the A18 Pro chip, MacBook Neo is ready to go wherever school takes you.
- FOUR STUNNING COLORS. ONE DURABLE DESIGN — Choose from four beautiful colors — Silver, Blush, Citrus, or Indigo — each with a color-coordinated keyboard. And MacBook Neo is made with a durable recycled aluminum enclosure that helps it reach 60 percent recycled content by weight — the most ever in any Apple product.*
- FLY THROUGH EVERYDAY ASSIGNMENTS — Whether you’re cramming for finals, using Apple Intelligence* to summarize class notes, creating presentations, or even playing the latest Apple Arcade game,* MacBook Neo delivers the performance and AI capabilities you need to get things done.
- UP TO 16 HOURS OF BATTERY LIFE — MacBook Neo delivers all day battery life, so you can power through from early morning classes to late night study sessions without worrying about plugging in.
- A VIBRANT 13-INCH DISPLAY* — The gorgeous Liquid Retina display on MacBook Neo supports 1 billion colors, so photos and videos pop and text is crisp for easy reading.
Why caffeinate is not usually the answer
macOS’s built-in caffeinate command prevents idle sleep while the Terminal process remains active. For example:
caffeinate -i
To hold the assertion for one hour, use:
caffeinate -t 3600
These commands are useful for preventing idle-sleep during a task. They are not the same as disabling the lid-close sleep mechanism. If the lid itself must not trigger sleep, use closed-display mode, a utility with explicit closed-lid support, or the broader pmset setting.
Fix common closed-lid problems
The external monitor goes black
- Connect the MacBook to power, or use a display/dock that supplies power.
- Turn on the monitor and confirm that it shows the Mac desktop before closing the lid.
- Connect and pair the external keyboard and mouse or trackpad first.
- On Apple-silicon models, open System Settings > Privacy & Security > Allow accessories to connect and approve the display, dock, keyboard, and mouse while the MacBook is unlocked.
- After closing the lid, press a key or click the external pointing device.
Depending on your macOS version, the accessory choices include Always Ask, Ask for New Accessories, Automatically Allow When Unlocked, and Always Allow. An unapproved accessory may work with the lid open but fail to wake or control the MacBook while it is closed.
The MacBook sleeps when you unplug it
That is expected in standard clamshell mode. Apple’s supported closed-display setup relies on power from the charger or a power-delivering monitor or dock. A battery-only closed-lid setup requires a separate workaround and can vary by Mac model and macOS version.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Best Value
- FAST RUNS IN THE FAMILY — The 16-inch MacBook Pro with the M5 Pro or M5 Max chip brings next-generation speed and powerful on-device AI to personal, professional, and creative tasks. With all-day battery life, double the starting storage,* and a breathtaking Liquid Retina XDR display, it’s pro in every way.*
- BUCKLE UP — Along with a next-generation CPU, faster unified memory, and up to 2x faster SSD storage,* M5 Pro and M5 Max feature a more powerful GPU with a Neural Accelerator built into each core, delivering faster AI performance and on-device training capabilities. So you can blaze through demanding workloads at mind-bending speeds.
- BUILT FOR AI — Apple silicon, and every major component that powers it, is designed to run demanding on-device AI workloads like LLM inference and training. And Apple Intelligence helps you write, express yourself, and get things done effortlessly with groundbreaking privacy protections at every step.*
- ALL-DAY BATTERY LIFE — MacBook Pro delivers the same exceptional performance whether it’s running on battery or plugged in.*
- MACOS RUNS APPS FAST — All your go-to apps run lightning fast in macOS, including built-in apps like FaceTime and Messages. Plus, built-in virus protection and free software updates help keep your Mac running smoothly and securely.
The MacBook wakes or sleeps unexpectedly
Open System Settings > Battery > Options and check Wake for network access. For troubleshooting, set it to Never. USB and Thunderbolt accessories, external storage, file indexing, sharing services, and background processes can also affect sleep behavior.
The MacBook becomes hot
A MacBook that stays awake with the lid closed continues consuming power and may continue CPU- or GPU-intensive work. Keep it on a hard, ventilated surface. Never place an awake MacBook in a bag, under bedding, or somewhere that blocks its vents.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Settings and commands that are often misunderstood
| Option | What it actually does |
|---|---|
Prevent automatic sleeping on power adapter when the display is off |
Prevents automatic sleep while plugged in and the display is off; it is not a universal lid-close override. |
| Lock Screen display timeout | Controls inactivity before the display turns off; it does not override closing the lid. |
caffeinate |
Prevents idle sleep while its assertion is active; it is not a guaranteed closed-lid solution. |
sudo pmset -a lidwake 0 |
Controls whether opening the lid wakes the MacBook. It does not mean “keep running when the lid is closed.” |
FAQ
Can I stop a MacBook from sleeping when I close the lid without a monitor?
Yes, but macOS does not provide a normal universal setting for this. Use a utility such as Amphetamine with its closed-display sleep option enabled, or temporarily use sudo pmset -a disablesleep 1. The latter disables system sleep broadly and should be reverted afterward.
Why does my MacBook sleep when I close the lid even though the Battery setting is enabled?
The Battery option prevents automatic sleep while plugged in and the display is off. It does not generally override sleep triggered by physically closing the lid. For supported use, connect an external display, keyboard, mouse or trackpad, and power.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsDoes caffeinate keep a closed MacBook awake?
Not reliably. caffeinate is designed to prevent idle sleep, not necessarily the lid-close sleep mechanism. Use closed-display mode or a tool with an explicit closed-lid setting instead.
Is it safe to leave a MacBook running with the lid closed?
Use a hard, ventilated surface and avoid bags, bedding, or other enclosed spaces. A closed MacBook that remains awake can become hot, consume substantially more battery, and continue intensive background work.
The Bottom Line
For a monitor-based desk setup, connect the display, external input devices, and power before closing the lid; this is Apple’s supported clamshell mode. For a lid-closed MacBook with no external display, Amphetamine’s Allow system sleep when display is closed setting is the more targeted option. Reserve sudo pmset -a disablesleep 1 for temporary troubleshooting because it disables system sleep globally.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →

