How to Keep Windows Running When Laptop Lid Is Closed

Keep Windows Running With Lid Closed

By default, Windows puts your laptop to sleep when you close the lid. But what if you want it to stay on for downloads, installs, and other active processes? This guide shows how to keep your laptop running with the lid closed.

FYI: do you have the opposite problem? Learn how to fix your laptop if it won’t go to sleep with the lid closed.

Keep Laptop On With Lid Closed

Windows has dedicated settings to configure what happens when you close the laptop lid. Edit the system settings to prevent the laptop from going to sleep.

Press Windows + R, and type “powercfg.cpl” in the Run dialog to open Power Options. Click on Choose what closing the lid does in the left sidebar.

Choose Lid Behavior

Select Do nothing next to the When I close the lid option under both the On battery and Plugged in sections.

Keep Laptop On With Lid Closed

Click on the Save changes button at the bottom of the page for the changes to take effect.

Whenever you close the lid, your laptop will keep running just as it did with the lid open.

Prevent Sleep/Hibernate from Inactivity

The instructions above will ensure your laptop remains on when the lid is closed. However, by default, Windows will still enter sleep or hibernate mode after a specific period of inactivity. To keep Windows running indefinitely after closing the laptop lid, follow the below instructions:

Search for “edit power plan” in Windows search, and select the Edit power plan control panel entry. Adjust the Put the computer to sleep timer to Never under both the On battery and Plugged in sections.

You can also adjust the display turn-off timer, but I recommend keeping it short, as it will help save battery without affecting your laptop’s active processes.

Prevent Sleep Windows

To disable the hibernate mode due to inactivity, click on the Change advanced power settings on the same page.

Change Plan Settings

Go to Sleep -> Hibernate after, and set both the On battery and Plugged in timers to Never.

Prevent Hibernate Windows

Alternatively, set a higher sleep/hibernate timer instead of Never if you know how long you want the laptop to stay on after closing the lid.

Prevent Sleep Using a Third-Party App

Sleep/hibernate due to inactivity is an important function for PC health, so you shouldn’t disable it permanently. However, disabling/enabling it every time you need to keep your laptop on with the lid closed can be very inconvenient. This is where a third-party app will make things easier by simulating activity to prevent the laptop from going to sleep/hibernating.

For this purpose, I recommend using the Caffeine app, as it’s easy and free to use. When you launch the app, it will show a coffee pot icon in the system tray. Double-click on the icon to enable or disable the app. When enabled, the pot icon will show full, and when disabled, it will be empty.

Caffeine App Active

The app maintains activity by simulating a keypress every 59 seconds. Even if your sleep/hibernate timer is set to 1 minute (the minimum), the app still keeps your laptop awake.

You can also set inactive and active periods for the app to automatically enable/disable it. The minimum timer is 15 minutes, and the maximum is 24 hours.

Caffeine App Timer

It’s worth mentioning that your laptop can also go to sleep or shut down due to low battery or overheating. Ensure the battery is optimized for the tasks and the laptop to remain cool. If your laptop still goes to sleep with the lid closed, it could be a problem with the sleep function.

Image credit: Unsplash. All screenshots by Karrar Haider.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Karrar Haider
Karrar Haider - Contributor

Karrar is drenched in technology and always fiddles with new tech opportunities. He has a bad habit of calling technology “Killer”, and doesn't feel bad about spending too much time in front of the PC. If he is not writing about technology, you will find him spending quality time with his little family.