How to Prevent Your Windows Computer From Waking Up Randomly

Ben Stegner Updated 05-06-2020

It’s a frustrating problem when your PC randomly turns on from sleep. Not only does this waste power, but it might wake you up if you sleep near your computer.


If you have problems keeping your Windows 10 system in sleep mode, we’re here to help. Let’s look at why your computer randomly turns itself on, and how to stop your computer from waking up without your say-so.

Check for Wake Devices in the Command Prompt

To figure out why your computer randomly turns on, you can first use a few Command Prompt commands to get an idea of what’s going on.

To open a Command Prompt, right-click on the Start button (or press Win + X) to open the power user menu. There, select Command Prompt (or Windows PowerShell; either will work). Enter the following command:

powercfg –lastwake

This will show you the last device that woke your PC up from sleep. if you see something like Wake History Count – 0 as in the screenshot below, Windows doesn’t have a record of what it was. This can happen if you just rebooted your PC.

Next, you should try the following command:

powercfg –devicequery wake_armed

This one displays all the devices that are allowed to wake your PC from sleep. It’s common to see your mouse and keyboard listed here.

Windows Wake Devices Command Prompt

If you don’t want a device to have the authority to wake up your PC, use the following command to disable it, replacing the text in brackets with the name of the device. We look at a more user-friendly way to do this below.

powercfg -devicedisablewake [DEVICE NAME]

Review More Sleep Info in Event Viewer

For a bit more information on the latest sleep event, you can open the Event Viewer in Windows. Search for it in the Start menu for easy access; once it’s open, select Windows Logs > System in the left sidebar. From there, click Filter Current Log in the right sidebar.


In the filter window, click inside the Event sources box and select Power-Troubleshooter. You can use the Logged dropdown at the top to set a time frame if you want, then hit OK.

Windows Event Troubleshooter Power Filter

After this, you’ll see a list of events showing when Windows woke up from sleep. Select one to get more info about it, including exactly when it happened. Check the Wake Source inside the box to see what caused it. This may say Unknown, which obviously isn’t much help. But if there’s a specific cause here, you’ll know what to look for going forward.

Windows Power Event Log Info


Use the Device Manager to Disable Wake-Ups

Using the information you gained from the Command Prompt and Event Viewer, you can now hopefully prevent your computer from turning on during sleep mode through the Device Manager. To open it, right-click the Start button (or press Win + X) and choose Device Manager from the list.

This utility shows all devices connected to your PC, but not all of these have the ability to wake up your computer. You’ll want to check the ones revealed by the commands above. Devices under Keyboards, Mice and other pointing devices, and Human Interface Devices are the most common culprits.

Expand those lists and double-click on an entry to open its Properties window. If there’s more than one entry, you may have to check each one individually. Unfortunately, devices don’t always include their model name, and you’ll likely see multiple devices if you’ve connected more than one in the past.

In the Properties window for your device, you should see a Power Management tab at the top. Select this, then uncheck the Allow this device to wake the computer box and hit OK. This prevents your mouse, keyboard, or other device from waking up Windows from sleep.


Windows Allow Device Wake Computer

Repeat this process for any devices that you also want to disable. While you most likely won’t bump your keyboard by accident (unless your pet activates it), the mouse is a much more common problem. A particularly sensitive mouse can wake up your computer from a small shake of your desk or the floor. Thus, it’s a good idea to prevent your mouse from waking up the PC.

Even if you disable every device’s ability to wake up your computer from sleep, you can still wake it up using the power button. It’s up to you whether you want to keep another device enabled for this purpose. For troubleshooting purposes, it’s best to disable everything to start.

Stop Network Wake-Ups

While poking around in the Device Manager, you should be aware of another common culprit: your computer could be waking up from its network connection.

Most modern systems include a feature called Wake-On-LAN. This allows you to turn on your computer from anywhere in the world. Which using Wake-On-LAN How to Set Up Wake-On-LAN on Windows 10 Wake-on-LAN is a networked-based power switch for your PC. It's a relevant, yet underused feature. We'll show you how to set up Wake-on-LAN on Windows 10. Read More can be beneficial, it might also malfunction and cause your computer to wake up randomly.

If you don’t care about this feature, try disabling it to see if your sleep issue goes away. In the Device Manager, expand the Network adapters section and look for your connection adapter. This feature is almost always used with wired connections, so look for an entry containing Ethernet Connection or similar.

In its Properties window, switch to the Power Management tab again. Depending on your adapter, you may have a simple Allow this device to wake the computer box—uncheck it if so. However, other network adapters will have a list of options. In the below example, unchecking each of the boxes under Wake on LAN will disable the feature.

Windows Disable Wake on LAN

Turn Off Scheduled Task Wake Timers

