← GuidesPower · 3 min read · updated November 24, 2026 · by Dom, who makes Desktop Goods

How to keep a MacBook awake with the lid closed

Use a MacBook closed with an external display (clamshell mode), and why keeping it awake closed without one is a bad idea.

Clamshell mode (the supported way)

A MacBook stays awake with its lid closed when all of these are true:

  1. It’s connected to power.
  2. It’s connected to an external display.
  3. It has an external keyboard and mouse or trackpad (wired or Bluetooth).

Close the lid and it keeps running on the external display.

Without an external display

macOS sleeps when you close the lid, and apps like Amphetamine or Vigil keep the Mac awake while it’s open, not closed. There’s a Terminal setting that disables sleep entirely:

sudo pmset -a disablesleep 1

and sudo pmset -a disablesleep 0 to undo it. Use it with care: a closed MacBook in a bag that never sleeps can get very hot. Never leave it on by accident.

Usually what you want instead

Keep the lid open with the display off. Vigil can keep the Mac awake but let the display dim, until a download or export finishes. Or caffeinate -i in Terminal (guide).

Try it right here

Vigil, live in your browser

This is the real interface. Click around. If it fits, it's yours for $4.99 once, with free updates.

Exporting “Wedding film final.mov”
4K · 38 min
41%About 52 minutes left
Export stops if your Mac goes to sleep.
Display sleeps in 0:08
Your Mac went to sleep.The export stopped at 41%. Click to wake it.
VigilOff
AWAKE FOR ANOTHER1:00:00
Keep awake for
Try it: wait, then keep it awake

Related