How to Keep Your Mac Awake with the Lid Closed

A MacBook keeps running with the lid closed only in clamshell (closed-display) mode: it has to be plugged into power, connected to an external display, and paired with a keyboard or mouse. Without all three, closing the lid sleeps it. In clamshell mode the idle timers still apply, and Shake It On's cursor movement on the external display keeps it awake.

What is clamshell mode?

Close your MacBook lid, keep using it through an external monitor. The built-in screen turns off, the external one stays on. Lots of people use their MacBook this way as a desktop.

Apple supports it but never calls it "clamshell mode." There's no toggle in System Settings. It just works when the right pieces are in place. Figuring out what those pieces are is the annoying part.

What you need for clamshell mode

Three things, all required. An external display that macOS recognizes (has to be on and connected before you close the lid). Power (MacBook must be charging, won't do clamshell on battery). And an external keyboard or mouse over USB or Bluetooth so you can still interact with the machine.

Drop any one of those and closing the lid just puts it to sleep.

Note
Apple Silicon MacBooks care about order. Plug everything in, make sure macOS sees it all, then close the lid. Do it out of order and you might still get sleep.

Does a MacBook sleep when you close the lid with an external monitor?

Not if it's plugged in. With power, an external display and a keyboard or mouse connected, closing the lid switches the MacBook to the external screen and it keeps running. Unplug the charger or the display and closing the lid sleeps it again.

Want the opposite, a MacBook that sleeps when you shut it at your desk? Choose Apple menu โ†’ Sleep before you close the lid, or disconnect the external display first.

One thing still applies with the lid closed: the idle timers. Leave the keyboard and mouse alone long enough and the external screen turns off, then the system can sleep. That's the part the next section is about.

Using Shake It On in clamshell mode

Clamshell mode keeps the Mac awake, but macOS still has its idle timer running. Walk away from the keyboard long enough and it'll sleep even with the lid closed. Not great when you've got an overnight download or a long render going.

Shake It On generates mouse movement on the external display. macOS sees activity, stays awake. The built-in screen being off doesn't matter.

Handy conditions for this setup: run only when an external display is connected. Schedule overnight tasks. Off on weekends if the MacBook lives at a desk Monday through Friday. Configure once, don't touch it again.

Shake It On keeps your clamshell Mac awake with mouse movement on your external display. $9.99 one-time.

Common clamshell mode problems

Sleeps immediately when you close the lid. Check two things: is the charger plugged in, and does System Settings โ†’ Displays show the external monitor? Both need to be true before you shut it.

Display goes black after a few minutes. That's the idle timer, not a clamshell problem. macOS is putting the display to sleep because nothing's happening. This is exactly what Shake It On fixes.

Bluetooth keyboard or mouse won't wake it. Go to System Settings โ†’ Bluetooth, click the info button next to your device, and check "Allow this device to wake the computer." Not all cheap Bluetooth accessories support wake.

Wakes up then immediately sleeps again. One of the three requirements probably isn't fully met. Double-check power, display, input device.

USB-C dock issues. Some docks don't pass through enough power or don't signal the display properly. Try the charger plugged in directly, not through the dock.

Broke after a macOS update. Apple changes clamshell behavior between versions. Reconnect the display and re-pair your Bluetooth stuff after major updates.

Tip
If you've triple-checked everything and your Mac still won't stay awake in clamshell, Shake It On can force it with continuous mouse activity. Works around whatever macOS is doing.

Feels warm with the lid shut. That's expected: a closed MacBook driving a display is awake and working, not sleeping. If it's hot when you didn't mean to keep it awake, why a MacBook gets hot when it's closed walks through finding what's keeping it up.

Frequently Asked Questions

Can I use clamshell mode without an external display?
Not officially. macOS requires an external display to enter clamshell mode. Without one, closing the lid puts your Mac to sleep.
Does a MacBook Pro sleep when the lid is closed with an external monitor?
Not while it's on power with a keyboard or mouse connected: it keeps running on the external monitor. On battery, or with the display unplugged, closing the lid puts it to sleep. To sleep it at your desk, choose Apple menu > Sleep first.
Can I keep my MacBook on when closed without a monitor?
Not with macOS's own settings. Closing the lid without an external display always sleeps a MacBook.
Does Shake It On work when the lid is closed?
Yes. Shake It On generates mouse events that macOS processes regardless of whether the built-in display is active. The cursor moves on your external display.
Keep your Mac awake the easy way.
Shake It On lives in your menu bar and uses organic mouse movement to prevent sleep. Set it once and forget it.
One-time purchase. No subscription. Free updates forever.
Lifetime license ยท macOS 14+
Apple Pay, Google Pay or card. Your download starts right after payment, and you can re-download anytime with your purchase email.