KeepingYouAwake with the lid closed: why it sleeps anyway

By Matyas Rathonyi. Updated October 5, 2026. Guides

KeepingYouAwake cannot keep a MacBook awake with the lid closed, and its own README says so. It wraps caffeinate, which blocks idle sleep, not lid-close sleep. Keep it for open-lid work, and add an external display, pmset disablesleep, or Clamshell for Mac when the lid has to close.

Lid openKeepingYouAwake works
Lid closedThe Mac still sleeps
caffeinateIdle sleep only
Issue #262Lid-closed request, open

Clamshell for Mac covers the closed lid that KeepingYouAwake leaves out. No sudo, no monitor. Free for 7 days.

Download free trial

Apple Silicon, macOS 14+. Notarized by Apple. 3.6 MB. Or buy now, $9.99

KeepingYouAwake is on for two MacBooks. The one with its lid open keeps working. The one with its lid closed goes to sleep. z z Lid open Lid closed
Same app, same session.KeepingYouAwake holds the Mac awake while the lid is open. Close the lid and the Mac sleeps anyway.

KeepingYouAwake is one of the best free keep-awake apps for Mac: small, open source under the MIT license, and installable from its GitHub releases or with brew install --cask keepingyouawake. As of October 5, 2026 the latest release is 1.6.8 from September 2025, which updated the app icon for macOS Tahoe. It is great at keeping a Mac awake through a long download or a presentation. It is not built for a closed lid, and that is not a bug you can fix in its settings.

Does KeepingYouAwake work with the lid closed?

No. The KeepingYouAwake README answers this question directly: because of macOS limitations and thermal considerations, it only prevents sleep on desktop Macs and on portable Macs with an open lid. If you close a MacBook lid with KeepingYouAwake active and no external display attached, the Mac sleeps, local jobs stop making progress, and network sessions drop until it wakes.

Why: KeepingYouAwake wraps caffeinate

The README describes the app as a small wrapper around Apple's caffeinate command line utility. Its changelog shows which flags: since version 1.2.1 it runs caffeinate -di, described as less aggressive handling when the MacBook lid is closed than the earlier caffeinate -disu.

Per the caffeinate(8) manual, -i creates an assertion that prevents idle system sleep and -d one that prevents display sleep. Idle sleep is the timer that puts a Mac to sleep after a period of no input. Closing the lid is a separate sleep trigger, and those assertions do not block it.

KeepingYouAwake starts caffeinate -di. That holds off idle sleep, but the lid-close path is not covered, so the Mac still sleeps. KeepingYouAwake caffeinate -di Idle sleep held off Lid close still sleeps
One path covered, one not. The caffeinate assertion stops the idle timer. The lid has its own sleep policy, and nothing in this chain changes it.

You can see the assertion yourself. With KeepingYouAwake active, run this in Terminal and look for the entries owned by caffeinate:

pmset -g assertions

The assertion being there proves KeepingYouAwake is working. It also shows the limit: an assertion against idle sleep is all it holds. The caffeinate guide goes deeper into the two sleep paths.

Issue #262: the lid-closed request

Users do want this. KeepingYouAwake issue #262, opened on September 28, 2026, notes that the app does not work with the lid closed because it uses caffeinate, and caffeinate does not support it. The author proposes an opt-in setting under an Advanced section, off by default, that wraps pmset disablesleep and needs root whenever it is turned on, and asks the maintainer before opening a pull request.

As of October 5, 2026 the issue is open, has one supporting reply, and has no maintainer response. Nobody can say yet whether it will ship. If it does, it would rely on the same system-wide flag as running sudo pmset -a disablesleep 1 yourself, with the trade-offs that come with it: admin rights, and a setting that stays on until it is turned off.

Caffeine, Caffeinated and Theine have the same limit

KeepingYouAwake was inspired by the original Caffeine from Lighthead Software, which its README says has not been updated in a while. Several current apps carry the idea on. Here is what their Mac App Store listings say about a closed lid, as of October 5, 2026:

So if you searched for "caffeine app lid closed", the honest answer is the same as for KeepingYouAwake: these are open-lid tools.

