---
title: "Keep a Mac awake with the lid closed. — iSurge"
description: "Close a MacBook and it sleeps, even mid-download. Three ways to keep a Mac awake with the lid closed, what each costs, and how iSurge’s Keep Awake helps."
url: https://isurgemac.com/blog/keep-mac-awake-lid-closed/
---

[BLOG](https://isurgemac.com/blog/)

# Keep a Mac awake with the lid closed. Three ways, and what each one costs.

Close a MacBook and it sleeps, even mid-download. Three ways to keep a Mac awake with the lid closed, what each costs, and how iSurge’s Keep Awake helps.

By Ruthran Baskar · 27 October 2026 · 5 min read

IN SHORT

- A MacBook sleeps when you close the lid, even if an app is keeping it awake.

- On power with an external display, keyboard or mouse, macOS keeps it awake by itself.

- Anywhere else, `sudo pmset -a disablesleep 1` works, but it stays on until you turn it off.

- iSurge’s Keep Awake turns that switch on only while it runs, and back off when it ends or the battery gets low.

Close the lid of a MacBook and it goes to sleep. Most of the time that’s what you want. Sometimes it isn’t: a big download, a build, a backup, a server a phone or a colleague is using, or music playing to speakers across the room.

There are three ways to keep a Mac awake with the lid closed: plug in a display, turn sleep off in Terminal, or use an app that does the Terminal part for you and undoes it. Here’s each one, and what it costs.

KEEP AWAKE

## Why does a Mac sleep with the lid closed?

Apps that keep a Mac awake, including the `caffeinate` command that comes with macOS, stop it sleeping while you’re not using it. Closing the lid is a different thing, and macOS says so itself: a Mac kept awake that way “may still sleep for lid close, Apple menu, low battery, or other sleep reasons.” So keeping it awake with the lid shut takes a little more.

KEEP AWAKE

## 1. Plug in a display

macOS has one way built in, called closed-display mode. With your Mac on power and connected to an external display, and a keyboard or mouse, closing the lid doesn’t sleep it. It carries on, on the other screen.

At a desk, it’s the best way: there’s nothing to set up or remember. It doesn’t help on a sofa or a train, or when the Mac is on battery.

KEEP AWAKE

## 2. Turn sleep off in Terminal

macOS also has a hidden switch that stops the Mac sleeping at all, lid or not. Open Terminal, type this and then your password:

`sudo pmset -a disablesleep 1`

And to put it back:

`sudo pmset -a disablesleep 0`

It works on battery too. The catch is that it’s a switch, not a timer. It stays on until you turn it off, even after a restart. Forget it, and the Mac stays awake in your bag, getting warm and emptying its battery. With the lid closed, the screen can stay lit behind it too.

To see whether it’s on, run this. `SleepDisabled 1` means the Mac won’t sleep, `0` means it sleeps as usual:

`pmset -g | grep SleepDisabled`

KEEP AWAKE

## 3. Keep Awake, in iSurge

iSurge’s Keep Awake uses that same switch, but only while Keep Awake is on, and it always puts it back. Open the notch’s Keep Awake tab, pick a length and turn on “Also with the lid closed”.

Keep Awake in the notch, with its lid switch.

The first time, macOS asks you to allow a small helper, once, in System Settings › General › Login Items & Extensions. Settings › Keep Awake shows whether it’s allowed. Only a helper you’ve allowed can change that switch, and it does that one thing and nothing else. It doesn’t read your apps or processes; [how iSurge sees your processes](https://isurgemac.com/blog/a-thousand-processes/) explains what it reads instead.

Then it does the remembering for you:

- When Keep Awake ends, because its time is up, you turned it off or you quit iSurge, sleep comes back on at once.

- If iSurge stops answering, the helper puts sleep back after 90 seconds, and it does the same after a restart.

- On battery, it asks for a charger at 20% and lets go below 10%, in Low Power Mode, or when macOS says the Mac is too hot, as it can get in a bag.

- When you close the lid, the screen goes to sleep. The Mac doesn’t.

The first few times, check it with the `pmset` line above while the lid is closed and Keep Awake is on: it should read 1, and 0 once Keep Awake ends.

KEEP AWAKE

## How Keep Awake works with the lid open

Most of the time you don’t need the lid switch at all. Keep Awake on its own stops your Mac sleeping while you’re away from it, during a long upload, a render or a call you’re only listening to.

- **Lengths:** Indefinite, 15 min, 30 min, 1 hour, 8 hours, or Until a time you pick.

- **Starting it:** click the lantern in the menu bar or press ⌃⌥K. Either one starts the length you picked last, Indefinite at first. The notch, the menu bar’s Keep Awake card and the iSurge window can start it too.

- **Keep the screen on:** on at first. Turn it off and the screen can sleep while the Mac keeps working.

- **Turn off below 10% battery:** on at first. From 20% on battery it asks you to connect a charger and stays on.

- **Turn on when iSurge opens:** in Settings › Keep Awake, for a Mac that should always stay up.

Keep Awake has its own card in the menu bar.

While it’s on, a lit lantern takes the place of iSurge’s mark in the menu bar and sits at the far left of the notch. The notch says so for a moment when it starts and when it ends. A timed Keep Awake carries on if you quit and open iSurge again; Indefinite ends when you quit.

While it’s on, the notch says so.

## Which one should you use?

At a desk with a display, closed-display mode: you need nothing else. Anywhere else, the Terminal switch works, as long as you remember to turn it off. Keep Awake remembers for you, and stops on its own when the battery runs low.

Whichever you use, a closed Mac still needs air. If it’s going into a bag, let it sleep.

## Questions

### Does it work on battery?

Closed-display mode needs power. The Terminal switch and Keep Awake both work on battery. Keep Awake asks for a charger at 20% and lets the Mac sleep below 10%, or in Low Power Mode.

### What if I forget to turn the Terminal switch off?

It stays on, even after a restart, until you run `sudo pmset -a disablesleep 0`. Run `pmset -g | grep SleepDisabled` to check: 0 means sleep is back.

### Does Keep Awake need admin rights?

Only for the lid. Keep Awake with the lid open needs nothing. With the lid closed, macOS asks you once to allow iSurge’s helper in Login Items & Extensions.

Keep Awake is part of iSurge, the Mac app that shows what your Mac is doing at the notch and in the menu bar ([the launch post](https://isurgemac.com/blog/look-up/) has the tour). Its lid option came in 0.4; the [changelog](https://isurgemac.com/changelog/) has the rest. iSurge is paid from 0.4, once or for a year: [see the prices](https://isurgemac.com/pricing/).

## Get iSurge

Pay once, yours for good.

[Buy iSurge](https://isurgemac.com/pricing/)

Already have it? [Download](https://isurgemac.com/download)

Requires a Mac with Apple silicon (M1 or later) and macOS 15 Sequoia or later. Notch features need a MacBook with a notch; everything else works on any supported Mac.
