How to find out why your PC wakes up, and how to stop it

Martin Brinkmann
Dec 31, 2013
Updated • Mar 18, 2016
Tutorials
|
33

Putting your PC into sleep mode manually or automatically can have several advantages. Technically, it is a low power mode, and sleep, suspend or stand by are all referring to the same mode.

What happens in the background is that the last state of the system is stored in RAM before power gets cut to all devices and systems that are not necessary for this minimal mode of operation.

The state is resumed when you hit the wake button, or when the keyboard or mouse are moved.

Sometimes, the computer comes out of sleep mode without you doing anything. This can have several causes, and this guide discusses several of them.

Part 1: Wake diagnosis

The first thing you should do is try and determine the source or device that is waking up your PC. Windows ships with several tools that you can use for the purpose, and this part of the guide explains how you can use them to find out more about the source.

Note that while it may reveal information to you, it is not always the case. It can happen that the diagnostic programs return no sources at all, or only unknown sources.

Still, it is a good idea to start here as a hit will provide you with the information needed to prevent that the computer wakes up automatically while in sleep mode.

Command line diagnosis

powercfg-lastwake-pc

First thing you may want to do is check whether devices are responsible for waking up the computer automatically. Do the following to find that out:

  1. If you are using Windows 7, click on the start menu button, enter cmd, right-click cmd.exe and select Run as Administrator.
  2. If you are using Windows 8.x, use Windows-X to display a command menu, and select Command Prompt (Admin) from the available list.
  3. Type powercfg -lastwake and as a second command powercfg -devicequery wake_armed.
  4. Devices that are responsible for waking up the computer may be listed here.
  5. You may also want to run powercfg -waketimers to find out whether any wake times are configured to bring back the computer when it enters sleep mode.
  6. Sometimes, the name of a program may be displayed here. If that is the case, you may want to go through the applications options to figure out a way to prevent it from waking up the PC.

Windows Event Viewer diagnosis

the system has resumed from sleep

While still on the command line, type eventvwr.msc to launch the Windows Event Viewer.

  1. Select Windows Logs > System from the menu in the sidebar.
  2. Once the log is displayed, select Filter Current Log from the Actions menu.
  3. A new window opens up that you use to customize what is displayed in the selected even t log.
  4. Locate Event sources there and select Power-Troubleshooter from the context menu. The list is sorted alphabetically, and you should not have any issues finding the filter item in the menu.
  5. All entries are listed by level, date and time, and Event ID.
  6. Open the entries closed in date and time to the waking of the PC and check for the Wake Source listing there. It may reveal what woke the computer.

Part 2: Fixing wake mode

This is the part where we apply the fix, to prevent that sleep mode is left automatically. If you have discovered what is responsible for it on your system, skip all suggestions except for the one that matches your issue.

If you do not know the particular source, try them all to find out more about it. I suggest you try one solution, put your PC into sleep mode, and see if it recovers from that automatically. If it does, that was not the solution for your issue, and you should go to the next suggested fix and try that.

Fixing the mouse

allow this device to wake the computer

The computer mouse may be responsible for bringing the PC out of sleep mode. You can find out if that is the case, and disable the feature, in the following way:

  • Tap on the Windows-key and enter mouse here.
  • You should see a Control Panel entry labeled mouse if you are using Windows 7. If you are using Windows 8, type mouse, hit return, select to see all settings, and select the result that is labeled Mouse and nothing else.
  • This opens the Mouse Properties on the desktop.
  • Switch to the Hardware tab here and select Properties on it.
  • Click on the Change settings button when the new window opens up.
  • Switch to the Power Management tab here and uncheck "Allow this device to wake the computer".

Alternatively, open the Device Manager from the desktop Control Panel, locate the Mice and other pointing devices listing here, and right-click on the devices listed under it to select properties there. Or, simply double-click on the device in question.

Here you get the power management options directly, without having to go through the lengthy process described above.

Fixing Wake Timers

allow-wake-timers

If a wake timer is responsible for waking your PC, you may want to check out the application that is responsible for that to prevent it from waking up your PC.

