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.
Open source · v2.3.2 · <1 MB
Synthetic HID events via CGEvent — the only technique Apple Silicon's SMC respects for clamshell sleep.
Lid closes → screen locks → display off. Open it up → password prompt. Stuff is safe.
Pings 5 DNS servers every 3s with UDP + TCP. iPhone hotspot won't drop.
Only activates when lid is closed. Screen dims and locks normally when open.
Download the DMG above, drag to Applications, then run this one command:
Clears macOS quarantine and launches the app. On first launch, AmphetamineXL prompts once to configure passwordless pmset access for its owned power-profile keys.
Clones, builds, installs, and launches. The app handles its own supported pmset changes after first-launch authorization.
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.
| Layer | Interval | Purpose |
|---|---|---|
| 🖱️ Mouse jiggle | 1s | Prevents clamshell sleep (the key fix) |
| 🔒 Auto-lock | On lid close | Locks screen + kills display |
| 🔋 IOKit assertions | Always | Prevents idle + system sleep |
| ☕ caffeinate -s -w <app pid> | Always while active | Kernel-level sleep prevention that dies automatically with the app |
| 🌐 Network keepalive | 3s | 5 DNS hosts, UDP + TCP probes |