MacHead

Amphetamine vs pmset vs MacHead: keeping a MacBook awake with the lid closed

An honest comparison — different tools solve different sleeps. Updated 2026-10-09.

Most "keep my Mac awake" questions are really two different questions wearing one coat:

For the first question, Amphetamine and friends are excellent and this article will happily recommend them. For the second, they solve only the first layer of the problem — because closing the lid triggers clamshell sleep, a separate, lower-level mechanism that keep-awake assertions don't cover. Here's every realistic option, compared fairly.

The short version

The contenders

caffeinate (built into macOS)

Apple's own command-line tool. caffeinate -i blocks idle sleep while it runs; free, zero install, scriptable. But it's a terminal command you babysit, and like every assertion-based tool it does not survive a closed lid on a machine without an external display setup. Best for: a one-off long task from the terminal.

Amphetamine (App Store)

The polished GUI keep-awake app: sessions, schedules, triggers (apps, disks, downloads), and years of refinement. For keeping a Mac awake during work, it's the one to beat. Its limits show up in the server scenario: it's built around awake-ness, not headless operation — no internal-display management as a server feature, no web console, no tunnels, no battery-guard logic for unattended weeks. Its closed-display mode comes with caveats and helper components, and still assumes a machine you'd normally sit at. Best for: power users keeping a working Mac awake, lid open.

KeepingYouAwake (open source)

A tiny, free menu-bar wrapper around caffeinate with a timer. Lovely for what it is — and what it is, is idle-sleep blocking only. No lid-closed operation, no server tooling. Best for: "stay awake for the next two hours," nothing more.

pmset disablesleep (manual)

sudo pmset -a disablesleep 1 is the raw system lever the lid-closed guides reach for. It genuinely works with the lid shut — and it's a global, sticky switch with no safeguards: lose mains power and the machine runs the battery into the ground; system updates and forgetfulness can leave it on (or off) at the wrong time; reverting is another sudo you must remember. Best for: a supervised test, not a permanent setting.

Dummy HDMI plug

A ~$5 dongle that pretends to be a monitor, unlocking clamshell mode without a real display. A legitimate trick — the only hardware on this list. But the Mac now renders a desktop nobody sees, a port is occupied, and battery protection, remote access, and monitoring are still unsolved problems you get to solve separately. Best for: a dedicated machine on a desk where a fake display is harmless.

MacHead (open source, ours)

MacHead starts from the other end: it's not a keep-awake app, it's a headless workstation mode. One click turns the internal display off, handles lid-closed operation, locks the built-in keyboard/trackpad, and mutes the mic. Around that core it wraps the things a server needs and the options above lack: a battery guard that restores normal sleep at low charge (the pmset failure mode, designed out), temperature alerts, a LAN web console with a generated admin password, remote access via Cloudflare Tunnel / Dev Tunnels / FRP, and monitoring integrations (ServerStatus, Uptime Kuma). It also works when the internal screen is broken — the case where every alternative above runs out of road. The honest trade-offs: it's a younger, smaller project than Amphetamine, and if you only need "awake for an hour," it's more tool than you need.

Side by side

CapabilitycaffeinateAmphetamineKeepingYouAwakepmset manualDummy plugMacHead
Blocks idle sleepYesYesYesYes—Yes
Runs with lid closed (no real display)NoPartial, with caveatsNoYesYesYes
Turns internal display offNoNoNoNoNo (renders fake one)Yes
Works with a broken screenNoNoNoPartialPartialYes
Battery guard (low-charge sleep)NoNoNoNoNoYes
Remote access built inNoNoNoNoNoYes (3 tunnel options)
Web console / monitoringNoNoNoNoNoYes
PriceFree (built-in)Free + IAPFreeFree~$5Free
Open sourceNoNoYes——Yes (Apache-2.0)

So which should you pick?

FAQ

Why doesn't Amphetamine keep my MacBook awake with the lid closed?

Amphetamine blocks idle sleep via power assertions; a closing lid triggers clamshell sleep, a lower-level mechanism assertions don't cover. Its closed-display mode exists with caveats, but the app is designed around keeping a Mac awake for tasks — not display-off headless serving with battery protection and remote access.

Is pmset disablesleep safe to leave on?

It works, but it's a global sticky switch with no safeguards: on battery it will drain the pack completely, and you must remember to revert it. Fine supervised; risky as a permanent 24/7 setting.

Is a dummy HDMI plug worth it?

It's a legitimate, cheap trick to unlock clamshell mode. Downsides: a fake desktop being rendered, an occupied port, and battery/remote/monitoring still unsolved.

Can I just use Amphetamine with an external display?

Yes — with a working screen, monitor, power and peripherals, clamshell + keep-awake is a perfectly good desk setup. Headless tooling matters when there's no working display or the machine must run unattended.

What if the screen is already broken?

Then most options above are off the table. MacHead turns the internal display off entirely and works through a virtual display, web console and tunnels — see the broken-screen guide.

Running a lid-closed server? MacHead is free and open source (Apache-2.0), Apple Silicon & Intel, macOS 12+.

Download MacHead GitHub Read the agent-server guide