Guides

Why does my laptop go to sleep when I close the lid?

Short answer

Because Windows' default "When I close the lid" action is Sleep, to save battery and keep a closed laptop from overheating. You can change it to "Do nothing" in Power Options. If the laptop still sleeps, the usual causes are the idle-sleep timer, a critically low battery, an IT policy, or the laptop's firmware.

Why Windows sleeps when you close the lid

Every Windows power plan has a setting called When I close the lid, and on laptops it's set to Sleep out of the box. That's a sensible default:

How to change it

Open Control Panel → Power Options → Choose what closing the lid does and set Plugged in to Do nothing. The full steps, a one-line command and the risks are in how to keep a laptop running with the lid closed.

Why it can still sleep after you change it

With an external monitor

If you dock a laptop and close it to use an external screen, set the plugged-in lid action to "Do nothing"; otherwise Windows sleeps even though a monitor is connected.

Is it safe to run a laptop with the lid closed?

Usually, if it's plugged in and on a hard, open surface. Don't put a running laptop in a bag or on a bed, and remember that a permanent "Do nothing" setting stays on until you change it back.