If you do not want any wake timers to be used, it is possible to disable the feature completely.

  1. Press the Windows-key and type powercfg.cpl to open the Power Options of the PC.
  2. Click on change plan settings next to the current plan, and repeat the process outlined below for all other plans that you are using.
  3. Click on change advanced power settings on the next page. This opens a new window that displays the advanced power options of the selected plan.
  4. Select Sleep > Allow wake timers, and change the setting from enable to disable by clicking on it.
  5. Click apply to save the changes.

Make sure you make the change for all available power profiles.

Fixing network cards

network controller wake pc

Network adapters may wake the PC as well. You can check how the installed adapters are configured by running the following commands:

  1. Tap on the Windows-key, type device manager, and select the result from the list of suggestions.
  2. Select Network Adapters and double-click on the main network adapter. If you have multiple listed here, repeat the process for each that is in use.
  3. Switch to the Power Management tab in the new window that opens up and uncheck "Allow this device to wake the computer".
  4. Additionally, switch to Advanced, and locate the properties "wake on pattern match" and "wake on magic packet", and if they are enabled, disable them.

wake on pattern match

Side tip: You may also want to check your BIOS configuration for "wake on ring" and "wake on LAN" settings if available, and disable those.

Scheduled Reboot Task

On Windows 10, you will find that a reboot task may wake the computer up to install updates for the system and will wake up the computer even if no updates are available at that time.

reboot task

To disable the task, do the following:

  1. Tap on the Windows-key, type Task Scheduler and hit enter.
  2. Navigate to the following section: Task Scheduler (Local) > Task Scheduler Library > Microsoft > Windows > UpdateOrchestrator
  3. Locate the reboot task there, right-click on it and select Disable from the context menu.

This is not enough however as Microsoft will re-enable it again in the future. To avoid this, it is necessary to change the permissions of the task on the operating system level.

  1. Open an elevated command prompt with a tap on the Windows-key, typing cmd.exe, holding down Shift and Ctrl-keys, and hitting enter.
  2. Run the following command: takeown /f C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot
  3. Open File Explorer and go to C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator
  4. Locate the file called reboot there (it has no file extension), right-click on it, and select Properties.
  5. Switch to the security tab.
  6. Select the "System" account, and remove its write access to the file.

Automatic Maintenance

automatic maintenance wake

Some versions of Windows are configured to run automated maintenance tasks. While you may not want to disable those completely, it makes sense to set them to a time of day that works for you.

  1. Open a File Explorer window, click on the address field at the top of it, and paste the following in it: Control Panel\All Control Panel Items\Security and Maintenance\Automatic Maintenance
  2. After you hit enter, you are taken toe Automatic Maintenance Control Panel applet.
  3. There you can set a time for the daily task, and configure whether the task is allowed to wake up the computer at the scheduled time.
  4. Disable "allow scheduled maintenance to wake up my computer at the scheduled time" to block it from waking the PC.

Command line Fu

Here is a list of useful commands that can help you find out more about your PC's sleep mode and wake up configuration:

  • powercfg -a displays a list of available sleep states of the computer.
  • powercfg -devicequery wake_armed lists all devices that can wake the computer
  • powercfg -devicequery wake_programmable lists all devices that can be programmed to wake up the PC.
  • powercfg -devicedisablewake "exact device name" disables the wake functionality of the selected device.
  • powercfg -deviceenablewake "exact device name" will enable that device again.
  • powercfg -lastwake displays the last device that woke up the PC.
  • powercfg -waketimers lists all active wake timers.

Powershell

Run the command powershell from the command line to activate it.

  • Get-ScheduledTask | where {$_.settings.waketorun} lists all tasks and their state in regards to wake operations.

Useful resources

If you want to know more about the sleep and wake functionality, use the following resources as a starting point:

  • How to make your PC wake from sleep automatically [How to Geek]
  • Wake Patterns explained [Ukleja]
  • Troubleshoot Vista or Windows 7 Sleep Mode Problems [Vistax64]
  • Sleep Mode overview [Wikipedia]
