Skip to content
Add to ChromeAdd to Edge Add to Home Screen

Fix

Keep a Mac awake with the lid closed: what works

No web page or browser extension can keep a Mac awake after you close the lid: closing it puts the Mac to sleep whatever the browser asks. The supported way round it is clamshell mode, with the Mac on power and an external display connected. Terminal settings and some apps can go further, at a cost in heat and battery. With the lid open, a visible tab is enough.

Sources checked Saturday, 26 September 2026 5 min read By Soubhik Biswas
On this page
  1. Use clamshell mode in 4 steps
  2. If it still sleeps or you can’t change the settings
  3. Why closing the lid wins
  4. Other options, safest first
  5. Heat and battery
  6. Confirm what is keeping it awake
  7. Honest limit
  8. Or skip the settings: open AwakeTab
  9. Questions
  10. Related

Use clamshell mode in 4 steps

0 of 4 done

Apple calls this closed-display mode. Apple’s guide lists what your model needs. We have not checked every model’s requirements, so read it for yours.

  1. Step 1 · Connect the power adapter

    Next up

    Clamshell mode needs the Mac on power. Check that it is charging before you go on.

  2. Step 2 · Connect an external display

    Turn the display on and make sure it shows your desktop.

  3. Step 3 · Close the lid

    The desktop moves to the external display and the Mac keeps running. Leave it on a hard, open surface, not in a bag or sleeve.

  4. Step 4 · Check that it stayed awake

    Terminal › pmset -g log

    pmset -g log records each sleep and wake with a reason. If it shows a sleep when you closed the lid, check the first two steps and Apple's guide for your model.

If it still sleeps or you can’t change the settings

Make sure the adapter is charging and the external display is on and showing your desktop before you close the lid.

On a work or school Mac without admin rights, sudo pmset will ask for a password you don’t have, and energy settings may be set by a profile. Ask your IT team. Clamshell mode and a visible tab need no admin rights.

Why closing the lid wins

Apps keep a Mac awake by holding a power assertion, a note to macOS that says “don’t sleep yet”. Chrome holds one while a page keeps the screen on, and caffeinate creates the same kind from Terminal. These assertions stop idle sleep: the sleep that follows a stretch with no keyboard or mouse input.

Closing the lid is not idle: it is a direct request to sleep. So the browser, AwakeTab for Chrome and caffeinate with its usual options all stop at the lid.

Other options, safest first

Keep the lid open with the screen dimmed

Turn the brightness down to its lowest and leave the lid open. Then either keep a tab visible, or run caffeinate -di in Terminal to stop both display and idle sleep until you press Control-C. caffeinate -i alone keeps the Mac awake and lets the screen turn off.

An app with a closed-display option

Amphetamine, from the Mac App Store, has a closed-display mode option (as of 26 September 2026). Read its own help for what it needs on your Mac. Caffeine for Mac holds a power assertion like caffeinate does, so it keeps the Mac awake with the lid open only; see AwakeTab vs Caffeine.

The pmset switch (advanced)

sudo pmset -a disablesleep 1 is widely used to stop a Mac sleeping at all, lid included. It is not described in the pmset manual, so Apple can change or remove it. It needs an administrator password. Turn it off with sudo pmset -a disablesleep 0 as soon as you are done.

Heat and battery

A closed Mac that stays awake still makes heat. Inside a bag or sleeve it has nowhere to go, so never keep one awake there; use a hard, open surface. On battery, a Mac that cannot sleep drains until it shuts down, and unsaved work goes with it. Clamshell mode avoids the battery problem because it needs the power adapter.

Confirm what is keeping it awake

  • pmset -g assertions lists every process asking macOS not to sleep. A browser keeping the screen on shows a PreventUserIdleDisplaySleep or NoDisplaySleep entry. caffeinate -i shows PreventUserIdleSystemSleep.
  • pmset -g prints your current settings. After using the pmset switch, check it is off again.

If the job runs out of sight, AwakeTab for Chrome at its System level keeps the Mac awake with the tab hidden while Chrome runs. For long builds and agents, keeping your computer awake for an AI agent compares the options. The full Mac setup is on the macOS page.

