Keep the Display On in Glowmoth: Screen Saver and Lock
Keep the display on with Glowmoth, or keep only the Mac awake. Let the screen saver start when you're away, end a session on lock, and fix surprise locks.
Updated 7 min read
On this page
This page shows how Glowmoth's Keep Display On setting decides whether your screen stays on or only the Mac stays awake. It also covers how the screen saver and screen lock work alongside a session.
If your Mac stayed awake but the screen went black, the cause is usually one of two things. Keep Display On was off for your session, or only automatic reasons were holding the Mac. Apps, processes, folders, coding agents and scheduled runs never keep the display on, and rules only do so when you turn that on for the rule.
Keep Display On vs keeping the Mac awake
Glowmoth holds at most one macOS power assertion at a time. It uses one of two kinds:
| Kind | What stays on | What can still sleep |
|---|---|---|
| Display on | The display, and with it the whole Mac | Nothing sleeps from idle |
| System only | The Mac, so downloads, builds and network jobs keep running | The display, on your usual macOS schedule |
Glowmoth uses the display kind while any active reason wants the display on. Otherwise it uses the system kind. When it switches between them, it creates the new assertion before releasing the old one, so there is no gap.
Both kinds only block idle sleep. Choosing Sleep from the Apple menu, pressing the power button or closing a laptop lid still sleeps the Mac. The lid is the exception if you turn on closed-lid mode.
To see which kind is active right now, run this in Terminal:
pmset -g assertionsIt lists the current power assertions and changes nothing. Glowmoth's entry is named after its reasons, for example "Glowmoth: Session for 1 hour". PreventUserIdleDisplaySleep next to it means the display stays on. PreventUserIdleSystemSleep means only the Mac stays awake.
Change Keep Display On
Your own session keeps the display on by default. Turn it off for long jobs you don't need to watch. The display then sleeps as usual while the work keeps running.
You can change it in three places:
- Panel: open the panel (click the menu bar icon, or Option-click it if left-click is set to toggle), open Show More and use the Keep Display On switch.
- Right-click menu: right-click the menu bar icon and choose Keep Display On. A checkmark shows it is on.
- Settings: right-click the icon, choose Settings… (⌘,), click Sessions, and under Display use Keep the display on.


Running session or next session
What the setting affects depends on where you change it:
- Panel switch or menu item while a session runs: changes the running session only. The panel tooltip reads "Applies to this session."
- Panel switch or menu item with no session running: changes the default for the next session. The tooltip reads "Applies to the next session."
- Settings ▸ Sessions ▸ Keep the display on: sets the default for new sessions. Its caption reads "For new sessions. The panel switch changes the running one."
If you switch to a different duration while a session runs (for example from 1 Hour to 4 Hours), the session keeps its display choice.
Choose it when you start a session from a script
Scripts and automations can set the display behavior for one session:
| How you start | Display on | Display may sleep |
|---|---|---|
Command-line tool (on, for, until, run, lease acquire) | --display | --no-display |
glowmoth:// URL (start, toggle) | display=1 | display=0 |
| Shortcuts action Start Keeping Awake | Keep Display On on | Keep Display On off |
With run, put the display flag before the --. If you leave the Shortcuts parameter empty, Glowmoth uses your setting. Details are in the glowmoth command-line tool and Shortcuts, Siri and the glowmoth:// URL scheme.
Which automatic reasons can keep the display on
Most automatic reasons hold the Mac with the system kind only:
| Reason | Can keep the display on? |
|---|---|
| Your own session | Yes, when Keep Display On is on (the default) |
| A rule | Only if the rule's own Keep the display on switch is on (off by default) |
Command-line lease, run, on, for, until | Only with --display |
glowmoth:// URL | Only with display=1 |
| Shortcuts Start Keeping Awake | Only with Keep Display On |
| Apps, processes, folders, downloads | No |
| Coding agents | No |
| Scheduled runs | No |
To keep the screen on whenever a condition is true, such as while you're docked at your desk, use a rule and turn on its Keep the display on switch. With the switch off, the rule editor reads "Otherwise only the Mac stays awake; the display sleeps as usual." See automatic rules.
The same trick works for a single app. The Apps list in Settings can't keep the screen on, because app reasons are system-only. Instead, add a rule with the App Running condition and turn on Keep the display on.
Let the screen saver start when you're away
While Glowmoth keeps the display on, the screen stays on even after you walk away. To keep the Mac awake but let the screen saver and display sleep take over when you're idle:
- Right-click the menu bar icon and choose Settings… (⌘,).
- Click Sessions.
- Turn on Let the screen saver start when I'm away.
- Set After N min idle (1 to 120 minutes; the default is 10).
After that much time without keyboard or mouse input, Glowmoth drops from the display kind to the system kind. The app describes it as "Your Mac stays awake; only the display may sleep." Your macOS screen saver and display settings then decide what the screen does. When you come back, Glowmoth restores the display kind; it checks every 5 seconds while it has stepped back.
This only matters while some reason wants the display on. If your session has Keep Display On off, the display already sleeps as usual.
End the session when the screen locks
Turn this on if locking your Mac means you're done and it may sleep:


