question

d4006-5328 avatar image
0 Votes"
d4006-5328 asked Dgorter commented

Can I disable wake from sleep except for power button?

I'm in one of those situations where I put my Windows 10 Pro laptop to sleep and 5 seconds later it wakes itself up again. I've followed all the usual threads regarding wake timers and powercfg commands and event viewer to identify what's waking it up but I get nothing useful - it's either "nothing" or "unknown" or empty lists.

So I want to know if I can disable wake from sleep for any timer or device (including keyboard/mouse). I want to have to press the power button to wake it up.

If the OS itself doesn't know why it woke itself up, I see this as my only option now - other than giving up on sleep and shutting it down instead, but I'd rather not do that.

windows-10-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello,
You may want to check Device Manager as well, in particular network adapters.
Double-click the network adapter, choose the advanced tab, scroll down to options starting with Wake, like wake on Magic Packet for example.

0 Votes 0 ·
JiaYou-MSFT avatar image
0 Votes"
JiaYou-MSFT answered JiaYou-MSFT edited

HI d4006-5328,

1.Please check if the same issue happen in clean boot mode。
How to perform a clean boot in Windows
https://support.microsoft.com/en-us/topic/how-to-perform-a-clean-boot-in-windows-da2f9573-6eec-00ad-2f8a-a97a1807f3dd

2.Please run below command in CMD and share us the result.
powercfg -devicequery wake_armed
powercfg -lastwake

3.Is your issue added to AD domain or Intune?

4.What's the model of your computer?

5.If we create a new local user on issue computer, will the same issue happen on new local user?

============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

d4006-5328 avatar image
0 Votes"
d4006-5328 answered

Thanks, but I'd rather just disable wake-from-sleep from anything other than the power button? Is that possible?

I checked those powercfg commands:

104865-powercfg.jpg



and tried making a new user, same problem.

As for that clean boot thing - that looks too annoying (turning everything off). Whatever software/hardware I have that's causing this I still want to own and use those things. So the best thing is to take away their power to wake the machine from sleep.

This comes up every couple of years on different machines and is always annoying trying to track it down.


powercfg.jpg (28.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JiaYou-MSFT avatar image
0 Votes"
JiaYou-MSFT answered

HI d4006-5328,

Thanks for your reply.

We can refer below document to disable Automatic Wake Up then check if it can meet your expect.

“I have been able to disable Automatic Wake Up but it has not been easy at all, because windows periodically injects Wake Up tasks. So even if you clean up all the wake up tasks manually, they reapear later on.

The way I have been able to do it, is to create a permanently enabled task on the Task Scheduller that gets triggered when windows powers off, specifically it gets triggered by the event ID 42 of the "Kernel-Power" source on the System log.

Which launches the following program:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

with the following arguments:

-command "&{Get-ScheduledTask |? {$.Settings.WakeToRun -eq $true -and $.State -ne '"Disabled"'} | % {$.Settings.WakeToRun = $false; Set-ScheduledTask $} }"

Basicaly disabling any wakeup task schedulled before the power off.

As I said not easy at all, but finally I am able to sleep the whole night without been wake up by the unexpected power on of my PC.

Hope it can help somebody else that suffers from the new windosw 10 "features".

How to disable automatic power up in Windows 10
https://answers.microsoft.com/en-us/windows/forum/windows_10-power-winpc/how-to-disable-automatic-power-up-in-windows-10/37c09edc-d555-4766-88fb-8d78d19ab19c

============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

d4006-5328 avatar image
0 Votes"
d4006-5328 answered JiaYou-MSFT edited

Thanks again. I'd already found and tried that - the script has errors. It probably worked back in 2017 but doesn't now :-(

If you have any kind of feedback channel back to the dev teams, please suggest they create some kind of sleep manager tool where it gives the real situation - as in what has the power to wake and let us control that power. All the powercfg tools are saying that nothing has the power to wake my machine, and when it awoke - it was for no reason or by "Unknown".

There are thousands of threads for years on this topic. It's bothering huge amounts of people. I just wasted another 2 hours of my Sunday morning trying to solve it. We need control over this and we don't have it.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

HI d4006-5328,

Thanks for your reply,

Yes, I also discover that there are some windows update task schedulers will wake up pc from sleep in some conditions.

We can enter Win+F to feedback this suggestion so that this suggestion can be accepted ASAP. I think this suggestion is very useful.

============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

0 Votes 0 ·