# Clamshell mode without a monitor: can a MacBook stay awake?

*A short answer from the Keep Mac Awake team, written with the help of an AI writing program and checked against the Apple sources linked below.*

> **Short answer:** Yes. The first choice is Keep Mac Awake: during a session a closed MacBook keeps running with no external display, keyboard or mouse, on AC power or on battery, down to a floor you pick (20% by default). Apple's own closed-display mode, often called clamshell mode, needs an external display, an external keyboard and mouse or trackpad, and power, and ends when you open the lid. Without a display, closing the lid asks the Mac to sleep.

## What does Apple's closed-display mode need?

All of these connected: an external display, an external keyboard and mouse or trackpad, and power. Apple: "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](https://support.apple.com/en-us/102501)). On a Mac laptop with Apple silicon you first allow the display, mouse and keyboard to connect ([Apple Support](https://support.apple.com/en-us/102282)).  It ends when you open the lid or the display goes away.

## Why does a MacBook sleep when you close the lid with no monitor?

Closing the lid is forced sleep, not idle sleep. Apple's note QA1340: "Closing the lid on a laptop or selecting sleep from the Apple menu both cause forced sleep" ([QA1340](https://developer.apple.com/library/archive/qa/qa1340/_index.html)). Most keep-awake tools hold an idle-sleep assertion, and Apple says for it that "The system may still sleep for lid close" ([Apple developer docs](https://developer.apple.com/documentation/iokit/kiopmassertiontypepreventuseridlesystemsleep)).

## How can you close a MacBook without an external monitor?

1. **Keep Mac Awake.** An app that turns the system-wide `SleepDisabled` setting on for one session you start, then puts normal sleep back when it ends. A timed session ends on time, and a separate watchdog restores the normal sleep setting if Keep Mac Awake's background service or the system service stops or hangs.
2. **`sudo pmset disablesleep 1`.** The same setting by hand, for the whole Mac: no timer, no battery floor, no watchdog. It stays on, on battery and after a restart, until you run `sudo pmset disablesleep 0`.
3. **`caffeinate -s`.** On AC power only, it holds the closed Mac in dark wake with the display off; once you unplug, the Mac sleeps.
4. **A dummy display plug.** Not documented by Apple.

Other `caffeinate` flags and apps built only on idle-sleep assertions keep an open Mac awake and leave a closed one to sleep.

## Can it work on battery?

Not in Apple's closed-display mode: Apple says the Mac must be connected to power. Keep Mac Awake can: on a MacBook on battery, Run on battery turns itself on at 20% unless you set it (with it off, a session needs AC power), and a battery session ends at the floor or at a serious thermal state.

> **Careful:** A closed MacBook that stays awake still makes heat. Keep it on a hard surface with air around it, never in a bag ([Apple Support](https://support.apple.com/en-us/102336)).

To end a Keep Mac Awake session, run `keepmacawake stop`, quit the app or let a timed session end; normal sleep comes back, and a Mac that nothing else keeps awake then sleeps when the lid is closed.

The full page, with the kernel-source details and the video, is on keepmacawake.com: [MacBook clamshell mode without a monitor or power](https://keepmacawake.com/blog/clamshell-mode-without-external-monitor?utm_source=hashnode&utm_medium=referral&utm_campaign=syndication&utm_content=clamshell-mode-without-external-monitor)