The Windows Task Scheduler lets you set routines to run automatically on your system. While this is convenient, some tasks are set up to wake the computer so they can run. Even if you never set a task up manually, there’s a chance that some app is waking up Windows so it can check for updates or similar.

You can dig through the Task Scheduler by hand, but that’s not necessary. Instead, toggling a simple option in your power plan will disable tasks from waking up Windows. To access this, head to Settings > System > Power & sleep. On the right side, click Additional power settings to open the Control Panel page for Power Options.

There, click the Change plan settings link next to your current power plan. On the resulting page, select Change advanced power settings to open a new window. Finally, expand the Sleep item, followed by Allow wake timers. Change this to Disable and hit OK. Now, Windows will no longer wake up for scheduled events.

Windows Disable Wake Timers Power

For best results, you should repeat this for each power plan. That way, you won’t start having problems again if you switch plans.

Disable the Scheduled Maintenance Feature

Windows 10 has moved so many preferences to the Settings panel that you probably haven’t visited the Control Panel much. As it turns out, a lesser-known feature from Windows 8, called Automatic Maintenance, is still there in Windows 10. This can wake up your PC on its own, so you should disable it if your problem hasn’t gone away.

To check it, type control panel into the Start menu to search for and open it. If you see Category in the top-right, click it and change to Small icons.

From there, choose Security and Maintenance. Expand the Maintenance section and find Automatic Maintenance, then click Change maintenance settings underneath it. Make sure the Allow scheduled maintenance to wake up my computer at the scheduled time box is unchecked.

Windows Change Maintenance Settings

Scan for Malware

At this point, it’s worth running an anti-malware scan to make sure you don’t have something malicious waking up your system. While all malware acts differently, there’s a chance that it’s set to wake up your system in order to phone home or take some other action.

You can scan with the built-in Windows Defender. For a second opinion, download the free version of Malwarebytes and run a scan with that. Hopefully you don’t have anything hiding on your system, but it’s worth checking if you still can’t explain the wakeup behavior.

Stop Your Computer From Turning Itself On

Hopefully, one of these tips helped you solve the problem of your PC turning on randomly. This issue can have many causes, so it’s often difficult to troubleshoot. After making the above changes, if the problem still occurs, you may need to run through the first steps again to diagnose what device is still waking up your PC.

For more help with this, we’ve looked at how to fix other Windows 10 sleep mode issues How to Fix Windows 10 Sleep Mode Issues Here are a few troubleshooting steps for when you need to know how to fix sleep mode issues in Windows 10. Read More .

