“Clamshell mode” is the informal name for Apple's closed-display mode: using a MacBook with its lid shut, as a desktop computer driving an external monitor. It's officially supported and works well. The confusion starts when people try it without the monitor.
Apple's requirements
Apple's support documentation lists what closed-display mode needs:
- The MacBook connected to power.
- An external display connected and on.
- An external keyboard and mouse or trackpad (wired or Bluetooth).
With all three, close the lid and the Mac keeps running on the external display. On older guides you'll also read “wake it with the external keyboard after closing” — on current macOS it usually just continues.
Clamshell mode without a charger
The charger is the requirement people miss. Apple's closed-display mode is documented for a MacBook on power; unplug it with the lid shut and the Mac goes to sleep, monitor or not. On battery with no monitor, closing the lid is simply a sleep request.
So “clamshell mode on battery” really means overriding lid sleep: the pmset switch below, or an app that does it for you. Either way, add a battery limit — a closed MacBook on battery that never sleeps runs until it is empty. Lidwork keeps a closed MacBook awake on battery with no monitor, and lets it sleep again at the 10, 20 or 30% you choose or when it gets too hot. On Apple Silicon, plugging in or unplugging the charger with the lid closed can pause the Mac for a few seconds before it carries on.
Setting up clamshell mode with a monitor, step by step
- Connect the MacBook to its power adapter (or a USB-C/Thunderbolt monitor that charges it).
- Connect the external display and make sure it shows your desktop.
- Pair or plug in a keyboard and a mouse or trackpad, and check they work.
- Close the lid. The internal screen turns off; after a moment of rearranging, windows move to the external display.
- If the screen stays black, press a key or click on the external keyboard or mouse to wake it.
To leave clamshell mode, open the lid or disconnect the display. Unplug the monitor while the lid is shut and the Mac goes to sleep — expected behaviour, since none of the conditions are met anymore.
Why it doesn't work without a display
Without an external display, closing the lid is treated as a request to sleep. macOS honours it within seconds, regardless of idle timers, Energy settings or running caffeinate commands. That's a deliberate design choice: a closed laptop with nothing attached is usually going into a bag, and Apple prefers it asleep there.
Some people try dummy HDMI plugs (“headless display adapters”) to make macOS believe a monitor is connected. They can work, but they still require power and they add hardware you need to carry. For the walk-away case, there are simpler routes.
Option 1: the pmset switch
One global switch disables sleep entirely, lid included:
sudo pmset -a disablesleep 1 # lid closed, still awake
pmset -g | grep SleepDisabled # 1 = sleep disabled
sudo pmset -a disablesleep 0 # back to normal — don't forget
This works on battery and on power, with no monitor. The risk is entirely in the last line: the switch is persistent, so a forgotten disablesleep 1 means a Mac that never sleeps — awake in your bag, warm, until the battery is empty.
Option 2: an app that manages the switch
Several apps wrap a lid-closed mechanism in a toggle (we compare them in Lidwork vs the rest). The detail that matters is recovery: what happens if the app quits, crashes or is force-killed while sleep is disabled?
Lidwork handles that with a small background part: the app renews a 30-second lease every 10 seconds, and if the renewals stop, the background part turns normal sleep back on by itself. It also returns to normal sleep at a battery level you choose (10, 20 or 30%), and when the Mac gets too hot. It doesn't use pmset and needs no password.
Option 3: a different setup
- Keep the lid slightly open. Low-tech, works with plain
caffeinate, but the screen may stay lit and it doesn't fit in a bag. - Move the job elsewhere. For long, unattended work that doesn't need your Mac, a server or cloud session avoids the question entirely.
Clamshell mode and heat
A closed MacBook has less room to shed heat. On a desk, that's fine — Apple designs for it. Closed in a bag, airflow is close to zero. If you run with the lid closed and no monitor:
- Short carries (a commute, a walk) are fine for most workloads.
- Avoid hours of heavy load inside a sealed bag, especially on fanless MacBook Airs.
- Use a battery limit, so an unplugged Mac goes to sleep before it's empty.
Comparison
| Method | Monitor needed | Power needed | Reverts by itself |
|---|---|---|---|
| Apple closed-display mode | Yes | Yes | Yes |
| Dummy HDMI plug | Fake one | Yes | Yes, when unplugged |
pmset disablesleep 1 | No | No | No |
| Lidwork | No | No — works on battery | Yes — on toggle, timer, quit or crash, battery limit, heat |
For what you can and can't configure about the lid itself, see MacBook close lid settings explained.
FAQ
Does clamshell mode work without a charger?
Apple documents closed-display mode with the power adapter connected; unplug it with the lid closed and the MacBook normally goes to sleep. To keep it awake on battery, use sudo pmset -a disablesleep 1 (and undo it) or an app such as Lidwork, which works on battery and lets the Mac sleep again at 10, 20 or 30% charge.
How long can a closed MacBook run on battery?
It depends on the workload: a coding agent or a download uses far less than a render. Set a battery limit so the Mac sleeps before it is empty, and plug in for long heavy jobs.
Is it bad for a MacBook to run with the lid closed?
No — Apple supports it. The things to watch are heat (airflow is lower with the lid shut, and much lower in a bag) and battery when it's unplugged.
Does the internal screen stay on in clamshell mode?
In Apple's closed-display mode the internal display is off and the external one is used. With pmset-based workarounds, behaviour can vary by model, so check if that matters to you.