Or skip the settings: open AwakeTab

With the lid open, a tab is enough. The AwakeTab timer runs until you stop it. Kept in view in Chrome or Edge, it holds the display on, and the Mac skips idle sleep for as long as that lasts. The pill says "Screen awake" once the browser grants it, and "Paused — tab hidden" if you switch to another tab.

Ready Suggested · ∞
Starts when you open this tab
00:00

until you stop

How AwakeTab knows

    Session complete

    Keeps awake for
    00:00
    until you stop
    Keeps awake for
    00:00
    until you stop no limit
    00:00
    until you stop
    Keeps awake for
    00:00
    until you stop

    Stopped to save battery

    Keeps this screen on while this tab stays visible.

    Ends Until you stop

    Type any time. A time that has already passed today means tomorrow.

    until you stop

    How long?

    until you stop

    Share this session

    Waits for a tap to start.Starts keeping the screen awake as it opens.

    Is AwakeTab doing its job?

    Your rating

    Time's up. Keep going?

    Settings

    How AwakeTab behaves. Every change saves as you make it.

    Timer Ask to extendJust stop · · Notifies youNo notification
    When time is up
    End sound Chosen in Customize, with the focus sounds.
    Clock Follow language12-hour24-hour · Seconds shownNo seconds · English
    Focus Pomodoro lengths, breathing and your intention
    Device and privacy Battery stop onBattery stop off · Shortcuts onShortcuts off · Usage data onUsage data off
    15%
    AwakeTab stops the session at this level.Turn on the switch above to choose a level.
    Pro Your plan and the devices it covers. See what's in Pro Manage devices
    Reset to defaults

    Every setting here goes back to its default. Your notes, stats and Pro stay.

    Version 2026.10.21 · a91a8c2

    Customize

    Make it yours. Every change shows on the clock at once.

    Every face shows the same time and state. Swipe the clock or press C to switch faces.

    Classic

    Retro

    Modern

    Your stats

    This week
    Today
    Streak
    All time

    time awake per day

    Pro keeps 12 weeks of history. See what's in Pro

    Keyboard shortcuts

    Shortcuts need a keyboard. Without one, the buttons on screen do the same things.

    Session

    Space
    Start or stop
    1 6
    Presets 15 min–4 h
    0
    Until I stop
    U
    Until a time
    Esc
    Close or stop

    Screen

    F
    Fullscreen
    C
    Next clock face (Shift+C goes back)
    D
    Cycle theme
    M
    Cycle ambient mode
    P
    Floating window

    Tools

    S
    Sounds
    N
    Notes
    T
    Focus timer
    B
    Breathing guide
    I
    What you're working on
    ?
    This overlay

    Press ? or Esc to close. Single-key shortcuts can be turned off in Settings.Single-key shortcuts can be turned off in Settings.

    AwakeTab Pro

    $12 a year

    • More themes, lamps and backgrounds
    • A sound mixer
    • More notes
    • A repeating Pomodoro
    • Message mode
    • 12 weeks of stats

    Keeping the screen awake stays free, with no ads on the awake screen.

    Clock

    Start this session

    Questions

    Does caffeinate keep a MacBook awake with the lid closed?

    Not with its usual options. caffeinate -i or caffeinate -di stops idle sleep while the lid is open. Closing the lid is not idle time, so the Mac sleeps anyway unless it is in clamshell mode with power and an external display.

    My Mac is on power and a monitor but still sleeps when I close it. Why?

    Apple's closed-display mode guide lists what each model needs, and we have not checked every model. Make sure the adapter is charging and the external display is on and showing your desktop before you close the lid.

    Can I close the lid on battery and keep a download running?

    Not in a supported way, because clamshell mode needs the power adapter. The pmset switch can do it, but you trade heat and a draining battery for it. Lid open, brightness down, is safer.

    Will AwakeTab for Chrome keep my Mac awake with the lid shut?

    No. The extension also works through a power assertion, without needing the tab in view. Closing the lid still sleeps the Mac.

    Soubhik Biswas

    Builds AwakeTab. Sources checked Saturday, 26 September 2026. About AwakeTab