A safer alternative to pmset disablesleep

LidRun Team
6 min readJun 2026
A safer alternative to pmset disablesleep

If you have searched for how to keep a Mac awake with the lid closed, you have probably found pmset disablesleep. It works, but it is a system-wide switch that is easy to leave on by accident. Here is a safer way to get the same result, with the cleanup handled for you.

What pmset disablesleep does

pmset is the built-in macOS power management tool. The command pmset -a disablesleep 1 tells the system to ignore a lid close, so the Mac keeps running with the lid shut, and pmset -a disablesleep 0 puts that behaviour back.

It is the documented, no-kernel-extension way to do closed-lid work, which is why it shows up in every guide on the subject. It needs administrator rights, because it changes a system-wide power setting.

Used carefully, it does exactly what it says. The risk is not the command; it is what happens when you forget about it.

Why leaving it on is risky

disablesleep 1 is global and sticky. It stays on until something sets it back to 0, there is no visible reminder that it is active, and a reboot does not always clear it.

Forget to undo it and your Mac stops sleeping when you close the lid, every time, for every app. A run you meant to keep alive for an hour can keep the machine awake in your bag the next afternoon.

On a laptop that means battery drained for no reason and heat trapped under a closed lid with nothing watching for it. The command did its job; the problem is that nothing turned it off.

Related guideLidRun vs caffeinate: which keep-awake tool fits your workflow?

A safer wrapper around the same toggle

LidRun uses the same documented pmset disablesleep toggle, no kernel extension and no private tricks, but always pairs it. Turn closed-lid mode on and it sets disablesleep 1; stop or quit and it sets it back to 0.

If the app is closed unexpectedly while the setting is on, LidRun detects the leftover state and resets disablesleep 0 the next time it launches. That reset is on next launch, not the instant something goes wrong, so it is fair to call it a recovery step rather than a live guarantee.

Around that it adds what a raw command cannot: a low-battery auto-stop, a thermal step-back, charging-only and a session timer that gives every run a hard cap. The aim is to reduce the risk of a forgotten setting, not to claim a Mac is incapable of overheating.

When raw pmset is fine

If you are comfortable on the command line, run it briefly, and reliably set it back to 0 yourself, pmset disablesleep by hand is perfectly reasonable. It is the standard tool for a reason.

The wrapper earns its place when a run is long, unattended, or overnight, which is exactly when you are most likely to walk away and forget the switch is still on.

Either way the safety basics are the same: keep the Mac plugged in and ventilated, leave a low-battery floor on, and never seal a running Mac in a closed bag. Software can pair a toggle for you; it cannot move air.

A feature of LidRun.

Try it instead of fighting clamshell sleep

LidRun keeps your work running with the lid closed, with battery and thermal safety built in.

Download for macOS

Frequently asked

Is pmset disablesleep dangerous?

Not inherently — it is a documented Apple command. The risk is leaving it on by accident, since it is system-wide and stays active until set back to 0, with no visible reminder.

What if I forget to turn it off?

That is the exact problem LidRun is built to avoid. It pairs the toggle so it is undone on stop or quit, and resets a leftover setting on its next launch if the app closed unexpectedly.

Does LidRun need an admin password too?

Yes. Changing disablesleep is a system-wide setting, so macOS asks for admin rights each time closed-lid mode is enabled, through the native prompt. There is no resident background helper doing it silently.

Is this a kernel extension?

No. LidRun uses the documented pmset toggle, not a kext. That is also why it ships as a direct download rather than through the Mac App Store.