- In Settings ▸ Sessions, turn on End the session when the screen locks, or
- In the panel, open Show More and turn on End When Screen Locks.
Both switches control the same setting, which is off by default. Two limits:
- It ends your session only. Rules, apps, processes, folders, agents, scheduled runs and command-line leases keep holding the Mac after the lock.
- It doesn't run your When a Session Ends actions (such as Sleep the Mac or a shell command). Those run only when the last reason ends on its own, like a timer running out. See notifications and end actions.
It pairs well with the screen saver setting. If macOS asks for your password once the screen saver starts or the display sleeps, walking away eventually locks the Mac, and the lock ends your session.
Why the screen can still lock while Glowmoth is on
Glowmoth has no "prevent screen lock" switch. It keeps the display from going idle, but it doesn't change macOS lock settings or fake keyboard and mouse activity. If the screen locked during a session, check these causes:
- The display was allowed to sleep. Keep Display On was off, or only system-only reasons were holding the Mac. If macOS asks for your password after the display turns off, the screen locks then. Turn on Keep Display On, or use a rule with Keep the display on.
- The screen saver setting stepped back. With Let the screen saver start when I'm away on, the display can sleep after your idle time and macOS may lock it. Turn the setting off or raise the minutes.
- A safety limit paused Glowmoth. On low battery or when the Mac runs hot, Glowmoth releases its assertion for every reason, so the display can sleep and lock. The icon shows Paused. See battery and heat safety limits.
- An end action locked it. If When a Session Ends ▸ Then is set to Lock the Screen, the screen locks when the last reason ends on its own.
- You or a Hot Corner locked it. ⌃⌘Q (Control-Command-Q) locks the screen right away, and a Hot Corner can start the screen saver or lock the screen. Glowmoth can't block either.
- You were logged out, not locked. Automatic log-out after inactivity is separate from sleep. If it's set, Glowmoth notes it under Also Keeping This Mac Awake in the panel's Show More. See what's keeping your Mac awake.
To change when macOS asks for your password after the screen saver or display sleep, open System Settings and search for "Lock Screen".
Settings on this page
| Setting | Where | What it does | Default |
|---|---|---|---|
| Keep the display on | Settings ▸ Sessions ▸ Display | Display kind for new sessions | On |
| Keep Display On | Panel (Show More), right-click menu | Running session, or the next one if none runs | Follows the setting above |
| Let the screen saver start when I'm away | Settings ▸ Sessions | Lets the display sleep after idle time while the Mac stays awake | Off |
| After N min idle | Settings ▸ Sessions | Idle time before Glowmoth steps back (1–120 min) | 10 |
| End the session when the screen locks / End When Screen Locks | Settings ▸ Sessions, panel (Show More) | Ends your session on lock | Off |
| Keep the display on (per rule) | Settings ▸ Automation ▸ Rules, rule editor | Lets a rule keep the display on | Off |
Export… and Import… in Settings ▸ Advanced ▸ Settings file include Keep the display on, the two screen saver settings and the end-on-lock setting. They don't include rules or their display switches.