MacBook close lid settings, explained

Windows has a “when I close the lid” dropdown. macOS doesn't — but it has a few settings that change what happens.

Updated · by Sasha Yakovlev, maker of Lidwork

Quick answer

macOS has no setting for the lid-close action: closing a MacBook's lid sleeps it, unless it's in closed-display (clamshell) mode with power, an external display and a keyboard. To keep a Mac on when the lid is closed without a monitor, run sudo pmset -a disablesleep 1 and later sudo pmset -a disablesleep 0, or use an app that manages this switch.

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

  1. The internal display turns off.
  2. If an external display, power and a keyboard/mouse are connected, the Mac enters closed-display mode and keeps running on the external screen.
  3. Otherwise, the Mac sleeps within a few seconds: apps pause, network connections drop, Bluetooth audio disconnects.
  4. 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)

SettingWhereAffects lid close?
Turn display off when inactiveSystem Settings → Lock ScreenNo — idle only
Prevent automatic sleeping on power adapter when the display is offSystem Settings → Battery → Options…No — idle only
Require password after the display turns offSystem Settings → Lock ScreenOnly what happens on wake
Wake for network accessBattery → Options… (laptops)No — limited network wake while asleep
Low Power ModeSystem Settings → BatteryNo
pmset disablesleepTerminal onlyYes — 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; disablesleep applies 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's 1, something left the switch on; sudo pmset -a disablesleep 0 fixes it. pmset -g assertions shows 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 | tail shows 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.