How to Customise Power Button and Lid Close Actions in Windows 11

By default, pressing the physical power button on a Windows 11 computer puts the device into Sleep mode, while closing a laptop lid suspends active sessions. For many users, accidental taps of the power button disrupt active tasks, while others prefer closing their laptop lid without interrupting external monitor sessions or file downloads. Windows 11 includes granular hardware control settings that allow you to define distinct behaviour for the power button, sleep button, and lid closure across both battery and plugged-in states.

Accessing Power Button Settings via Control Panel

While the modern Windows 11 Settings app manages sleep timeouts and battery saver profiles, advanced hardware trigger actions are managed through the legacy Power Options control panel.

  1. Press Windows Key + R to launch the Run dialogue box.
  2. Type control powercfg.cpl and press Enter to open Power Options directly.
  3. In the left-hand navigation pane, click Choose what the power button does (or Choose what closing the lid does on laptops).
  4. You will be presented with a grid of hardware triggers and power states:
    • When I press the power button: Configurable actions include Do nothing, Sleep, Hibernate, and Shut down.
    • When I press the sleep button: Useful for keyboards equipped with dedicated sleep keys.
    • When I close the lid: Available on laptops and portable tablets with attached keyboards.
  5. If you are using a laptop, separate dropdown menus are provided for On battery and Plugged in columns.
  6. To prevent laptops from entering sleep when connected to an external monitor, mouse, and keyboard, set When I close the lid under the Plugged in column to Do nothing.
  7. To prevent accidental desk taps or curious pets from shutting down your PC, set When I press the power button to Do nothing or Turn off the display.
  8. Click the Save changes button at the bottom of the window to apply your configuration immediately.

Enabling or Modifying Shutdown Settings

At the bottom of the power button configuration page, you will notice a section titled Shutdown settings containing checkboxes for Turn on fast startup, Sleep, Hibernate, and Lock. By default, these options may be greyed out.

To unlock and edit these settings:

  1. Click the shield icon link near the top of the window labelled Change settings that are currently unavailable.
  2. Provide administrator credentials if prompted by User Account Control (UAC).
  3. You can now check the Hibernate box to make hibernation selectable in the power button dropdown menus and the Start menu power flyout.
  4. If you experience driver stability issues or dual-boot conflicts with Linux, you can uncheck Turn on fast startup to ensure a complete kernel shutdown on power-off.
  5. Click Save changes.

Configuring Lid Actions via Command Prompt and PowerCFG

Power users, system builders, and IT administrators managing enterprise rollouts can configure these exact hardware actions directly through the powercfg command-line utility without opening graphical menus.

To set the lid close action to “Do Nothing” when plugged in, launch Command Prompt or PowerShell as Administrator and run:

powercfg -setacvalueindex SCHEME_CURRENT SUB_BUTTONS LIDACTION 0
powercfg -setactive SCHEME_CURRENT

Here is what the numerical index values represent for lid and button actions:

  • 0: Do nothing
  • 1: Sleep
  • 2: Hibernate
  • 3: Shut down

To configure the same setting for the battery state (DC mode), substitute -setacvalueindex with -setdcvalueindex:

powercfg -setdcvalueindex SCHEME_CURRENT SUB_BUTTONS LIDACTION 1
powercfg -setactive SCHEME_CURRENT

Thermal and Battery Precautions for Laptop Users

If you configure your laptop to Do nothing when the lid is closed, exercise caution when transporting your device:

  • Bag and Sleeve Ventilation: Modern thin laptops dissipate heat through the keyboard deck and top vents. Storing a running laptop inside a padded backpack or sleeve can trap heat, triggering thermal throttling or emergency shutdowns.
  • Docking Station Workflow: Ensure your laptop is positioned on a flat, hard surface or vertical laptop stand with adequate airflow when operating in closed-clamshell mode connected to external monitors.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.