Back to Guides

Keep a MacBook running with the lid closed: which way fits

Keep a MacBook running with the lid closed: which way fits

A MacBook without an external display goes to sleep when you close the lid, and no normal setting prevents it. To keep it running you can connect an external display, use an app such as Amphetamine, switch sleep off with sudo pmset -a disablesleep 1, or keep the lid slightly open with a spacer.

Which one fits depends on two questions: does the lid have to be fully shut, and are you allowed to change the system?

What are the ways to keep a MacBook running?

Way Lid What it needs What to remember afterwards
Lid open, caffeinate or power setting Open Nothing extra Nothing
Lid spacer such as WakeClip 12 mm open The clip for your model Remove the clip before stowing the MacBook
Amphetamine or a similar app Fully closed Installing the app, and one with a closed-lid option End the session
sudo pmset -a disablesleep 1 Fully closed Admin rights, Terminal Reset with disablesleep 0
External display Fully closed Display, power adapter, keyboard and mouse Nothing
HDMI dummy plug Fully closed The plug, which imitates a display, the power adapter, a keyboard and a mouse Unplug it
Cloud or second computer Any The task has to be able to run there Nothing

A longer side-by-side view is in Keeping a MacBook awake with the lid closed: the methods compared.

Why does closing the lid stop everything?

macOS knows two kinds of sleep. Idle sleep starts after a period without input. Lid-close sleep starts when the lid shuts.

Idle sleep is easy to prevent. Many programs keep the Mac awake by themselves while they work. Otherwise the Terminal command caffeinate -i does it, or the macOS setting that prevents sleep on the power adapter.

Lid-close sleep is different. A program can only prevent it by intervening in the system, as Amphetamine's closed-lid option and pmset disablesleep do. That is why caffeinate alone does not keep a closed MacBook awake.

What if you can leave the lid open?

Then you need the least. Leave the MacBook open and make sure idle sleep is covered. If the bright screen bothers you, turn the brightness down. Whether the display switches off by itself after a while is decided by the display setting of your Mac, and a task keeps running with the display off as long as the Mac itself is awake.

What if you want to lower the lid without closing it?

This is what a lid spacer is for. WakeClip is a small red clip for the MacBook lid. It slides onto the front edge of the case, to the left of the trackpad, and the lid rests on it.

WakeClip keeps the lid 12 mm open. Your MacBook does not go to sleep from closing the lid, and whatever is running keeps running.

What speaks for it:

  • You can lower the lid and carry the MacBook in your hand from room to room while the task continues. Hold it by the base and do not press on the lid.
  • If you close the lid out of habit, the lid stops at the clip and the task is not ended.
  • No installation, no admin rights, no Terminal command, and nothing to reset. That works on a company Mac where you may not install anything.
  • Unlike a fully closed lid, the gap leaves air above the keyboard, so heat can escape.
  • The MacBook does not have to stand open on the desk.

The limits are just as clear. WakeClip is made for carrying in your hand, not for a bag. Pressure on a lid that rests on the clip strains the display, so do not press the lid down or put anything on it. Remove the clip and close the MacBook normally before you stow it. Idle sleep is still handled by your settings or the running program.

Other spacers and print-it-yourself templates exist. WakeClip comes in 28 versions, one per MacBook Air, MacBook Neo and MacBook Pro model from 2020 to 2026, shaped for that model and delivered ready to use.

What if the lid has to be fully closed?

Amphetamine and similar apps

Amphetamine keeps the Mac awake and, if you choose this for the session, also with the lid closed. Not every keep-awake app can do that: KeepingYouAwake, for example, only works with the lid open.

pmset disablesleep

sudo pmset -a disablesleep 1 switches sleep off for the whole system, including lid-close sleep. It needs admin rights. Set it back with sudo pmset -a disablesleep 0 when you are done. If you forget, the Mac also stays awake in your bag.

External display or HDMI dummy plug

Running a closed MacBook on an external display, on power, with keyboard and mouse, is the setup Apple intends. It suits a fixed desk. A dummy plug imitates a display for cases where you have none.

When should the task not run on the MacBook at all?

If something should run overnight or for days without you, a server, a cloud service or a desktop computer is the better place. A lid spacer does not replace that.

Also keep the network in mind. If you carry the MacBook out of Wi-Fi range, it loses the connection, and that can interrupt a task whether the Mac is awake or not.

Which way fits which situation?

  • Fixed desk with a monitor: external display, lid closed.
  • Lid shut, no monitor, own Mac: Amphetamine, or pmset if you will remember to reset it.
  • Carrying it around the house or office, company Mac, or a habit of closing the lid: a lid spacer.
  • Overnight and unattended: cloud or a second computer.

For agent runs, see Claude Code stops when you close your MacBook and Codex stops when the MacBook lid is closed.

If the small gap is the way that fits you, choose the WakeClip version for your MacBook model. One clip costs €34.90, two cost €55.00, and shipping is free.

WakeClip is an independent accessory and is not affiliated with Apple.