How to keep a MacBook awake with the lid closed on macOS
The lid goes down, the download stops. That is not the keep-awake failing — it is a second sleep rule that macOS keeps entirely separately.
Why a closed Mac sleeps anyway
A program that keeps your Mac awake takes out an assertion — the same mechanism macOS itself uses while a film is playing. It holds the display and the system awake, and it does that reliably, as long as the lid is open.
Closing the lid is a different event. macOS puts the machine to sleep through its own path, and no assertion stands in the way. This is why the best keep-awake app in the world does nothing here: it is working on the wrong rule.
What is actually needed
A closed lid requires a system setting to be flipped — the switch is called pmset disablesleep. It is not a trick and not a loophole; Apple ships it. It simply does not live in System Settings, it lives on the command line.
Toxin flips it through a small helper of its own. With the helper installed, the Mac stays awake with the lid closed. Without it the switch has no effect, and Toxin keeps the Mac awake only while the lid is open. That sentence is on the home page too, because a promise with a condition is no promise without the condition.
What else happens
A closed Mac with no external display keeps working and shows nothing. If you put it into a bag like that, think about heat: the enclosure is what sheds it, and inside a closed bag it has nowhere to go.
The switch also stays flipped only while a session runs. Toxin resets it when the app starts and when it quits. Without that reset there would eventually be a Mac that stays awake and nobody left who remembers why.
When lid mode earns its place
With an external display, power and a connected keyboard, macOS already does this by itself — that is clamshell operation, and it needs no app. It gets interesting without those conditions: no monitor, no charger, just a machine that has a job to finish.
That is what lid mode is for. An overnight backup, a long upload, a build still running: the lid goes down, the machine carries on, and when the span you chose is over Toxin lets go by itself.
The short path
- Check the menu bar icon: filled means a session is running, outlined means none is.
- Turn on lid mode — without the helper the switch has no effect.
- Pick a span instead of leaving it unlimited: a machine that stops on its own overnight is the better machine.
- Close the lid. On quit, Toxin resets the system setting itself.
Common questions
Does this work on battery?
Yes. The system setting that lid mode flips does not ask about the charger. How long the job then runs is up to the battery.
What happens when I open the lid again?
Nothing special. The session carries on until its span runs out or you end it.
Lid mode is part of Pro and needs the helper. Toxin is a menu bar app for macOS and is not on the Mac App Store yet — the home page says what it does and what Pro costs.