Skip to content
86% off$349 $48.86code BF2026

Docs

Glowmoth docs25 pages

Glowmoth closed-lid mode: keep a MacBook awake, lid closed

Turn on Glowmoth's closed-lid mode, approve its helper in Login Items, and see exactly when normal sleep returns and what each status caption means.

Updated 6 min read

On this page

This page shows how to use Glowmoth's closed-lid mode, the Stay awake with the lid closed setting, so your MacBook stays awake with the lid shut during a keep-awake session. It also explains the helper it installs, what switches it off, and exactly when normal sleep comes back.

What Stay awake with the lid closed does

On its own, Glowmoth blocks only idle sleep. Closing the lid still puts the Mac to sleep. Closed-lid mode adds a small privileged helper that turns off system sleep, but only while Glowmoth is actually keeping your Mac awake.

Any reason counts: your own session, a rule, a saved app, process or folder, a coding agent, a scheduled run or a command-line lease. While at least one of them holds the Mac and Glowmoth isn't paused, the Mac stays awake with the lid closed. Between sessions your Mac sleeps as usual.

You don't need an external display or a power adapter.

Which Macs support it, and what you need

  • A Mac with a battery. The Closed Lid section appears only on laptops. Desktop Macs don't have it.
  • Glowmoth in your Applications folder. If it runs from anywhere else, macOS may refuse to install the helper.
  • An active license or trial. Without one, Glowmoth keeps nothing awake, so closed-lid mode never engages.
  • Notifications (optional). Glowmoth uses a notification to confirm when the lid closes during a session.

Turn on Glowmoth closed-lid mode and approve the helper

  1. Right-click the moth icon in the menu bar and choose Settings….
  2. Click the Safety tab.
  3. Under Closed Lid, turn on Stay awake with the lid closed.
  4. Glowmoth installs its helper and opens the Login Items pane of System Settings. Allow the Glowmoth helper there.
  5. If the pane didn't open, or you closed it too early, click Open Login Items under the switch and allow the helper.
  6. Go back to Glowmoth. When the helper is approved, the caption under the switch reads "Works during a session. Your Mac sleeps as usual otherwise."
Glowmoth Settings, Safety tab: Stay awake with the lid closed on, caption Works during a session. Your Mac sleeps as usual otherwise.
Closed-lid mode after the helper is approved.

To check it, start a session. For example, right-click the icon and choose 1 Hour. The caption changes to "Active: your Mac stays awake with the lid closed."

While closed-lid mode is on, Pause on low battery and Pause when the Mac is running hot are forced on. Their switches are disabled and say "Always on while closed-lid mode is on." The battery floor uses your Below N% value, which is 20% by default.

When sleep is disabled, and when it comes back

The helper uses the system-wide SleepDisabled setting:

  • When Glowmoth starts keeping the Mac awake (any reason, not paused), the helper runs pmset -a disablesleep 1.
  • When that ends, the helper runs pmset -a disablesleep 0 straight away.

Normal sleep comes back in each of these cases:

