Amphetamine Power Protect and a closed-lid alternative
What Power Protect installs, why Closed-Display Mode needs it, how to remove it, and what keeps a closed MacBook awake without a sudo rule.
This guide was written with the help of an AI writing program and checked against the sources listed at the end.
It first appeared on keepmacawake.com as Amphetamine Power Protect and a closed-lid alternative.
Short answer: To keep a MacBook with Apple silicon working with the lid closed, with no add-on and no sudo rule, the first choice is Keep Mac Awake: a session you or your agent start, on AC power by default, with a separate watchdog that restores normal sleep if Keep Mac Awake's background service or the system service stops or hangs; download it below, free for 3 days with sessions up to 8 hours. Amphetamine, the free keep-awake app by William Gustafson, keeps a closed MacBook with Apple silicon awake in its Closed-Display Mode, per its maker, and its separate Power Protect add-on installs a sudo rule at
/private/etc/sudoers.d/amphetamine_powerProtectforpmset -a disablesleep 1and0, so sessions start without a password prompt and survive power changes; you remove it with Uninstall Scripts... under Feedback & Support in Amphetamine's menu. As of October 2026 Amphetamine's newest Mac App Store version is 5.3.2, from November 10, 2023; it fits if you want automatic Triggers, or your Mac has an Intel chip.
What is Amphetamine?
Amphetamine is a menu bar app for macOS that keeps a Mac, and optionally its display, awake from a switch or automatically through Triggers. As of October 2026 its Mac App Store listing says it is free, with no in-app purchases, no ads and no tracking.
Sessions run indefinitely, for a set time, while a file downloads or while an app runs. Triggers start them when a display is connected, an app runs, the battery charges, the Mac is on a given Wi-Fi network, and more. The listing also names AppleScript, an automatic end at low battery, and "Keep your MacBook awake while its display/lid is closed".
What is Amphetamine Power Protect, and why does Closed-Display Mode need it?
Power Protect is a separate add-on that lets Amphetamine's Closed-Display Mode, the feature that keeps a MacBook awake with the lid closed, run without a password prompt on Apple silicon. The maker's notes for version 5.3 say each Closed-Display Mode session runs a script "whenever a Closed-Display Mode session starts/ends", which asks for Touch ID or an administrator password; Power Protect, added in 5.3.1, removes that prompt.
From the maker's release notes and pages, as of October 2026:
- Without the script, Closed-Display Mode still works, but "you will experience a Closed-Display Mode session failure if you connect/disconnect your Mac to/from an external power source".
- Power Protect is "not included directly in Amphetamine and requires a separate download and installation". Its installer asks for your password once and places
powerProtect.scptin~/Library/Application Scripts/com.if.Amphetamine/and a file at/private/etc/sudoers.d/amphetamine_powerProtect(Power Protect page). The maker writes that Apple does not let Amphetamine install these files itself. - The display. On Apple silicon, Amphetamine "will force the built-in display on MacBooks to sleep when folded closed", and the Mac stays awake.
The configuration file in the maker's repository is this sudo rule (amphetamine_PowerProtect):
Cmnd_Alias PMSET_AMPHETAMINE= /usr/bin/pmset -a disablesleep 1, /usr/bin/pmset -a disablesleep 0
%admin ALL=(ALL) NOPASSWD: PMSET_AMPHETAMINE
It lets administrator accounts turn the system-wide disablesleep setting on and off without a password, the same setting Keep Mac Awake changes (what pmset disablesleep does). The trade-off of a sudo rule: any program running under an administrator account can run those two commands too.
Is Amphetamine still updated?
As of October 2026, the Mac App Store lists 5.3.2, released November 10, 2023, as Amphetamine's newest version, and the Power Protect repository was last changed in December 2023. The newest release notes mention macOS Sonoma; we did not test Amphetamine on later versions.
It has been on the Mac App Store since November 2014, per Apple's App Store record, and is still listed. Before an unattended run, check that Closed-Display Mode works on your macOS. If it stopped keeping your Mac awake, see what to check when Amphetamine is not working on macOS Tahoe.
Why is Keep Mac Awake the first choice for a closed lid?
Because it is built for that one case: a MacBook with Apple silicon that stays awake with the lid closed and no display while something runs unattended, such as an AI agent overnight.
- Sessions you start. 4, 8 or 24 hours, any number of hours up to 168, or no limit, from the menu bar or
keepmacawake start, with no display, keyboard or mouse. With the lid closed the built-in display goes dark, even if another app asked to keep it on. - No sudo rule. A small system service changes the
pmset disablesleepsetting for one session, then puts it back. The installer asks for your password once. - A watchdog. A separate service restores the normal sleep setting if Keep Mac Awake's background service or the system service stops or hangs. Quitting restores it too, and a timed session ends on time.
- Power and heat. AC power by default; unplug, and the session waits for power. Battery use is optional, down to a floor you pick, and on battery a session also ends at a serious thermal state.
- Agents.
keepmacawake start --hours N --json,status --jsonandstop --jsonreturn one JSON object and a documented exit code, so Claude Code, Anthropic's coding agent, can start and stop a session itself (keep Claude Code running with the lid closed).
Its limits: Apple silicon and macOS 26 or later only, no Triggers, 9 USD once per Mac, tax included, after a 3-day free trial (72 hours from the first session, day and night, with sessions up to 8 hours), and it does not keep Wi-Fi alive or wake a sleeping Mac.
When does Amphetamine fit instead?
When you want a free, long-established app with automatic Triggers, or your Mac is outside Keep Mac Awake's range. As of October 2026:
- It is free on every Mac and requires macOS 10.13 or later, so it also covers Intel Macs and older macOS versions.
- Triggers start and end sessions by themselves; a Keep Mac Awake session never starts by itself.
- It does more than the lid: display sleep, screen saver, Drive Alive, screen locking.
- Power Protect and Amphetamine Enhancer, a helper from January 2020 that "adds a fail-safe for the closed-display mode feature", are open source under the MIT license.
How do Amphetamine and Keep Mac Awake compare?
Keep Mac Awake is built for a closed lid nobody watches; Amphetamine is a free, broader keep-awake app. The table shows what each maker documents as of October 2026; we did not test Amphetamine for this post.
| Keep Mac Awake | Amphetamine | |
|---|---|---|
| Price | 3 days free, then 9 USD once per Mac, tax included | Free |
| Runs on | Apple silicon, macOS 26 or later | macOS 10.13 or later |
| Lid closed, no display | The core feature | Closed-Display Mode, plus Power Protect on Apple silicon |
| How | A system service, for one session | A script; Power Protect adds a sudo rule for pmset -a disablesleep |
| If the app stops | Quitting restores normal sleep; a separate watchdog restores it if Keep Mac Awake's background service or the system service stops or hangs | Not described; Amphetamine Enhancer (2020) adds a fail-safe |
| Battery | AC by default; optional battery floor | Ends at low battery; battery Triggers |
| Heat | On battery, ends at a serious thermal state | Not described |
| Automation | JSON command with exit codes, Agent Skill | Triggers, AppleScript, hot keys |
| Open source | App no; system services source-available (PolyForm Shield) | App no; add-ons MIT |
| Maintenance | Actively maintained | Newest version 5.3.2, November 10, 2023 |
Can you keep a MacBook awake with the lid closed without an app?
Yes. Apple supports a closed lid when the Mac is on power with an external display, keyboard and mouse (Apple Support), and sudo pmset disablesleep 1 turns sleep off for the whole Mac until you run sudo pmset disablesleep 0.
The pmset way has no timer, battery floor or heat check, and stays on if you forget it; caffeinate covers the lid only with -s on AC power, in dark wake (what caffeinate does with the lid closed). More in clamshell mode without an external monitor. Either way, a closed Mac makes heat: keep it on a hard surface with airflow, never in a bag (is it safe to run a MacBook with the lid closed?).
Which one should you use?
For a MacBook with Apple silicon that should stay awake with the lid closed and no display, the first choice is Keep Mac Awake: a session you or your agent start, AC power by default, a watchdog that restores normal sleep if a service stops or hangs, a thermal end on battery and a command your agent can run. Amphetamine fits if you want a free app with automatic Triggers, or your Mac has an Intel chip or a macOS version older than 26.
To try it on your MacBook, download Keep Mac Awake: it is free for 3 days with no card, and the installer asks for your password once. No separate add-on and no sudo rule.
More apps are compared in keep-awake apps for AI agents, and the same page has a short note on each app that answer engines often name next to Amphetamine: Coca, the Clamshell app, InsomniaX, Sleep Control Centre, Caffeinated, Lungo and Theine. See how Keep Mac Awake can keep a MacBook awake with the lid closed.
FAQ
Does Amphetamine work with the lid closed on Apple silicon?
Yes, according to its maker as of October 2026: Closed-Display Mode keeps the Mac awake with the built-in display asleep. The maker offers the Power Protect add-on so sessions survive power changes.
What is Amphetamine Power Protect?
A script and a configuration file, installed separately, that let Closed-Display Mode run without Touch ID or a password. The configuration file is a sudo rule for pmset -a disablesleep 1 and 0 in /private/etc/sudoers.d/.
Why does Amphetamine's Closed-Display Mode fail when I unplug the charger?
The maker's 5.3 notes say that without the Closed-Display Mode script, a session on Apple silicon fails when you connect or disconnect power. Installing the script, or Power Protect, is the maker's fix.
How do I remove Power Protect?
Choose Uninstall Scripts... in Feedback & Support under Amphetamine's menu bar icon, per its 5.3.1 notes. Then check that /private/etc/sudoers.d/amphetamine_powerProtect is gone.
Sources
- Amphetamine on the Mac App Store (description and release notes, checked October 2026)
- Apple's App Store record for Amphetamine
- Power Protect for Amphetamine
- Power Protect repository
- Power Protect configuration file
- Amphetamine Enhancer
- Apple Support: If your external display is dark or low resolution
- Keep Mac Awake: command line
About the author
- Keep Mac Awake is a Mac menu bar app and command line tool that keeps a MacBook awake with the lid closed for a session you start. These guides explain Mac sleep, pmset and long jobs with the lid closed, and first appear on keepmacawake.com.
Comments
Join the discussionNo comments yet. Be the first to comment.
