How to Keep a Laptop Awake With the Lid Closed (Windows and Mac)
On Windows, set closing the lid to Do nothing in Power Options. On a Mac, use clamshell mode: power adapter, external display, keyboard and mouse. Commands for both, the admin and heat caveats, and why Slack still shows you away with the lid closed.
Free tool, runs in this tab
Keep your screen awake and see when Slack sets you away
Press Start. This tab keeps the screen on while it stays open, and shows the minute Slack, Teams and Zoom would set you away if nothing touches the keyboard or mouse.
This tab cannot move your pointer or press keys, so on its own it cannot keep Slack or Teams active. It reads the same idle time the Slack desktop app, Teams and Zoom read. To test a jiggler, start, then take your hands off for 6 minutes: if Your computer stays green, the jiggler keeps them active.
- Your computerNot measured yetPress Start and allow idle detection.
- Slack desktop app-Away after 10 min, any input.
- Microsoft Teams-Away after about 5 min, any input.
- Zoom-Away after 15 min by default, any input.
On this page
To keep a Windows laptop awake with the lid closed, open Control Panel, Power Options, Choose what closing the lid does, and set When I close the lid to Do nothing for Plugged in. On a Mac, use clamshell mode: connect the power adapter, an external display, and a keyboard and mouse, then close the lid; the Mac keeps running on the external display. Without a display, a Mac needs an admin command (sudo pmset -a disablesleep 1) or an app like Amphetamine. With the lid open, the plain sleep settings for Windows and Mac are in how to stop your computer from sleeping. A laptop awake with the lid closed still shows you away in Slack after 10 minutes, and Slack Green keeps your Slack dot green from a server while the laptop sleeps closed, free for 7 days with no card.
A laptop that stays awake with the lid closed still shows you as away in Slack after 10 minutes, because nobody touches the keyboard or mouse. To stay green with the lid closed, the session has to come from somewhere else, as covered below.
Ways to keep a laptop running with the lid closed
| Method | System | Admin | Notes |
|---|---|---|---|
| Closing the lid: Do nothing | Windows | Usually not | IT can lock it |
powercfg LIDACTION 0 | Windows | Usually not | Same setting, command line |
| Clamshell mode | Mac | No | Power, display, keyboard and mouse |
pmset disablesleep 1 | Mac | Yes | No display needed |
| Amphetamine closed-display mode | Mac | Helper install | App Store app |
Windows 11 and 10: keep the laptop awake with the lid closed
- Open Control Panel and go to Hardware and Sound, Power Options.
- Click Choose what closing the lid does.
- Next to When I close the lid, set Plugged in to Do nothing. Leave On battery on Sleep unless you need it.
- Click Save changes.
Newer Windows 11 builds also show lid settings under Settings, System, Power & battery. The same change from a terminal, for the current power plan while plugged in:
powercfg /setacvalueindex SCHEME_CURRENT SUB_BUTTONS LIDACTION 0
powercfg /setactive SCHEME_CURRENT
0 means do nothing; 1 is sleep. On a company laptop the option may be greyed out by policy.
Mac: keep a MacBook awake with the lid closed
Clamshell mode (no admin). Plug in the power adapter, connect an external display and a keyboard and mouse (or trackpad), then close the lid. The Mac keeps running on the external display. Unplug power or the display and it sleeps.
A laptop kept awake with the lid closed still shows you away in Slack 10 minutes after your last keyboard or mouse input. A server-side tool keeps your Slack dot green with no input, even while the laptop sleeps or the lid is closed.
Without an external display. macOS sleeps when you close the lid. This command stops all sleep, needs an admin password, and should be undone afterwards:
sudo pmset -a disablesleep 1 # keep awake, lid closed too
sudo pmset -a disablesleep 0 # back to normal
A closed MacBook running this way in a bag can overheat. How to check whether the setting is still on, and why it survives a restart, is in pmset disablesleep. Amphetamine from the App Store offers a closed-display mode with its own helper. caffeinate alone does not stop lid-close sleep; see our caffeinate guide.
Check whether your Mac will sleep when you close the lid
macOS keeps a flag that says whether closing the lid will sleep the Mac right now. We read it on 9 October 2026 on a MacBook Pro (Mac14,5, macOS 27.0.1) with the lid open, the power adapter in and an external 2560 x 1440 display connected:
$ ioreg -r -k AppleClamshellState -d 1 | grep AppleClamshell
"AppleClamshellCausesSleep" = No
"AppleClamshellState" = No
$ pmset -g batt | head -1
Now drawing from 'AC Power'
$ pmset -g | grep -i sleepdisabled
$
AppleClamshellState = No means the lid is open. AppleClamshellCausesSleep = No means closing it now would not sleep the Mac. The empty SleepDisabled line shows disablesleep was off, so power and the external display were what kept clamshell mode available. Run the same ioreg line before you close the lid: if it says Yes, the Mac will sleep.
caffeinate -s shows up as a sleep block in pmset -g assertions while it runs, as in this 8-second test on the same Mac:
$ caffeinate -s -t 8 &
$ pmset -g assertions | grep caffeinate
pid 50962(caffeinate): [0x0001d37a00078f39] 00:00:01 PreventSystemSleep named: "caffeinate command-line tool"
That assertion stops idle sleep while it runs. For a closed lid with no external display, use disablesleep or Amphetamine, as above.
Does Slack stay active with the laptop closed?
No. If the laptop sleeps, Slack sets you away within seconds. If you keep it awake with the lid closed, nobody touches the keyboard or mouse, so the computer's idle time keeps growing. The Slack desktop app reads that idle time and sets you away 10 minutes after your last input. Either way your coworkers see the grey dot. The rules are in how long does Slack stay active, and the desktop options in how to keep Slack always active on desktop. Teams behaves in a similar way: Away when idle or locked, Offline once the laptop sleeps, as shown in does Teams stay green when the computer is asleep.
What does work with the lid closed:
Before you leave a laptop running closed
FAQ
How do I keep my laptop running with the lid closed?
Windows: set closing the lid to Do nothing in Power Options. Mac: clamshell mode with power and an external display.
How do I keep a MacBook awake with the lid closed without a monitor?
sudo pmset -a disablesleep 1, which needs admin rights, or Amphetamine's closed-display mode. Undo it afterwards.
Is it bad to run a laptop with the lid closed?
It is fine on a hard surface with airflow and power. It can overheat in a bag.
Does Slack stay active when my laptop is closed?
No. A sleeping laptop sets you away at once, and an awake one after 10 minutes without keyboard or mouse input.
Does Teams stay green with the laptop closed?
No. Teams shows Offline when the computer sleeps, and Away after a few minutes without input if it stays awake.
Related Articles
How to Keep Slack Always Active on Desktop
The Slack desktop app sets you away 10 minutes after your last keyboard or mouse input on the computer, and no setting turns that off. The desktop fixes for Mac, Windows and Linux, in the order they fail.
Does a Mouse Jiggler Work When the Computer Is Locked?
No. A mouse jiggler cannot unlock a computer or keep you active behind the lock screen, and Teams shows you Away the moment you lock. It works only if it runs before the lock kicks in, because the movement stops the idle timer that would lock the screen. What still works, what does not, and the locks a jiggler never stops.
Amphetamine Alternatives for Mac, and When to Switch
Amphetamine is free and covers almost every keep-awake case, so switch only for a reason: open source, one click, Shortcuts, a lid-closed setup without Enhancer, or nothing to install. The alternative for each, compared on price and features.