My Windows 10 PC kept waking when I put it to sleep. I had meekly tried to fix it in the past but it finally bugged me enough to get into action. In this post you'll find useful methods for attempting to fix the problem.
I used these methods to dig into the unhelpful Event Viewer message of Wake Source: Unknown - ultimately caused by my Razer devices. Full explanation at the bottom of this post.
First we'll look at the Event Viewer. An easy way to get to there in Windows 10 is to open the Start Menu and type "Event Viewer".
This brings up the Event Viewer window, then via the tree menu on the left you can go to Windows Logs > System. From here you can scroll to find a row with source "Power-Troubleshooter".
Or, if there are too many rows, you can try to filter the System logs:
From here, you may have an entry that will hint at your problem such as a peripheral device, or a scheduled task, or perhaps (unfortunately) it will say Wake Source: Unknown. Below are two examples, one where the Windows Update Orchestra woke my PC and the other being the issue I had at hand:
If you do have a good value out of Wake Source, go ahead and search that up in your favourite search engine. If it hinted to a scheduled task, see the further down this post for the Task Scheduler.
The first of our three commands. With this we can get a hint at what wakes are coming up and what is causing them. We can run this in the Command Prompt or PowerShell. You can search for either of them with the Start Menu:
Then we can run:
This will show what is scheduled to wake the PC.
Similar to above, you need to run either the Command Prompt or PowerShell to run the following command:
This can help us determine the severity of our issues. (My PowerShell might look different from yours, check out my post about my development environment to see more).
powercfg -devicequery wake_armed
The last of our commands takes us to look at all the devices that are configured to wake the PC. Running the command in either PowerShell or with the Command Prompt will give us the following:
powercfg -devicequery wake_armed
With these in mind, you can go to the Device Manager by going to the Start Menu and typing "Device Manager"
In this example I knew my the devices listed in the above command were a keyboard and a mouse, so expanding those I saw all the command listed:
(While there are three "HID Keyboard Devices" I know it's not the top one because there are no Power Management options for it.)
From here we can right click each of the ones listed, go to Properties then the Power Management tab and disable "Allow this device to wake the computer".
I'll use the Razor Naga Trinity device as an example:
It turns out this is what helped me solve my issue. You can read more about it at the very bottom of this post.
Wake Timers in the Power Options
To disable wake timers in the Power Options we need to dig a little deeper. First we go to the Power and Sleep Settings via the Start Menu. Then go to "Additional Power Settings" at the bottom (or the side).
This will open the Power Options window. From here you can pick your power plan and modify it via "Change Plan Settings" then "Change advanced power settings".
This will (finally) open the Advanced Settings for the Power Options. Scroll down to Sleep > Allow wake timers and disable them.
This (in theory) will prevent your PC from waking up. I've not had it work for me in the past, but it's worth a shot. 🤷
Maybe you have an inkling, or any of the suggestions above lead you here, but next up we'll look at the Scheduled Tasks area of Windows. An example I've had before is the UpdateOrchestrator waking my PC. We'll walk through this example to see how this works.
To find this I opened the Task Scheduler by searching for "Task Scheduler" in the Start Menu:
On the navigation tree on the left I went Microsoft > Windows > UpdateOrchestrator.
From here, I right clicked Backup Scan and opened Properties. Then in the newly opened window, navigated to the Conditions tab where I have the option of "Wake the computer to run this task".
Wake on LAN
A niche one, if you don't know what this is, it probably isn't it. The short of this is your PC can receive a network message to wake it from sleep.
Search for "Device Manager" from the Start Menu:
This will bring up all the Device Manger on your PC. From here, navigate to your network adapter under the Network Adapters tree node. Right click your adapter then properties.
Then disable the option for either "Only allow a magic packet to wake the computer" or "Allow this device to wake the computer" - depending on your situation.
My Specific Solution
For me, using the
powercfg -devicequery wake_armed command (with some trial and error) fixed it for me - I realised that all the Razer devices were the ones waking my PC.
Disabling "Allow this device to wake the computer" in the Device Manager for all the Razer devices worked!
As a side note: I was worried I might lose the ability to wake my PC by hitting my keyboard but thankfully that's handled under one of the generic HID Keyboard Device devices.