Related topics: Computer Maintenance, Sleep Mode, Troubleshooting, Windows 10, Windows Tips.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Dan M
    March 31, 2018 at 12:26 am

    I had a slight alteration. I am sharing a keyboard, so removing the USB from the port causes the USB Host to wake up (as seen by -lastwake) even though there is no entry for it (wake_armed). I disabled the keyboard wakeups in device manager, then for sleep, I pull out the keyboard USB, use the mouse to put the computer to sleep, then turn off the mouse before it finishes going to sleep.

    I wouldn't have been able to do this without the pro tips - thanks!

  2. Alex
    March 23, 2017 at 9:18 am

    Windows 10 is an absolute crock.

    Windows 7 was a great operating system but you just can't get it anywhere anymore. Who do you get rid of that stupid Microsoft browser again? You CAN'T. Years ago, Microsoft was told that IE had to have an option to be uninstalled so it was done, instead Microsoft creates this Edge garbage making it fundamental to the operating system and again jamming shit down our throats.

    For anyone reading, be smart! Either find a Windows 7 license to use or better yet...DON'T USE MICROSOFT!!!

  3. Mint Waxed
    January 27, 2017 at 2:39 pm

    Usually, the computer wakes because the plastics used in China are rather stiff and want to return to their original coiled or folded shape. When you move your chair or walk away from the computer, vibrations help this effect and the sensitive mouse mapping changes minutely and the computer wakes. The fix is to enter Control Panel > Device Manager and expand Mice. Right-click and select Properties then go to Power Management tab. Remove the check-mark "Allow device to wake computer". Then, you will have to press any key on the keyboard to wake the computer.

  4. Johnny
    January 11, 2017 at 11:05 am

    Had this problem and couldn't solve for a year. Then I disabled Windows Update service and problem is gone. Notebook hasn't waken up a single time.

    Once a month I enable Windows Update, get updates and disable again.

    Bonus: you are not constantly harassed by Windows to get updates.

  5. Bob Dean
    December 11, 2016 at 12:18 pm

    For me, Scheduled Tasks was the culprit! Thanks for the tip!

  6. Lyubo
    November 1, 2016 at 7:09 pm

    Useful information, thanks!

  7. Hekkaryk
    October 28, 2016 at 5:31 pm

    Thanks for an article, it's really useful! ^_^
    I always have similar problems when there is a update waiting to be installed but I highly recommend just letting Windows do his thing :P
    Looks like network card might have been issue this time. It was the only device beside mouse and keyboard that pop up after "powercfg -devicequery wake_armed" and disabling it via Device Manager solved problem :P
    Worth noting is that "powercfg -lastwake" was extremely cryptic: "Wake History Count - 1
    Wake History [0]
    Wake Source Count - 1
    Wake Source [0]
    Type: Fixed Feature
    Power Button" - which is obviously useless log message ("Fixed Feature Power Button"? Really?!) x_x

  8. masoud saeed
    October 22, 2016 at 5:43 am

    full study and great article

  9. bella
    October 6, 2016 at 10:59 am

    Hello, none of this or other similar advices didn´t solve my problem. I have windows 7. It wakes up immediately after going to sleep, anybody could help me? I sleep in one room with the computer and I need it to be ready 24/7. This situation starts to be unbereable. I never had problems like this, it started out of nowhere, I would say maybe after windows updates -_- as always, there come problems after updates. It´s always something, but this is so far worst problem I ever got.

  10. kayaker611
    May 5, 2016 at 4:31 am

    Few years ago I had a PC waking itself late every night, and my ISP repeatedly contacted me saying I was sending out a lot of robot spam. Malware detecting software could not find it. Eventually I suspected a downloaded program, deleted it, and the problem was solved. Looks like I had picked up some malware. So consider malware as another possible cause if nothing else fixes it.

  11. n13L5
    May 1, 2016 at 7:39 am

    All my settings have wake disabled as per someone else's list that matched your's.

    Still, it will wake up 45 seconds after I hybernate it to put it in my backpack (its a laptop I travel with, and I really need the damned thing to stay off when I hybernate it.

    Windows 8.1

    There are some external USB devices (which aren't plugged in when the problem occurs), where the check box under power options, to enable/disable to wake the computer is neither empty nor checked, it shows in grey and I clicking it has no effect.

  12. jq
    April 19, 2016 at 7:16 am

    Awsome! Thanks for these great hints!

  13. seanivo
    March 26, 2016 at 5:16 pm

    I also found that MollieSoft WinSleep program will put the computer BACK to sleep after it wakes up for whatever reason - as soon as it becomes sufficiently idle again.

  14. vogey04
    March 20, 2016 at 4:29 am

    Thanks for the great article!

    I used the mouse method, the network method, and the scheduled tasks method all at once. One of them fixed the problem! Much appreciated!

  15. seanivo
    March 15, 2016 at 3:44 pm

    One thing that might help is the pgm WinSleep from MollieSoft - - it has a timeline that shows you exactly when the computer is waking from sleep! So you can figure out what might be doing it...

  16. Terry Hingston
    February 10, 2016 at 7:08 pm

    Whoever makes programs to wake up people's computers should be SHOT.
    Why the hell would i want someone to make my computer default wake from sleep in the middle of the night, and install updates then leave my computer on for the next 6 hours, wasting a few dollars worth of power etc.
    Do you think they would be happy to pay me back for the money for the power?
    Thanks for the article

  17. Thomas
    December 24, 2015 at 10:51 pm

    I did this fix and it worked. Now a recent Windows 10 update hit and I had to do it again. I only had to change the network adapter wake properties the second time though so I think that is what is waking computers. Thanks Windows 10!

  18. Anonymous
    September 25, 2015 at 2:16 pm

    I done all the above, but Windows 10 still ramdomly wake from sleep mode or hibernation mode. Why Windows 10 do not has a button say "sleep until press the power button" mode?

    • Anonymous
      October 8, 2015 at 10:45 pm

      I'm having the exact same problems as you. I have tried everything above also. It worked for awhile but now its waking up right after I put it to sleep, I was even using hibernate and that isnt working right now either. I notice it does this just after Ive done a windows 10 update.

    • Anonymous
      October 11, 2015 at 11:22 pm

      I had the same issue, turned out in Win10 joysticks and joystick like devices can wake the computer, or stop it from sleeping.
      Also Joysticks do not show up in the powercfg commands.

      Hope this info helps.

  19. Ken E.
    February 3, 2014 at 9:11 pm

    Get Linux, and take control back over your computer.

  20. Johanan
    January 23, 2014 at 3:38 am

    Although i dont really leave the pc on at night .. This article was really useful for those other times i leave it on standby

  21. Aung Thu H
    January 23, 2014 at 12:43 am

    A very helpful article. My computer oftentimes wakes by itself, too.

  22. Rick
    January 22, 2014 at 11:54 pm

    NSA- need I say anymore? Un-plug it at night.

  23. Tom W
    January 22, 2014 at 8:03 pm

    I either turn off or hibernate my computer every night, then it gets switched off at the power socket.