Skip to content
86% off$349 $48.86code BF2026

Guides

Clamshell Mode on Mac: Use a MacBook With the Lid Closed

Use clamshell mode on a Mac: Apple's requirements and setup, why the lid still sleeps your MacBook, and how to stay awake on battery or without a display.

GuideUpdated 10 min read

On this page

Clamshell mode on a Mac lets you use a MacBook with its lid closed. Apple calls it closed-display mode. To use it, connect the MacBook to its power adapter, an external display, and an external keyboard and mouse (or trackpad), then close the lid. The Mac keeps running and shows everything on the external display.

If power or the external display is missing, macOS puts a MacBook to sleep when you close the lid. To change that, you can turn sleep off in Terminal with sudo pmset -a disablesleep 1, or use an app that turns it off only while you need it and turns it back on by itself.

What clamshell mode on a Mac does

In clamshell mode the built-in screen is off and the external display is your only screen. The built-in keyboard, trackpad and Touch ID sensor are under the closed lid, so you can't use them. Apps, downloads and network connections keep running as normal.

People use it to turn a MacBook into a desktop computer, or to drive a large monitor without the laptop screen beside it. A related need works differently: keeping a MacBook running with the lid closed and no display or power, for example to finish a download while the Mac is in a bag. Apple's clamshell mode doesn't cover that case. Both are covered below.

What a MacBook needs for clamshell mode

Apple's closed-display mode requires:

  • A power adapter, connected and supplying power.
  • An external display, connected and turned on.
  • An external keyboard and a mouse or trackpad, wired or Bluetooth.

How many external displays a MacBook supports depends on the model. Check your model's tech specs on Apple Support before buying a second monitor for clamshell use.

Set up clamshell mode step by step

  1. Connect the power adapter to the MacBook.
  2. Connect the external display and turn it on. Wait until your desktop appears on it.
  3. Connect the external keyboard and mouse. For Bluetooth devices, pair them and check that they work while the lid is still open.
  4. Close the lid.
  5. If the external display goes dark, press a key or click the mouse.

To go back, open the lid. The built-in display turns on again.

Stop the Mac from idle-sleeping while docked

Clamshell mode keeps the Mac awake when you close the lid, but your normal sleep settings still apply. If you leave the keyboard alone long enough, the display sleeps, and the Mac may sleep after it.

On a MacBook, open System Settings, click Battery, then Options…, and look for the option that prevents automatic sleeping on the power adapter when the display is off. If you can't find it, search System Settings for "sleep". Our guide to Mac sleep settings explains each option.

If you want the Mac to stay awake only while it's docked, Glowmoth has a preset rule for this:

  1. Open Glowmoth Settings and click the Automation tab.
  2. Open the Add Rule menu and choose Docked at Desk.

The rule keeps the Mac awake while it's on AC power and an external display is connected. The External Display Connected condition is also true when the lid is closed. By default only the Mac stays awake and the monitor sleeps as usual. Turn on the rule's Keep the display on switch if you want the monitor to stay on too.

Why your MacBook sleeps when you close the lid

macOS sleeps a MacBook when you close the lid unless it has power and an external display. That's by design. Tools that only block idle sleep don't change this. Examples are Glowmoth's normal sessions and the caffeinate command with -i.

If the Mac still sleeps when you expect clamshell mode to work, check these causes in order:

  • The power adapter isn't supplying power. Check that the battery menu in the menu bar shows the power adapter as the power source. Try another cable or port.
  • The external display isn't detected. Before you close the lid, check that the display appears in System Settings under Displays. A monitor that is asleep or switched off, or a dock or adapter that drops the signal, can count as no display.
  • No external keyboard or mouse. Apple lists them as requirements, and you need one of them to wake the Mac after you close the lid. Test them with the lid open first.
  • The Mac went to sleep from idle, not from the lid. This comes from your sleep settings. See the previous section.
  • You're on battery or have no display. Apple's clamshell mode doesn't support this. The next section covers your options.