With KeepingYouAwake alone, a job stalls when the lid closes and the Mac sleeps. With Clamshell armed, the job keeps going. z KeepingYouAwake sleeps at close Clamshell armed keeps running
Same job, lid closed, no monitor. An idle-sleep assertion does not survive the lid. A lid sleep-state override does.

How to keep the Mac awake with the lid closed

Pick by what you have on hand. All of these work alongside KeepingYouAwake for the times the lid stays open.

An external display

Apple's closed-display mode keeps a MacBook awake with the lid closed when it has power, an external display, keyboard and mouse. KeepingYouAwake even has an advanced setting to activate when an external display is connected. Best at a desk.

sudo pmset -a disablesleep 1

Free and built in, and it does survive a closed lid. It is system-wide, needs admin rights, has no timer, and stays on until you set it back. Read how to undo it first, and the pmset guide for the risks.

Amphetamine

Free, with a Closed-Display Mode, and an optional Power Protect add-on for Apple Silicon laptops. If it gives you trouble, see Amphetamine not working with the lid closed.

Clamshell for Mac

A menu bar app built only for the closed lid on Apple Silicon MacBooks with macOS 14 or later. No sudo, no monitor. $9.99 once after a 7-day trial.

How Clamshell differs from KeepingYouAwake

Clamshell does not run caffeinate. While armed, it uses the unprivileged IOKit lid sleep-state control on the macOS power manager, plus its own idle-sleep assertion, so both sleep paths are covered. It does not use pmset disablesleep either.

Where KeepingYouAwake is the better fit: it is free and open source, it runs on Intel Macs and older macOS versions, and it covers desktop Macs. If your lid stays open, you do not need Clamshell.

Clamshell keeps your Mac awake with the lid closed. Free for 7 days, then $9.99 once for one Mac. 14-day money-back guarantee.

Download free trial

Frequently asked questions

Does KeepingYouAwake work with the lid closed?

No. Its README says it only prevents sleep on desktop Macs and on portable Macs with an open lid, because of macOS limitations and thermal considerations. Closing a MacBook lid still puts the Mac to sleep while KeepingYouAwake is active.

Why does KeepingYouAwake not keep my MacBook awake with the lid closed?

KeepingYouAwake is a small wrapper around Apple's caffeinate tool. caffeinate creates power assertions that prevent idle sleep. Closing the lid triggers a separate sleep path that those assertions do not block.

Will KeepingYouAwake add a lid-closed mode?

Unknown. GitHub issue #262, opened September 28, 2026, proposes an opt-in advanced setting that wraps pmset disablesleep and needs root when toggled on. As of October 5, 2026 the issue is open and the maintainer has not replied.

Does the Caffeine app work with the lid closed?

Not the Caffeine-style apps that document it. Caffeinated's App Store listing says its anti-sleep feature does not work when you close the lid, and Theine's says it cannot prevent sleep on a closed MacBook with no additional display. Caffeine Utility's listing does not mention a closed lid, so test it before relying on it.

How do I keep a MacBook awake with the lid closed instead?

Use Apple's closed-display mode with power, an external display, keyboard and mouse; sudo pmset -a disablesleep 1 if you will remember to undo it; Amphetamine's Closed-Display Mode; or Clamshell for Mac, a menu bar app that keeps an Apple Silicon MacBook awake with the lid closed while armed, without sudo.

Can I keep using KeepingYouAwake alongside Clamshell?

Yes. KeepingYouAwake keeps holding off idle sleep while the lid is open. Clamshell covers lid-close sleep while it is armed, and it holds its own idle-sleep assertion during that session.

Related guides

Sources checked October 5, 2026: the KeepingYouAwake README, changelog and releases, KeepingYouAwake issue #262, the macOS caffeinate(8) manual, the Mac App Store listings for Caffeinated, Theine and Caffeine Utility, and Apple's closed-display guidance. Clamshell behavior is described from its changelog and FAQ. Clamshell is the publisher of this guide and is not affiliated with KeepingYouAwake or the other apps named. Product names belong to their respective owners.