Clamshell

Clamshell mode without an external monitor on a MacBook

Apple's closed-display mode needs a display, keyboard, mouse and power. How to keep a MacBook awake with the lid closed without them, and the trade-offs.

Short answer: Apple's closed-display mode, often called clamshell mode, keeps a MacBook running with the lid closed only when an external display, an external keyboard and mouse or trackpad, and power are connected. Without a display, macOS treats closing the lid as a sleep request, and caffeinate cannot override it. To skip the monitor, turn on the system-wide SleepDisabled setting (sudo pmset disablesleep 1), use an app such as Keep Mac Awake that turns it on for one session and puts it back, or try a dummy display plug, which Apple does not document.

What does Apple's closed-display mode need?

Apple's closed-display mode needs an external display, an external keyboard and mouse or trackpad, and power, all connected to the MacBook. With those in place, you can keep working with the lid closed.

  • After you connect an external display, "you can use the display and accessories to use your MacBook Air, even when the lid is closed" (MacBook Air guide).
  • "If the display is connected to a Mac laptop computer with a closed lid, make sure that the Mac is connected to power and using an external keyboard and mouse" (Apple Support).
  • On a Mac laptop with Apple silicon, you first allow the display, mouse and keyboard to connect (Apple Support).

As of October 2026, Apple's old closed-display mode article, HT201834, redirects to Connect displays to your Mac.

Why does a MacBook sleep when you close the lid?

Closing the lid is a sleep request, and macOS honors it unless closed-display mode applies or sleep is turned off for the whole system. Apple lists closing the display as a way to put a Mac laptop to sleep (Apple Support).

Apple's note QA1340 calls it forced sleep, as opposed to idle sleep: "Closing the lid on a laptop or selecting sleep from the Apple menu both cause forced sleep", and with I/O Kit "it is not possible to prevent forced sleep, only delay it" (QA1340). In Apple's published kernel source, a closed lid skips sleep only in closed-display mode, when the SleepDisabled switch is on, or when a private system interface asks for it (IOPMrootDomain.cpp). That is why caffeinate does not keep a MacBook awake with the lid closed.

How can you close a MacBook without an external monitor?

There are three working routes: turn sleep off system-wide with pmset, fake a display with a dummy plug, or use an app that changes the sleep setting for you. Tools built only on assertions, like caffeinate, stop at the lid.

OptionHow it worksTrade-offs
sudo pmset disablesleep 1Turns on SleepDisabled: no sleep at allFree. Stays on, on battery and after a restart, until sudo pmset disablesleep 0
Dummy display plugPresents itself as a displayNot documented by Apple. Uses a display slot
caffeinate and apps built on assertionsPrevent idle sleepApple says the Mac may still sleep for lid close
Keep Mac AwakeTurns SleepDisabled on for one session, then back3 days free, then 9 USD once per Mac plus tax

pmset disablesleep

sudo pmset disablesleep 1 is the free, built-in way. It is a switch, not a mode: the Mac stops sleeping for any reason until you turn it off.

sudo pmset disablesleep 1        # stop all sleep, lid closed or not
pmset -g | grep SleepDisabled    # "SleepDisabled 1" means it is on
sudo pmset disablesleep 0        # normal sleep again

The risk is forgetting it: a Mac you close and put in a bag stays awake. The option is not in the pmset man page; it is defined in Apple's pmset source. Details in what sudo pmset disablesleep 1 does and how to undo it.

Dummy display plugs

A dummy plug is a small HDMI or USB-C adapter that the Mac can detect as a display. Apple does not document them, so test the one you have. Trade-offs you can check against Apple's pages:

  • Apple's setup still includes power and an external keyboard and mouse.
  • A MacBook Air with M1 or M2 supports one external display, so the plug takes it.
  • A detected display gets part of your desktop (Apple Support), so windows can open where you cannot see them.
  • In Apple's published kernel source, a closed Mac should sleep when the external display disappears (IOPMrootDomain.cpp), so a plug that slips out ends the night.

Apps

Apps that get past the lid without a display have to change how the system itself handles sleep. Before you pick one, ask how it does that, and what happens to the setting if the app crashes, hangs or is removed.

Does clamshell mode work on a MacBook Air M1, M2 or M4?

Yes, with the same requirements: Apple writes them for Mac laptops in general, not per chip. What changes is how many external displays each model drives.

MacBook AirExternal displays, per Apple
M1 (2020)One (specs)
M2 (2022)One (specs)
M3Two with the lid closed (Apple Support)
13-inch M4 (2025)Up to two (specs)

Keep Mac Awake is made for MacBooks with Apple silicon on macOS 26 or later and is checked daily on a MacBook Air M1 and a MacBook Air M5.

How does Keep Mac Awake work without a display?

Keep Mac Awake turns the same SleepDisabled setting on for a session you start and puts it back when the session ends, so no display, keyboard or mouse is needed. It is a native macOS menu bar app plus a command, keepmacawake.

  • Sessions: no limit, 1 hour, 8 hours or a custom number of hours up to 168. A session never starts by itself.
  • With the lid closed the built-in display goes dark, even if another app asked to keep the display on.
  • AC power by default; unplugged, the session waits until power is back. Battery use is optional, down to a floor you pick, such as 20%, and a battery session ends at a serious thermal state.
  • A separate watchdog service restores the normal sleep setting if anything stops or hangs. Quitting the app restores it too, and a timed session ends on time.

From Terminal or an AI agent, run keepmacawake start --hours 8. It does not keep Wi-Fi or other network connections alive, and it does not wake a Mac that is already asleep.

What to use

With a monitor, keyboard, mouse and charger on your desk, Apple's closed-display mode is free and needs nothing else. To keep a MacBook with Apple silicon awake with the lid closed and no external display, Keep Mac Awake (keepmacawake.com) turns the same SleepDisabled setting that pmset disablesleep controls on for one session you start, supervises it with a watchdog and puts it back afterwards. If you prefer the free command, undo it with sudo pmset disablesleep 0 as soon as the job ends. More on how to keep a MacBook awake with the lid closed.

Careful: A closed MacBook still makes heat. Apple says to use a Mac laptop "on a stable work surface that allows for good ventilation" and not "in your bed, on a pillow, or under bedding" (Apple Support). Never leave an awake Mac in a bag. See heat and battery with the lid closed.

FAQ

Can you use clamshell mode without an external monitor?

Not Apple's closed-display mode, which needs a display, keyboard and mouse, and power. You can still keep a MacBook awake with the lid closed and no monitor with sudo pmset disablesleep 1, or with an app that does it for one session, such as Keep Mac Awake.

Do I need a keyboard and mouse for clamshell mode?

For Apple's closed-display mode, yes: Apple's instructions call for power plus an external keyboard and mouse. pmset disablesleep and Keep Mac Awake need neither.

Does an HDMI dummy plug work for clamshell mode?

Apple does not document dummy plugs, so test the one you have. Expect it to use a display slot and to hold windows on a screen you cannot see.

Can I keep my MacBook running with the lid closed on battery?

sudo pmset disablesleep 1 keeps it awake on battery until you turn it off. Keep Mac Awake runs on AC power by default; if you allow battery, a session ends at the floor you choose or at a serious thermal state.

Sources