How to keep your laptop on when the lid is closed in Windows 11

Quick answer: open Control Panel, go to Hardware and Sound > Power Options and select Choose what closing the lid does. Next to When I close the lid, set Plugged in to Do nothing, then select Save changes. The laptop then keeps running with the lid shut, which is what you want when it’s connected to an external monitor. Leave On battery on Sleep unless you have a reason to change it, so a closed laptop in a bag doesn’t keep running and heat up. The same setting can be changed from the command line with powercfg.

Applies to: Windows 11 laptops and 2-in-1s with a lid, on Home and Pro editions. The command-line method uses Microsoft’s documented powercfg options. Menu labels can differ slightly between Windows 11 versions and on PCs managed by a school or company, where some power settings may be locked.

What the lid setting controls

Windows has a power setting called Lid switch close action. Microsoft’s documentation lists four values for it: Do Nothing (no action is taken when the lid is closed), Sleep, Hibernate and Shut Down. The setting is stored per power plan, with separate values for battery power and for plugged in, so you can keep the laptop awake on the charger and still let it sleep on battery.

Do nothing only stops Windows from acting on the lid. The PC still follows the plan’s other timers, so it can turn off the screen or go to sleep after the idle time set for the plan. If it sleeps on its own with the lid closed, check those timers as well (see Method 2).

Method 1: Change the lid action in Control Panel

This route works on Windows 11 and shows both the battery and the plugged-in choice side by side.

  1. Press Windows + R, type control and press Enter to open Control Panel.
  2. Select Hardware and Sound, then Power Options. If Control Panel is set to icon view, select Power Options directly.
  3. In the left pane, select Choose what closing the lid does. On some PCs the link is named Choose what the power buttons do; it opens the same page.
  4. Find the row When I close the lid. Under Plugged in, choose Do nothing. Under On battery, choose the action you want; Sleep is the safer pick.
  5. Select Save changes.
  6. Close the lid with the charger connected and check that the laptop stays on, for example by watching an external monitor or checking that a download keeps going.

If the drop-down lists can’t be changed, select Change settings that are currently unavailable at the top of the page first; that link may ask for administrator rights. If Hibernate isn’t offered, see Hibernate option missing in Windows 11.

Method 2: Look for lid settings in the Settings app

Microsoft’s Windows 11 power settings page describes screen and sleep timers under Settings > System > Power & battery, with separate values for battery and plugged in. Newer Windows 11 updates may also show lid and power button controls on that page, but this isn’t confirmed for every version, so if you don’t see a lid option there, use Method 1 or Method 3.

  1. Open Settings > System > Power & battery.
  2. Expand the section with the screen and sleep timers (its name varies by version).
  3. If you want the laptop to stay awake for long jobs with the lid closed, set the plugged-in sleep timer to a longer value, or to Never if your version offers it.
  4. If a lid control is listed, set the plugged-in action to Do nothing.

If the PC goes to sleep even though nothing tells it to, or never sleeps when it should, Windows 11 won’t go to sleep covers the timers and the apps that keep a PC awake.

Method 3: Set the lid action with powercfg

powercfg changes the same setting from Terminal, which helps if Control Panel doesn’t show the lid option or you want to set up several laptops the same way. Microsoft documents /setacvalueindex (plugged in), /setdcvalueindex (on battery) and /setactive, and notes that aliases from powercfg /aliases can be used in place of GUIDs. The lid setting’s alias is LIDACTION, and its values match the list above: 0 Do nothing, 1 Sleep, 2 Hibernate, 3 Shut down.

  1. Right-click Start and select Terminal. If a command later fails with an access error, use Terminal (Admin) instead.
  2. Run powercfg /aliases and check that SCHEME_CURRENT and SUB_BUTTONS appear in the list. If they don’t, run powercfg /query and use the GUIDs it shows for the current plan and the buttons and lid subgroup.
  3. Set the plugged-in lid action to Do nothing:
powercfg /setacvalueindex SCHEME_CURRENT SUB_BUTTONS LIDACTION 0

To change the battery value too, use the DC version of the command. Setting it to 1 keeps sleep on battery:

powercfg /setdcvalueindex SCHEME_CURRENT SUB_BUTTONS LIDACTION 1

Then apply the change to the active plan:

