Windows 10 normally puts your laptop into low-power sleep mode when you close the lid. This can be a problem when hooking your laptop up to an external monitor. Use the Control Panel—not Windows 10’s Settings app—to change this behavior.
If you do this, be careful! Closing your laptop’s lid and throwing it in your bag while it’s still on could cause some serious problems due to poor circulation or blocking of vents. Your laptop will continue to run, wasting its battery and potentially even overheating in your bag. You’ll need to manually put your laptop to sleep, hibernate it, or shut it down using its power buttons or in the options in the Start menu rather than simply closing the lid.
To change the default behavior of Windows 10 when you close the lid, right-click the battery icon in the system tray, and then click on “Power Options.”
If you don’t see the battery icon, click on “Show Hidden Icons” and then right-click on the battery icon—or head to Control Panel > Hardware and Sound > Power Options instead.
Next, click “Choose what closing the lid does” in the pane to the left.