Use clamshell mode without power or a display

System Settings has no option to keep a MacBook awake with the lid closed on battery or without a display. Apart from Apple's mode, you have two options:

MethodNeeds powerNeeds external displayTurns itself offBattery and heat cut-offs
Apple's clamshell modeYesYesNot needed (normal lid behavior)Not needed (always on power)
pmset disablesleepNoNoNo, stays on until you undo itNone
Glowmoth closed-lid modeNoNoYes, when Glowmoth stops keeping the Mac awakeBattery floor and heat limit, always on

Turn off sleep with pmset

pmset is the built-in Terminal tool for power settings. Its disablesleep option turns off sleep for the whole Mac, including lid sleep.

Warning: this turns off sleep for the whole Mac, on battery too, until you turn it back on. Don't count on a restart to reset it.

bash
sudo pmset -a disablesleep 1

This sets SleepDisabled to 1 for all power sources. macOS asks for your administrator password. While the setting is on, closing the lid turns off the built-in display, but the Mac keeps running.

To turn normal sleep back on:

bash
sudo pmset -a disablesleep 0

To check the current state:

bash
pmset -g | grep -i sleepdisabled

This prints the SleepDisabled line from your power settings. 1 means sleep is off and 0 means normal.

Risks of pmset disablesleep: heat, battery and bags

  • Heat. A closed MacBook in a bag or sleeve gets little airflow. With sleep off, nothing stops the Mac from running hot in there.
  • Battery. Nothing cuts it off. A busy Mac can drain the battery completely with the lid closed.
  • Forgetting it's on. Nothing in the menu bar shows that sleep is off. A MacBook you put away days later can still be running.
  • No idle sleep either. The Mac also won't sleep when you leave it idle with the lid open, so the setting affects more than the lid.

If you use pmset, keep the undo command where you'll see it, and run it as soon as your job finishes.

Keep a Mac awake with the lid closed using Glowmoth

We make Glowmoth, a menu bar app that keeps a Mac awake. Its closed-lid mode uses the same pmset switch, but only while Glowmoth is keeping the Mac awake. It turns the switch back off as soon as that ends. You don't need a power adapter or an external display.

Turn on closed-lid mode

  1. Right-click the Glowmoth icon in the menu bar and choose Settings…. With the panel open, you can also press ⌘, (Command-Comma).
  2. Click the Safety tab.
  3. Under Closed Lid, turn on Stay awake with the lid closed. This section only appears on Macs with a battery.
  4. Glowmoth installs a small helper and opens the Login Items pane in System Settings. Allow the Glowmoth helper there.
  5. Back in Glowmoth, the caption under the switch reads "Works during a session. Your Mac sleeps as usual otherwise."
  6. Start a keep-awake session. For example, right-click the icon and choose 2 Hours. The caption changes to "Active: your Mac stays awake with the lid closed."
  7. Close the lid. The Mac plays the "Glass" sound. If notifications are allowed for Glowmoth, it also shows "Lid closed, staying awake".
Glowmoth Settings, Safety tab: Closed Lid switch on with the caption Active: your Mac stays awake with the lid closed
During a session the caption says closed-lid mode is active.

A manual session isn't the only thing that keeps the lid mode active. It also stays on while Glowmoth keeps the Mac awake for any other reason, such as:

  • an app that is running
  • a watched download folder that is still busy
  • a rule
  • a coding agent that is working

When the last reason ends, normal lid sleep returns.

Battery and heat cut-offs

  • Battery. On battery below the floor, the helper turns sleep back on. The floor is 20% by default, and you can set it from 5% to 50% in steps of 5. At the default, the caption reads "Off below 20% battery. Plug in to resume."
  • Heat. When macOS reports a thermal state of serious or worse, the helper turns sleep back on right away. The normal heat limit waits 60 seconds first; this cut-off doesn't wait. The caption reads "Off while your Mac is running hot."
  • You can't turn the limits off. While closed-lid mode is on, the low-battery pause and the heat limit are always on. Their switches show "Always on while closed-lid mode is on." For details on both, see Battery and heat safety limits.

