If you have already set the power button to initiate sleep mode via Power Options but it is still not functioning, please try the following solution.
First, ensure that you have configured the power button action by navigating to Control Panel > Hardware and Sound > Power Options > Change what the power buttons do
.
Test if it is working now before proceeding to the next step. If it is not, follow the steps below.
Open Local Group Policy Editor by pressing Win + R
, then typing gpedit.msc
. Navigate to Computer Configuration > Administrative Templates > System > Power Management > Button Settings
.
Check the state of “Select the Power button action (plugged in)”; It should be set to “Not configured”.
The next is crucial: even if the state is already “Not configured”, you need to edit it. Double-click on it, then change the state into Enabled > Apply > Not configured > OK
.
Repeat this process for “Select the Power button action (on battery)“.
Now, your power button should function as expected, as configured in “Power Options” 🎉, no need to change it from Local Group Policy Editor anymore.
You can also verify the current state by running powercfg /query
from Terminal (Admin)
. The output you are looking for should show Index: 000
is for Sleep
.