What happensWhen normal sleep returns
The last keep-awake reason ends (a timer runs out, you click Stop, an app quits, an agent's cool-down ends)Immediately
A battery or heat safety limit pauses GlowmothImmediately, because a paused Glowmoth isn't keeping the Mac awake
Glowmoth stops renewing its lease (for example, it hangs)Within 30 seconds. The app renews a 30-second lease every 10 seconds, and normal sleep returns when it lapses
Glowmoth quits, crashes or is force-quitImmediately (the connection to the helper drops)
The helper is removed, or the Mac shuts downImmediately
The Mac restarts while sleep is still disabledAt the next boot, when the helper starts and finds its marker file

The helper only undoes a SleepDisabled that Glowmoth set itself. While it has sleep disabled, it keeps a root-owned marker file at /Library/Application Support/app.macsuite.glowmoth.helper/sleep-disabled-by-glowmoth. If something else turned sleep off with pmset, Glowmoth leaves that setting alone and says so in the caption.

What cuts closed-lid mode off (battery floor, heat)

Two limits turn normal sleep back on even while a session runs:

  • Low battery. On battery power, closed-lid mode turns off below your battery floor. The caption reads "Off below 20% battery. Plug in to resume." (showing your own percentage).
  • Heat. It turns off immediately when macOS reports its thermal state as serious or worse. This is stricter than the regular heat pause, which waits 60 seconds. The caption reads "Off while your Mac is running hot."

The regular safety pauses still apply as well. A low-battery or heat pause releases everything Glowmoth holds, so closed-lid mode ends with it. For the battery floor, the heat limit and Resume Anyway (30 min), see Battery and heat safety limits.

What happens when you close the lid during a session

Glowmoth plays the "Glass" sound and posts a notification:

Lid closed, staying awake Normal sleep returns when the session ends, below N% battery, or if your Mac runs hot.

The banner appears only if notifications are allowed for Glowmoth. If you close the lid while nothing is keeping the Mac awake, it sleeps as usual.

What the status captions mean

The caption under Stay awake with the lid closed shows what closed-lid mode is doing right now.

Glowmoth Settings, Safety tab: Closed Lid on, caption Allow the Glowmoth helper in Login Items to finish, and Open Login Items
CaptionWhat it meansWhat to do
"Installs a small helper. Battery and heat limits stay on."The switch is off.Turn it on to install the helper.
"Allow the Glowmoth helper in Login Items to finish."The helper is installed, but macOS is waiting for your approval. Closed-lid mode can't work yet.Click Open Login Items and allow the helper.
"macOS couldn't install the helper. Move Glowmoth to Applications and try again."macOS refused to register the helper.Quit Glowmoth, move it to Applications, open it from there and turn the switch on again.
"Works during a session. Your Mac sleeps as usual otherwise."Ready. Nothing is keeping the Mac awake right now, so closing the lid sleeps it.Start a session, or wait for an automatic reason to start holding the Mac.
"Active: your Mac stays awake with the lid closed."Sleep is disabled right now.Nothing. Closing the lid won't sleep the Mac.
"Off below N% battery. Plug in to resume."You're on battery and below the floor.Plug in.
"Off while your Mac is running hot."macOS reports a serious (or worse) thermal state.Let the Mac cool down, or stop the heavy work.
"Sleep is already turned off with pmset, outside Glowmoth."Something other than Glowmoth set disablesleep. Glowmoth won't touch it.If you didn't intend that, turn sleep back on (see the next section).
"Can't reach the helper. Turn closed-lid mode off and on again."The app lost contact with the helper.Turn the switch off, then on. If it keeps happening, see Troubleshooting Glowmoth.

Check or reset the sleep setting yourself

To see whether sleep is currently disabled:

bash
pmset -g | grep SleepDisabled

This only reads the setting. 1 means sleep is disabled; 0 or no output means it isn't.

If the caption says sleep was turned off outside Glowmoth and you don't want that, turn sleep back on:

bash
sudo pmset -a disablesleep 0

This restores normal sleep for all power sources and asks for your administrator password. To undo it, run sudo pmset -a disablesleep 1. If another app set the value, it may set it again. Don't run this to override Glowmoth while its caption says "Active"; end the session instead.

Remove the helper

  1. Open Settings… and click Safety.
  2. Turn off Stay awake with the lid closed.
  3. Click Remove Helper. The button appears only while the switch is off and the helper is still installed.

Glowmoth unregisters the helper.

Limits and gotchas

  • No "always" mode. Closed-lid mode never applies outside a keep-awake session. To keep a MacBook awake with the lid closed until you say otherwise, start an Indefinitely session.
  • Manual mode and Stop Everything can end it. Both stop automatic reasons from holding the Mac. If your own session isn't running either, nothing holds the Mac and closing the lid sleeps it.
  • The battery and heat limits can't be turned off while closed-lid mode is on.
  • The explainer still shows the lid warning. On every laptop, See what's keeping your Mac awake lists "Closing the lid sleeps this Mac unless it has power and an external display." even with closed-lid mode on. Trust the caption under the switch instead.
  • It isn't in the settings file. Export… doesn't include closed-lid mode, so on a new Mac turn it on again and approve the helper. Reset all settings sets the switch back to off.
  • Logs. The helper writes to the unified log under subsystem app.macsuite.glowmoth.helper, category closed-lid. Mention this if you contact MacSuite support.

Every app.
One purchase.