What happens if Glowmoth stops

Glowmoth renews a 30-second lease with the helper every 10 seconds. If Glowmoth stops, normal sleep returns within 30 seconds. Sleep returns immediately in these cases:

  • Glowmoth quits or crashes.
  • The helper is removed.
  • The Mac shuts down.

If anything is left over, it's undone at the next startup.

The helper only undoes a setting it made itself. If you already ran sudo pmset -a disablesleep 1 yourself, Glowmoth leaves it alone and shows "Sleep is already turned off with pmset, outside Glowmoth." To let Glowmoth manage sleep, run the undo command from the pmset section first.

Limits of closed-lid mode

  • It works only on laptops, and only while a session or another reason is active. There is no "always on" mode.
  • Before you put the Mac in a bag, choose a timed session such as 30 Minutes rather than Indefinitely, or stop the session. The heat cut-off is a backstop, not a reason to leave a running Mac in a bag.
  • On laptops, the Also Keeping This Mac Awake list in the panel always shows "Closing the lid sleeps this Mac unless it has power and an external display." It shows this even when closed-lid mode is on, because it describes the macOS default, not your current setting.
  • To remove the helper, turn off Stay awake with the lid closed, then click Remove Helper.

For every status caption and more detail, see Keep a MacBook awake with the lid closed. Glowmoth needs macOS 14 Sonoma or later. It's part of MacSuite, and you can try it free for 7 days.

Amphetamine Enhancer and closed-display mode

The Amphetamine keep-awake app from the Mac App Store has its own closed-display mode. Amphetamine Enhancer is a free, open-source helper for it. It doesn't keep the Mac awake by itself. Instead, it adds a fail-safe: if Amphetamine isn't running, the Mac goes back to sleeping when you close the lid. Enhancer needs Amphetamine 5.0 or later, installed in the Applications folder.

As of November 2026, Enhancer's only release is 1.0, and the official repository looks inactive. Amphetamine's README also notes a problem on Apple silicon: closed-display mode may fail after you plug in or unplug power. The official fix is a separate manual install called "Power Protect", which uses a script and a sudoers file. For a fuller side-by-side, see Amphetamine vs Glowmoth.

If Glowmoth's closed-lid mode doesn't work

  • "Allow the Glowmoth helper in Login Items to finish." The helper isn't approved yet. Click Open Login Items and allow it.
  • "macOS couldn't install the helper. Move Glowmoth to Applications and try again." Drag Glowmoth into the Applications folder, open it from there, and turn the switch on again.
  • "Can't reach the helper. Turn closed-lid mode off and on again." Turn Stay awake with the lid closed off, then on.
  • The Mac still sleeps when you close the lid.
    • Check that a session or another reason is active: the icon should show Awake or Automatic, not Paused. A low-battery or heat pause releases every reason.
    • Check the panel's Automatic | Manual control. Manual mode ignores everything except your own session.
    • Check your license. If the trial has ended and there's no license, Glowmoth keeps nothing awake.
  • Nothing automatic keeps the Mac awake after "Stop Everything". Stop Everything suspends automatic reasons until you start a session again or relaunch Glowmoth.

FAQ

Can I use clamshell mode without a power adapter?

Not with Apple's built-in clamshell mode, which requires power. To keep a MacBook awake with the lid closed on battery, use pmset disablesleep or an app like Glowmoth that manages that setting and cuts it off at a battery floor.

Does Touch ID work in clamshell mode?

Not the built-in sensor, because it's under the closed lid. On Apple silicon Macs, a Magic Keyboard with Touch ID works. Otherwise, type your password on the external keyboard.

How do I stop my Mac from sleeping while the lid is open?

You don't need anything lid-specific for that. See how to stop your Mac from going to sleep for the built-in settings, caffeinate, and keep-awake apps.

Every app.
One purchase.