Summary
How to find out why your PC wakes up, and how to stop it
Article Name
How to find out why your PC wakes up, and how to stop it
Description
Find out why your computer is waking up on its own, and how to stop the PC from waking up by adjusting Windows settings.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Previous Post: «
Next Post: «

Comments

  1. Michael said on November 11, 2021 at 12:28 pm
    Reply

    Thank you.
    I wrapped our commands in some powershell

    $menu=@”
    Easy access to powercfg commands:

    1. list sleep states supported by the computer
    2. list all devices enabled to wake-up the computer
    3. disable a wake-up device
    4. list all devices that can be enabled to wake-up the computer
    5. enable a wake-up device
    6. show the last device that woke-up the computer
    7. list all active wake-up timers
    8. list all scheduled wake-up tasks
    “@

    # check for admin rights and self elevate
    If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))
    {
    # Relaunch as an elevated process:
    Start-Process powershell.exe “-File”,(‘”{0}”‘ -f $MyInvocation.MyCommand.Path) -Verb RunAs
    exit
    }

    function f3 {
    $array=$(powercfg -devicequery wake_armed )
    if ($array.count-1) {
    foreach ($item in $array){
    if ($item) {
    write-host -b red “$($array.indexof($item)+1) $item”
    }
    }

    $input=read-host “Enter a number to select device to disable or leave blank for no action”

    if ($input -match “\d+” -and $array[$input-1]) {
    write-host -f red “disabling $($array[$input-1])”
    write-host $(powercfg -devicedisablewake “$($array[$input-1])” | out-string)
    }
    }
    }

    function f5 {
    $pable=$(powercfg -devicequery wake_programmable)
    $armed=$(powercfg -devicequery wake_armed)
    $array=$pable | ?{$_ -notin $armed}
    if ($array.count-1) {
    foreach ($item in $array){
    if ($item) {
    write-host -b green -f black “$($array.indexof($item)+1) $item”
    }
    }

    $input=read-host “Enter a number to select device to enable or leave blank for no action”

    if ($input -match “\d+” -and $array[$input-1]) {
    write-host -f green “enabling $($array[$input-1])”
    write-host $(powercfg -deviceenablewake “$($array[$input-1])” | out-string)
    }
    }
    }

    do {
    write-host -f cyan $menu
    $input=read-host “Enter a number to select an action or leave blank to exit”
    switch ($input) {
    1 { write-host -f yellow $(powercfg -a | out-string) }
    2 { write-host -f yellow $(powercfg -devicequery wake_armed | out-string) }
    3 { f3 }
    4 { write-host -f yellow $(powercfg -devicequery wake_programmable | out-string) }
    5 { f5 }
    6 { write-host -f yellow $(powercfg -lastwake | out-string) }
    7 { write-host -f yellow $(powercfg -waketimers | out-string) }
    8 { write-host -f yellow $(Get-ScheduledTask | where {$_.settings.waketorun} | out-string ) }
    Default {}
    }
    } until (!$input)

  2. Yevhen said on August 14, 2020 at 2:57 pm
    Reply

    I’m from 2020. This helped. Thank you kindly.

  3. Anonymous said on February 3, 2020 at 11:46 pm
    Reply

    Many years later, this article is super amazing and useful. Thank you so much!

  4. Mark said on June 17, 2018 at 8:17 pm
    Reply

    This is the best writeup I’ve found on the topic. I particularly liked how you called out the Advanced tab in Device Manager, as well as suggesting to check the BIOS. I’ve only ever heard of going to Power Management. I hope that does the trick. Been so plagued by this. Will happily give a donation for such a good article.

  5. Derek said on June 14, 2018 at 11:54 pm
    Reply

    Excellent writeup. Concise and easily followed. I hope my changes will stop my computer from waking up again. I hate when I see issues like this as I’ve been out of the loop in building and diagnosing computers for a while. Thanks!

  6. Andrea said on July 23, 2017 at 10:21 am
    Reply

    Thanks

  7. Ehsan said on April 7, 2017 at 4:08 pm
    Reply

    Thanks alot , It solved my problem through this command :

    powercfg -waketimers

    I found the reason of powering on , and disabled that task in “Task Scheduler”

    thanks alot !

    nice solution/website

  8. Anonymous said on December 30, 2016 at 4:39 pm
    Reply

    thank you

  9. Anton said on October 5, 2016 at 11:36 pm
    Reply

    Hi, thanks followed the instructions here and managed to understand that it was popcorntime’s TTmedia service that was waking my computer every time i powered it down!

  10. Thiago Ferreira said on June 2, 2016 at 4:40 am
    Reply

    In my case, with the command lastwake I could discover that a .exe (Core.exe, from Warsaw – GAS Bank Security) is the reason of my wake ups. Any suggestion about how to avoid a executable to bring my PC up?
    Thanks

    1. Daniel said on June 5, 2016 at 12:29 pm
      Reply

      Same here, Thiago.

      Let me know if you find any way to fix this:

      powercfg -lastwake
      Contagem de Histórico de Ativação – 1
      Histórico de Ativação [0]
      Contagem da Origem de Ativa̤̣o Р1
      Origem de Ativação [0]
      Tipo: Timer de Ativação
      Proprietário: [PROCESS] \Device\HarddiskVolume4\Program Files\Diebold\Warsaw\core.exe
      Razão Fornecida do Proprietário: generic

  11. seanivo said on March 26, 2016 at 10:46 pm
    Reply

    One diagnostic tool (at least as to WHEN your computer is waking up and how often) is winSleep by mollieSoft – see http://www.molliesoft.com/winsleep. It shows a timeline of when your computer was awake or asleep over the last several days (or even further back) so can give you a clue as to what is waking it up and when.

  12. Mark Lamberta said on March 3, 2016 at 3:46 pm
    Reply

    So what do I do if “Wake Source: Unknown”?

    Is there any way of determining the unknown source?

  13. Rob said on October 19, 2015 at 4:58 pm
    Reply

    Verizon In Home Agent was the cause of my frustration. After disabling mouse, keyboard, and NIC wakeup parameters PC would still wake every minute. Finally, the command powercfg /waketimers showed that IHA was scheduling a waketimer each 60 sec. Uninstalling this app resolved the problem. Happy surfing…

  14. Max Villiams said on July 30, 2015 at 3:07 am
    Reply

    Thanks for the informative article. I have searched in lots of forums and sites but except your guide nothing worked. Keep going. Expecting more articles in the future. :)

  15. Saidur Rahaman said on November 3, 2014 at 8:08 pm
    Reply

    Very nice. Thanks

  16. Sebastian said on February 7, 2014 at 9:24 am
    Reply

    Thank you, Martin. Very useful guide.

  17. Antonio said on January 2, 2014 at 10:15 am
    Reply

    This is a great article because it has teached me something that I didn’t t know before. Unfortunately, it hasn’t helped me because event viewer attributes all my unexpected night wake-up events to an “unknown device”.

    1. Ed said on January 6, 2014 at 10:18 am
      Reply

      Sometimes it’s not even the computer. I finally figured out what was causing mine to wake up. Every time someone uses the ventilation fan in the adjacent bathroom it will bring my desktop out of sleep mode. My office is adjacent to this bathroom and I guess the outlet and the bathroom fan are on the same circuit.

  18. blue.bsod said on January 2, 2014 at 12:32 am
    Reply

    Windows 8 especially wakes it up for any auto updates including optional ones we need to acknowledge to install. Though I wish there was an ignore or opt out option for some of those optional updates so it never wakes the computer again.

    I put the computer to sleep and the moment I walk away it boots up again. I check all settings as suggested by Martin and the only thing still on the list as on are the optional updates which I already installed with the exception of the stupid Bing Bar…

    I hate any toolbar. Why buy a large screen monitor (27″), only to have the majority of the screen taken over by useless tool bars. I don’t even have the browser tool bars or bookmark bar up. Only the URL box and any icons that can launch from that line.

  19. utkarsharma said on January 1, 2014 at 9:13 am
    Reply

    Thanks

  20. GK said on January 1, 2014 at 8:19 am
    Reply

    The various tasks running in the OS Task Scheduler are majorly responsible for waking PCs. It’s a good idea to check those too. :)

  21. Glen said on January 1, 2014 at 8:06 am
    Reply

    I have the opposite problem. The computer will not wake from S3 sleep properly. The fans spin up, HDD activity light flicks on for a second, but the screen stays blank, with no mouse or keyboard activity. The power button doesn’t soft-shutdown the computer as it is programmed to; it only does the four-second hard shutdown. I’ve disabled hybrid sleep as this seems to be a common fix, but it hasn’t solved the problem. All Event viewer says is that the computer recovered from an abnormal shutdown.

    I’m tearing my hair out trying to fix this one. Any ideas?

    1. Martin Brinkmann said on January 1, 2014 at 9:11 am
      Reply

      I suppose you have checked this article? http://support.microsoft.com/kb/266283

  22. Jason said on January 1, 2014 at 2:45 am
    Reply

    Do you have a guide to sort out what prevents a system from enabling a screen saver/power save on monitors?

    1. Martin Brinkmann said on January 1, 2014 at 9:17 am
      Reply

      No unfortunately not at this time. I can’t promise anything but I check it out to see if I can find out enough about it to write a guide.

      1. TG2 said on July 18, 2017 at 11:41 pm
        Reply

        Martin – just wondering if you’ve found any good troubleshooting for the screen saver yet?

        My case I don’t want this machine to sleep (yes, never) but I would like it to do the screen saver and then turn off the monitor.

        So far I’ve discovered that if I have a powershell window open and at the front/active, that my screen saver *will* turn on, but then seconds later will come back from it. I’ve been searching off and on for a month but not finding a good and concise troubleshooting list as you have done for “sleep”.

        Either way, thank you for a very well written and time proven re-usable sleep guide!
        (fwiw – windows 10 pro, standard release branch, amd ryzen processor, gigabyte aorus rx580, 1x512g SSD primary, 1x3tb secondary drive, 1xCDr/w drive)

  23. Anthony said on January 1, 2014 at 12:00 am
    Reply

    Ever since 8.1 my PC has occasionally (not sure why only sometimes) been refusing to sleep (worked fine on 8), which while researching I have recently learned the commands above. While I suspect MS will shortly release a fix to my issues, it’s great to use the above tips to help determine an obvious root cause. Thanks for the excellent write up as I’ll keep it for a future reference!

  24. C J Earner said on December 31, 2013 at 9:52 pm
    Reply

    “powercfg -devicequery wake-armed” needed to be “powercfg -devicequery wake_armed” on my win 8.1 machine (note the underscore)

    Thanks so much for this article. My PC constantly wakes itself and I hadn’t been able to figure out why. Now I know where to look.

    1. Martin Brinkmann said on December 31, 2013 at 10:52 pm
      Reply

      You are right, it needs to be an underscore. I have edited the guide. Good luck with the troubleshooting!

  25. ilev said on December 31, 2013 at 7:05 pm
    Reply

    Does Microsoft’s automatic update wake a PC from sleep ?

    1. blue.bsod said on January 2, 2014 at 12:30 am
      Reply

      Yup, it wakes it up for any auto updates including optional ones we need to acknowledge to install. Though I wish there was an ignore or opt out option for some of those optional updates so it never wakes the computer again. I put the computer to sleep and the moment I walk away it boots up again. I check all settings as suggested by Martin and the only thing still on the list as on are the optional updates which I already installed with the exception of the stupid Bing Bar… I hate any toolbar. Why buy a large screen monitor (27″), only to have the majority of the screen taken over by useless toolbars. I don’t even have the browser toolbars or bookmark bar up. Only the URL box and any icons that can launch from that line.

    2. Martin Brinkmann said on December 31, 2013 at 7:55 pm
      Reply

      Yes it can do that.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.