How to Stop a Laptop From Sleeping With the Lid Closed
To stop a laptop from sleeping with the lid closed, you have to change what the lid does, because closing it is a switch, not an idle timer. On Windows, set the lid-close action to Do nothing, ideally only while plugged in. On a Mac, there's no setting: the laptop stays awake when it has power, an external keyboard and mouse, and a display connected. Below are the steps for both, what to know about heat, and what to do if you'd rather not change anything.
Stopping a laptop from sleeping with the lid closed: the short version
| System | What to do | Where |
|---|---|---|
| Windows | Set "When I close the lid" to Do nothing, in the Plugged in column | Control Panel > System and Security > Power Options |
| Mac | Connect power, an external keyboard and mouse, and the display, then close the lid | No setting. Meet the requirements. |
| Either, no changes | Leave the lid open and deal only with idle timers | See the last part of this article |
Why closing the lid puts a laptop to sleep
Screen and sleep timers count minutes without input. The lid works differently. It's a switch. Microsoft notes that a lot of PCs, especially laptops and tablets, go to sleep when you close the lid or press the power button.
Windows has four possible lid actions: Do nothing, Sleep, Hibernate, and Shut down. Sleep is the default for a good reason. A closed laptop is usually headed into a bag.
That's why none of the usual keep-awake tricks work here. A playing video, a utility, or a keep-awake web page holds off the idle timer. None of them change what the lid switch does.
Windows: change the lid action
Microsoft's own steps:
- Select Search on the taskbar, type control panel, and open it.
- Select System and Security.
- Under Power Options, select Choose what the power buttons do.
- If the options are grayed out, select Change settings that are currently unavailable.
- On the When I close the lid row, in the Plugged in column, choose Do nothing.
- Select Save changes.
Answers on Microsoft's forums say recent Windows 11 versions show the same control under Settings > System > Power & battery. I haven't confirmed that on an official page, so Control Panel is the sure route.
Change the Plugged in column only
There are two columns, On battery and Plugged in. Change Plugged in and leave On battery set to Sleep.
The reason is practical. With both set to Do nothing, the day you shut the laptop and drop it in your backpack, it keeps running in there, heating up and draining the battery. With Sleep kept for battery, closing the lid away from an outlet still does what it always did.
Choose where the picture goes: Windows key + P
With the monitor or TV connected, press the Windows key + P. According to Microsoft, you get four choices:
| Option | What it does |
|---|---|
| PC screen only | Shows everything on one display |
| Duplicate | Shows the same thing on all displays |
| Extend | Spreads your desktop across the displays |
| Second screen only | Shows everything on the external display |
For working with the lid shut, the last one is what you want. Pick it before you close the lid.
Mac: closed-display mode
A Mac has no lid setting. The laptop keeps running with the lid closed when certain conditions are met and goes to sleep when one is missing. Apple calls this closed-display mode.
Apple's dedicated article on it is no longer on its support site. The copy preserved by the Internet Archive, from 2021, lists what you need:
- an AC power adapter, or an external display that provides power to the Mac over its cable;
- an external keyboard and a mouse or trackpad, USB or wireless;
- an external display or projector.
A current Apple page about dual monitors on M3 MacBooks repeats the same requirements: an external keyboard and mouse or trackpad, and the Mac connected to power.
The steps from the archived article:
- Connect or pair the keyboard and mouse.
- Connect the Mac to power.
- Connect the external display.
- Once the Mac's desktop appears on the external display, close the lid. You may need to press a key or click the mouse to wake the display.
To disconnect, the guidance was to put the Mac to sleep first from the Apple menu, then unplug the display. That source is from 2021, so check against your own model. I haven't verified whether newer Macs changed any of this.
Lid closed and heat
I looked for official manufacturer guidance on running a laptop closed for hours and found none that applies across the board. What exists is forum discussion, and it disagrees. The point that comes up most is that the answer depends on each laptop's design, especially where the air intakes are.
Without a firm source, what follows is caution, not a manufacturer's rule:
- Check your model's manual to see where air goes in and out.
- Keep the laptop on a hard, flat surface, never on fabric, with the exhaust clear.
- For light work like documents, spreadsheets, and browsing, a closed lid is rarely a problem.
- For gaming, video editing, or rendering, leave the lid open.
- If the fans roar or the case gets too hot to touch comfortably, open it.
No settings at all: leave the lid open
If the goal is to put slides or a movie on a TV now and then, you can skip the settings entirely. With the lid open, the lid action never fires. All that can get in the way are the idle timers, and there are temporary fixes for those.
- A movie or video. The player itself asks the system to keep the display on while the video plays.
- A presentation. The options are in our guide to a laptop screen that turns off during a presentation.
- Anything else. A page that keeps the screen awake from the browser, such as NãoDorme.
Three things I saw using NãoDorme that matter with two screens:
- The effect opens full screen and covers the whole display. In Duplicate mode, the TV shows the same image as the laptop, so the effect is on the TV too, on top of what you meant to show. It only makes sense in Extend mode, with the effect on the laptop's screen and your content on the TV. I haven't tested that combination, so rehearse it.
- Black Screen keeps the laptop's display dark, which helps in a room with the lights off.
- The site tells you when the browser won't let it keep the screen on. The status changes to "Active (animation only)" and a notice appears at the top of the screen.
And the limit worth repeating: it doesn't prevent sleep when the lid closes. No web page can.
Didn't work? What to check
The external display went black after closing. Press a key or click the external mouse. On a Mac, Apple lists that as a normal step.
Windows went to sleep anyway. Make sure you changed the Plugged in column and that the charger is actually connected. On battery, the other column applies.
The options are still grayed out. On a work laptop, your organization may lock these settings. That's a conversation with IT.
The Mac went to sleep. Power, keyboard, or mouse is missing. Check that your wireless mouse and keyboard are switched on and connected.
The picture isn't reaching the TV. On Windows, press Windows key + P again. On the TV, check that the selected HDMI input is the one the cable is in.
You're about to leave with the laptop. Unplug the charger, open and close the lid, and confirm it went to sleep before you pack it. That's the reason to keep the battery column on Sleep.