powercfg /setactive SCHEME_CURRENT

The change applies to the plan that’s active now. If you switch to a different power plan later, run the commands again for that plan. To undo it, run the same command with 1 (Sleep) and /setactive again, or pick a value in Control Panel.

Use an external monitor with the lid closed

Running a laptop closed with an external monitor, keyboard and mouse is sometimes called clamshell mode. The power settings covered here have no separate switch for it: you set the lid action to Do nothing while plugged in, and the laptop keeps running with the external screen as the display.

  1. Connect the charger. Keeping the laptop on power matches the Plugged in setting you changed and avoids running the battery down.
  2. Connect the external monitor, keyboard and mouse (or a dock that carries all of them).
  3. With the lid still open, open Settings > System > Display and check that the external monitor is detected. Under Multiple displays, you can choose to show the desktop only on the external screen.
  4. Close the lid. The built-in screen may switch off and Windows may move open windows to the external monitor.

If the external screen goes black when the lid closes, the Plugged in lid action may still be Sleep; recheck Method 1. If the monitor isn’t detected at all, see second monitor not detected in Windows 11, or USB-C monitor not working in Windows 11 for monitors connected through USB-C or a dock.

Before you close the lid: heat and battery

A closed laptop that keeps running still produces heat. Two habits reduce the risk:

  1. Leave On battery set to Sleep or Hibernate. If both columns say Do nothing, a laptop you close and put in a bag can keep running, heat up in a space with no airflow and drain its battery. That’s the main reason to change only the Plugged in value.
  2. Give it airflow. When it runs closed on a desk, keep the vents clear and don’t stack things on top. A stand that lifts it off the desk can help.

If the fans run hard or the case gets hot while it’s closed, see laptop overheating in Windows 11.

Laptops with Modern Standby

Some newer laptops use Modern Standby instead of the older sleep state. On these, Sleep can keep some network activity going in the background, so a laptop set to Sleep may still look partly awake. To check which kind you have, run powercfg /availablesleepstates; if the output mentions S0 Low Power Idle, the laptop uses Modern Standby. The lid setting itself works the same way: Do nothing should keep Windows running whichever kind of sleep the laptop supports.

If you want the laptop to use as little power as possible with the lid closed on battery, Hibernate uses less power than Sleep, at the cost of a slower resume.

The lid option is missing or doesn’t stick

If the lid row doesn’t appear, or the choice reverts, check these in order:

The setting is managed by your organization

On a work or school laptop, power settings can be set by policy. You may see a message that some settings are managed by your organization, or the change may revert after a restart. Ask your IT team; changing it locally may not be allowed.

A different power plan is active

Each power plan has its own lid value. If the laptop maker’s app or another tool switches plans, your change can seem to disappear. Run powercfg /list to see which plan is active, set the lid action again, or set it in the maker’s app if that app manages power.

The lid is not detected

Windows may not show the lid option if it doesn’t detect a lid switch. If it’s missing on a laptop, a chipset, ACPI or power management driver from the maker may not be installed, for example after a clean Windows install. Install the chipset and power management packages for your exact model from the maker’s support site, restart and check again. If the row is still missing, Method 3 can still set the value.

Something else puts the laptop to sleep

If the lid is set to Do nothing but the laptop still sleeps a few minutes after you close it, the plan’s sleep timer may be the cause, not the lid. Lengthen the plugged-in sleep timer (Method 2).

Quick troubleshooting table

What you seePossible causeWhat to try
Laptop sleeps as soon as the lid closesLid action for the current power source is SleepSet Plugged in to Do nothing (Method 1 or 3)
External monitor goes black when the lid closesPlugged in value is still Sleep, or the charger isn’t connectedConnect the charger and recheck Method 1
Laptop sleeps a few minutes after closingThe plan’s sleep timer, not the lid settingLengthen the plugged-in sleep timer (Method 2)
No lid option in Power OptionsLid switch not detected or a maker driver missingInstall chipset and power drivers, or use powercfg
The setting changes backAnother power plan becomes active, or a policy resets itCheck powercfg /list, the maker’s app, or ask IT
Laptop is hot when taken out of a bagOn battery is set to Do nothingSet On battery to Sleep or Hibernate

Sources

How we write our guides: read our editorial policy.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *