StillOn

StillOn field manual

caffeinate vs pmset vs StillOn for lid-closed Mac work

Understand which Mac sleep control addresses idle sleep, persistent power settings, or the special lid-close transition.

Written by Lev6 min read

The tools solve different sleep paths

The confusing part of Mac power management is that “awake” is not one state. The display can sleep while the system works. The system can sleep after user inactivity. A notebook can also enter sleep because its lid closes. Commands that prevent idle sleep do not necessarily override the lid event.

Choose the tool based on the transition you need to change, and keep the scope as small as possible. A long-running command usually needs a temporary assertion. A permanently adjusted power policy is a different decision. Closing the lid without an external display is a third case.

Use caffeinate for temporary assertions

The built-in caffeinate command creates power-management assertions. It is useful when a command or a period of activity should prevent idle system sleep. It can run for a duration or wrap another process, so the assertion ends predictably.

That makes caffeinate a good first choice when the lid will remain open. On a normal MacBook configuration, it should not be treated as a general promise that closing the lid will leave the system awake.

caffeinate -i -- your-long-running-command
  • Built into macOS.
  • Temporary and easy to tie to a process.
  • Useful for idle-sleep prevention with the lid open.
  • Not, by itself, a lid-close override on a normal notebook setup.

Use pmset to inspect and administer power policy

pmset reads and changes macOS power-management settings. It is useful for inspecting the current policy and for administrators who intentionally want a persistent configuration change. Many changes require elevated privileges and can affect battery and power-adapter behaviour separately.

Persistent system settings have a wider blast radius than a per-task assertion. Record the original values, change only documented settings you understand, and restore them when the need ends. pmset also exposes assertion information that can help explain why a Mac is awake.

pmset -g
pmset -g assertions

Use StillOn for an explicitly armed lid close

StillOn targets the moment a supported MacBook closes without requiring an external display. It combines the lid-specific control with a sleep assertion, display blanking, and session locking. A one-shot Fn gesture or a menu-bar control makes the exception explicit.

The tradeoff is that the lid-specific control relies on an undocumented macOS interface. It needs physical testing on supported hardware after system updates, and it should be used only when the machine has safe ventilation and a clear reason to remain available.

  • Focused on lid-closed operation for Apple-silicon and Intel MacBooks.
  • No administrator password or kernel extension.
  • Restores the setting when the lid opens or the app exits.
  • Still requires a separate tool if you want remote monitoring or control.

A practical decision rule

If the lid stays open and you only need to prevent inactivity from suspending a command, begin with caffeinate. If you are administering documented system-wide power policy and accept the persistent scope, inspect pmset. If the requirement is specifically to close a supported MacBook while a local task continues, test a lid-focused tool such as StillOn.

None of these tools guarantees that the workload succeeds. Pair the power decision with task-specific status, a battery plan, and safe physical placement.