Can I disable wake from sleep except for power button?

Anonymous
2021-06-09T09:37:36.727+00:00

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 for business | Windows Client for IT Pros | User experience | Other
{count} votes

4 answers

Sort by: Most helpful
  1. Andy YOU 3,076 Reputation points
    2021-06-10T08:14:21.73+00:00

    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.

    0 comments No comments

  2. Anonymous
    2021-06-11T16:54:26.533+00:00

    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.

    0 comments No comments

  3. Andy YOU 3,076 Reputation points
    2021-06-12T14:29:34.837+00:00

    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.

    0 comments No comments

  4. Anonymous
    2021-06-13T07:54:34.487+00:00

    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.