Keep a Laptop Awake With the Lid Closed: What Works
A web page cannot do this. Closing the lid is handled by the operating system, and a browser tab loses its wake lock when hidden. On Windows, change "When I close the lid" in Power Options. On a Chromebook, turn off "Sleep when lid is closed".

Why a website can’t do it
A web page can request a screen wake lock, but the browser releases it when the page is no longer visible. A closed lid hides everything. That is by design, so we will not claim our tool works lid-closed.
What works instead
Windows
Microsoft documents the lid action. Go to Start > Settings > System > Power & sleep > Additional power settings, then choose “Choose what closing the lid does”. Next to “When I close the lid”, pick the action you want for on battery and plugged in, then select “Save changes”. Microsoft’s page also describes a Control Panel route through System and Security > Power Options.
Chromebook
Open Settings > System preferences > Power and turn off “Sleep when lid is closed”. Managed work or school devices may block this.
Mac
Apple’s sleep and wake settings page does not describe closed-lid behaviour, and we could not find an official page that does. Rather than guess, check Apple’s support site for your model. Third-party tools exist but we have not tested them.
Before you do it
Plug in, keep vents clear, and do not put a running laptop in a bag.
The Windows lid options explained
| “When I close the lid” | What happens | Use it for |
|---|---|---|
| Do nothing | The laptop keeps running with the lid shut | A laptop on a stand with an external monitor, keyboard and mouse |
| Sleep | Pauses everything, wakes fast | Everyday use, and the default on most laptops |
| Hibernate | Saves your session to disk and powers off | Packing the laptop for a long trip |
| Shut down | Closes everything | Rarely, since it closes unsaved work |
Choose “Do nothing” for Plugged in only, and keep On battery set to Sleep. That way the laptop does not run hot in a bag when you forget it is on.
Using a laptop closed with an external monitor
This is the most common reason to change the lid action. Connect the monitor, keyboard and mouse, plug in the charger, then close the lid. On Windows set the plugged-in lid action to Do nothing first. A Chromebook keeps working with the lid closed when it is connected to a display and turning off “Sleep when lid is closed” covers the rest.
What keeps running with the lid closed
With the lid action set to Do nothing, downloads, music, remote sessions and calls carry on. A browser tab using a wake lock does not count as visible, so our tool releases its lock, but that does not matter here because the operating system is keeping the laptop awake.
Safety first
- Never put a running laptop in a bag, sleeve or on a bed. It can overheat.
- Keep the vents clear, and leave space around the hinge where many laptops exhaust heat.
- Set the lid action back if you start carrying the laptop around again.
Frequently asked questions
Why can't the browser tool keep my laptop awake with the lid shut?
The Screen Wake Lock API only works for a visible page, and MDN says the lock is released when the document becomes hidden. A closed lid ends that.
Will the lid-closed setting drain my battery?
A laptop running with the lid closed still uses power and can get warm in a bag. Use it only when plugged in and with airflow.
Is there an official Apple setting for this?
We could not confirm an Apple support page that covers closed-lid use, so we do not give Mac steps here. Search Apple's own support site for your model.
Sources
- Microsoft Support: Shut down, sleep, or hibernate your PC
- Chromebook Help: Sign out or turn off your Chromebook
- MDN: Screen Wake Lock API
Written by Maurice Rana. Last verified against the sources above.