macOS 14+  ·  Apple Silicon  ·  Free

⚡ AmphetamineXL

Close the lid. Put it in your backpack.
Your Mac stays awake. Hotspot stays connected.
The only app that actually prevents Apple Silicon clamshell sleep.

Download for Mac

Open source  ·  v2.3.2  ·  <1 MB

🖱️

Actually works

Synthetic HID events via CGEvent — the only technique Apple Silicon's SMC respects for clamshell sleep.

🔒

Auto-locks on close

Lid closes → screen locks → display off. Open it up → password prompt. Stuff is safe.

🌐

Keeps hotspot alive

Pings 5 DNS servers every 3s with UDP + TCP. iPhone hotspot won't drop.

🧠

Smart lid detection

Only activates when lid is closed. Screen dims and locks normally when open.

Install (DMG)

Download the DMG above, drag to Applications, then run this one command:

xattr -cr /Applications/AmphetamineXL.app && open /Applications/AmphetamineXL.app

Clears macOS quarantine and launches the app. On first launch, AmphetamineXL prompts once to configure passwordless pmset access for its owned power-profile keys.

Install (build from source)

git clone https://github.com/HannoJacobs/AmphetamineXL && cd AmphetamineXL && xcodebuild -scheme AmphetamineXL -configuration Release -destination 'platform=macOS' build && BINARY=$(find ~/Library/Developer/Xcode/DerivedData -path "*/Release/AmphetamineXL" -type f 2>/dev/null | head -1) && mkdir -p /Applications/AmphetamineXL.app/Contents/MacOS && cp "$BINARY" /Applications/AmphetamineXL.app/Contents/MacOS/AmphetamineXL && xattr -cr /Applications/AmphetamineXL.app && open /Applications/AmphetamineXL.app

Clones, builds, installs, and launches. The app handles its own supported pmset changes after first-launch authorization.

Verify + Debug

Check everything is working
pgrep -x AmphetamineXL && pmset -g assertions | grep -E "AmphetamineXL|caffeinate|UserIsActive" && pmset -g live | grep -E "SleepDisabled|standby|hibernatemode|sleep|displaysleep"
View app logs
log show --predicate 'subsystem == "com.hannojacobs.AmphetamineXL"' --last 10m && open ~/Library/Application\ Support/AmphetamineXL/Logs
Check sleep/wake history + lid state
pmset -g log | grep -E "Sleep|Wake|Clamshell" | tail -20 && /usr/sbin/ioreg -r -k AppleClamshellState | grep AppleClamshellState
Runtime contract
Caffeine ON => legacy-max-awake; Caffeine OFF or app quit => restore normal sleep-capable machine state

How it works

Apple Silicon's SMC forces clamshell sleep on lid close, ignoring all software sleep prevention. The only thing it respects is real HID activity. AmphetamineXL posts synthetic mouse events via CGEventCreateMouseEvent every second — fooling the SMC into thinking a user is present.

LayerIntervalPurpose
🖱️ Mouse jiggle1sPrevents clamshell sleep (the key fix)
🔒 Auto-lockOn lid closeLocks screen + kills display
🔋 IOKit assertionsAlwaysPrevents idle + system sleep
☕ caffeinate -s -w <app pid>Always while activeKernel-level sleep prevention that dies automatically with the app
🌐 Network keepalive3s5 DNS hosts, UDP + TCP probes