Skip to content

Instantly share code, notes, and snippets.

@rfpe
Created July 11, 2022 12:20
Show Gist options
  • Save rfpe/00c2258f5b97e4f5e578fd05ac8646fe to your computer and use it in GitHub Desktop.
Save rfpe/00c2258f5b97e4f5e578fd05ac8646fe to your computer and use it in GitHub Desktop.
Source: https://answers.microsoft.com/en-us/insider/forum/all/windows-10-pc-refuses-to-stay-asleep/4004437e-5424-4314-a4c6-aa6444c7ded9
Follow the steps:
a) Type cmd on the Start screen and right click on it. Select Run as administrator.
b) Type the following command and hit Enter:
Powercfg -devicequery wake_armed
c) You will get the name/names of the devices. To disable a specific device from waking the computer, run the following command:
Powercfg -devicedisablewake "devicename"
Note: Make sure that you replace the “devicename” placeholder with the name of the device that you want to disable.
d) If this issue still occurs after you disable one device, disable the devices in this list one by one until you determine which device is causing the issue. If you want to re-enable a device to wake the computer, run the following command:
Powercfg -deviceenablewake "devicename"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment