If you've come from Windows, you're probably looking for a “When I close the lid: Do nothing” option. macOS doesn't have one. On a Mac, closing the lid is treated as an instruction to sleep, and Apple gives you very few knobs around it. Here's what each related setting really does.
What happens when you close the lid
- The internal display turns off.
- If an external display, power and a keyboard/mouse are connected, the Mac enters closed-display mode and keeps running on the external screen.
- Otherwise, the Mac sleeps within a few seconds: apps pause, network connections drop, Bluetooth audio disconnects.
- When you open the lid, it wakes and asks for your password according to your Lock Screen settings.
Step 3 happens regardless of idle timers, the Energy/Battery options and caffeinate. That's why “my download stops when I close my MacBook” is so common.
Settings that sound related (and what they do)
| Setting | Where | Affects lid close? |
|---|---|---|
| Turn display off when inactive | System Settings → Lock Screen | No — idle only |
| Prevent automatic sleeping on power adapter when the display is off | System Settings → Battery → Options… | No — idle only |
| Require password after the display turns off | System Settings → Lock Screen | Only what happens on wake |
| Wake for network access | Battery → Options… (laptops) | No — limited network wake while asleep |
| Low Power Mode | System Settings → Battery | No |
pmset disablesleep | Terminal only | Yes — overrides it |
How to keep a Mac on when the lid is closed
With a monitor: closed-display mode
Connect power, an external display and a keyboard/mouse, then close the lid. Apple supports this setup, and it's the best choice for a desk. Details in clamshell mode, with and without an external display.
Without a monitor: the disablesleep switch
# before closing the lid
sudo pmset -a disablesleep 1
# check the current state
pmset -g | grep SleepDisabled
# when you're done — the important part
sudo pmset -a disablesleep 0
This is the one built-in override for lid sleep. It's global (it disables all system sleep, not just lid sleep) and persistent (it survives until you turn it off). A forgotten 1 is how MacBooks end up hot and flat at the bottom of a bag.
Without a monitor, without remembering: an app
Keep-awake apps that support a closed lid manage that switch or a similar mechanism for you. Ask three questions before trusting one: does it need a password every time, does it restore sleep if it crashes, and does it stop at a battery level? Lidwork answers them like this: no password at all, a small background part that turns lid sleep back on if the app dies (at once after a crash, within 30 seconds after a hang), and a 10/20/30% battery cutoff.
If you keep the Mac awake with the lid closed
Once lid sleep is overridden, the Mac behaves like a desktop with the screen off: apps, downloads, SSH sessions and builds keep running, and Bluetooth devices stay connected. Two things change compared with an open lid:
- Heat. A closed MacBook has less room to shed heat, and almost none inside a bag. Light work (downloads, an agent waiting on the network) is fine; long compiles or exports in a sealed backpack are not. Fanless MacBook Airs warm up fastest.
- Battery. Unplugged, the Mac now drains until something stops it. Decide on a floor — Lidwork lets you pick 10, 20 or 30% — or plug in for anything longer than an hour or two.
Things people expect but macOS doesn't do
- “Lid close = turn off the screen only.” Not available without disabling sleep entirely.
- “Lid close = shut down / hibernate.” Not available as a lid action. macOS has its own standby/hibernation behaviour after long sleep, tuned per model.
- “Different lid behaviour on battery vs charger.” Not as a setting;
disablesleepapplies everywhere. Apps can add this logic — for example, a battery cutoff.
Troubleshooting
- Mac doesn't sleep when you close it: check
pmset -g | grep SleepDisabled. If it's1, something left the switch on;sudo pmset -a disablesleep 0fixes it.pmset -g assertionsshows other apps preventing sleep. - Mac sleeps in clamshell mode: make sure it's on power and the external display is actually active.
- Mac wakes in the bag:
pmset -g log | grep -i wake | tailshows wake reasons (e.g. network or Bluetooth).
FAQ
Is there a setting to make a MacBook do nothing when I close the lid?
Not in System Settings. The only built-in override is the pmset disablesleep switch in Terminal, which disables sleep entirely until you turn it off.
Does closing the lid lock my Mac?
Closing the lid sleeps the Mac, and waking it asks for your password according to Lock Screen → Require password after screen saver begins or display is turned off.
Can I stop the Mac turning on when I open the lid?
On recent Apple Silicon MacBooks, Apple documents a Terminal setting to stop opening the lid or connecting power from starting the Mac. Check Apple's support article for your model and macOS version before changing it.