Prevent your PC from waking up automatically - gHacks Tech News

Prevent your PC from waking up automatically

I have configured my desktop PC to go turn off the monitor after 5 minutes and to go sleep after 10 minutes of inactivity.

While I don't have to worry about battery usage (because it is a desktop PC), putting it to sleep saves energy which in turn is beneficial to the utility bill.

I noticed recently that the PC would wake up automatically from sleep without me being anywhere near it.

This guide provides you with the tools and knowledge to analyze the issue in detail on your own device.

Finding the cause

The first thing you may want to do is find out what is causing the issue as it may save you lots of time fixing it.

troubleshoot pc sleep wake issues

Here is what you need to do:

  1. Tap on the Windows-key on your keyboard.
  2. Type cmd and wait for cmd.exe to appear in the results.
  3. Right-click on cmd.exe and select run as administrator. This launches an elevated command prompt that is needed for the operation.
  4. Run the command powercfg -lastwake to display the last device that woke the system. You may receive no information here depending on the configuration of the system and other parameters. The device displayed woke the system from sleep the last time.
  5. Run the command powercfg -devicequery wake_armed to display the list of devices that can wake the computer.
  6. Run the command powercfg -A to display the system's supported sleep states.
  7. Run the command powercfg -waketimers to display all active wake timers.

Fixing the wake issue

Some causes can be fixed right from the command line. If you noticed for example that a device, say the mouse, is responsible for waking the PC, you could disable its ability to do so to prevent that.

To do so, simply run the command powercfg -devicedisablewake "name" with "name" being one of the names returned by the command powercfg -devicequery wake_armed.

You can enable devices again at a later point in time using the command powercfg -deviceenablewake "name".

You may also want to check your network adapter settings as it can wake the PC as well under certain circumstances.

allow device to wake computer

  1. Use Windows-Pause to open the System control panel.
  2. Switch to Device Manager there and locate the network adapters group on the page that opens up.
  3. Double-click on the device to open its properties and switch to the Power Management tab.
  4. Check the allow this device to wake the computer preference. If it is checked, the device is allowed to wake the computer automatically.
  5. To disable the capability, uncheck the option and click ok afterwards.
  6. You can also check allow the computer to turn off this device to save power which turns off the network adapter when the computer goes to sleep.
  7. Switch to the advanced tab afterwards.
  8. The setting names and options vary depending on the adapter of your computer. Generally speaking, locate all "wake" related properties and make sure they are disabled.

wake

Other causes

The issues described above are the most common wake related ones but there are others that may also interfere with your computer's sleep state.

Here is a list of suggestions for you to go through:

Scheduled Tasks - A scheduled task may wake up the PC automatically. This can be Windows Update for example but also any other task.

  1. Press the Windows-key, type Task Scheduler and hit enter.
  2. Expand the tasks on the left and check if "wake the computer to run this task" is enabled under conditions.

Bios and motherboard - You may want to check all menus of the Bios of the computer to make sure wake related features are not enabled. Sometimes, configurations are set on the motherboard instead only. Consult the motherboard manual for pointers.

Now You: Are you using sleep mode or other power saving modes on your PC?

Summary
Prevent your PC from waking up automatically
Article Name
Prevent your PC from waking up automatically
Description
Find out how to prevent your computer from waking up automatically after it changed its power state to sleep mode.
Author
Advertisement

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:


Previous Post: «
Next Post: »

Comments

  1. Tim said on January 10, 2015 at 12:33 pm
    Reply

    “Are you using sleep mode or other power saving modes on your PC?”

    No, I had to do exactly what you described in your article. I’m on Windows 8.1 and sleep mode used to work fine until about six months ago, but like yourself I found it started to wake from sleep on it’s own, in fact it would wake straight away. Therefore I had to stop the [Microsoft] mouse and keyboard from waking the device in Device Manager (as they were the only things listed capable of waking the PC), and I just use the power button to wake from sleep now.

  2. Teddy Ficile said on January 10, 2015 at 3:43 pm
    Reply

    Another of those quick-valuable gHacks guides I convert with Printfriendly for a quick access in case of. Clear and precise as always.
    How do you write “Thanks a lot” in French with the English accent? Something like “Mercy bowcou”?!

    1. Martin Brinkmann said on January 10, 2015 at 6:46 pm
      Reply

      Teddy, thanks ;)

    2. JohnMWhite said on January 10, 2015 at 7:46 pm
      Reply

      That would be merci beaucoup.

      De rien. :)

  3. intelligencia said on January 10, 2015 at 6:12 pm
    Reply

    Mr. Brinkmann:

    Good Morning from the eastern seaboard of America!

    This is why I LOVE your website SO Much:
    For the past two months I have had the Exact issue of my computer waking up prematurely!
    I have tried to find the reason for this. It is very annoying as I try to go to sleep – – the light from my laptop display wakes me up.
    Anyway, the first thing I thought of when this issue initially came up was perhaps there was some malware lurking in my system or some kind of surveillance Crap that was surreptitiously implanted!
    However, my anti-malware arsenal continues to show that there is nothing sinister hiding in my system.
    I am just happy to have awaken this morning and gone to my favorite go-to TECH website and find this interesting piece of information which I am gonna print-out now.

    Mr. Brinkmann: have a wonderful day/night

    i

    1. Martin Brinkmann said on January 10, 2015 at 6:31 pm
      Reply

      Good evening to you. I’m glad you find my site useful ;)

    2. Mark said on January 12, 2015 at 11:00 am
      Reply

      Let us know how you get on as I’m having the exact same problem as yourself and Tim above and it’s beginning to do my head in. I have a laptop sitting under my TV running Windows 8.1 which I use mainly as a Media Center machine (XBMC) and which has been happily waking up and going to sleep when I tell it to up until a few weeks ago when it suddenly decided it was going to start waking up on it’s own on a regular basis. I had done no updates and made no changes to it that I could recall so why it is doing this now is a mystery.

      Having run the commands previously that Martin suggests here, it reports that the only two devices allowed to wake the PC are the network card and the infrared remote controller (which is as it should be), with the NIC set to only wake on magic packet. Eventvwr reports the wake events with source down as ‘Unknown’ rather helpfully, and I can find no tasks in Task Scheduler with the box ticked to allow that task to wake the PC. I have one program (Wake on Standby) that sits in the tray and wakes the PC at 8am in order for it to do media PC related tasks, but that has worked fine for the last year or so too and has never woken the machine at any other time as far as I can tell.

      It’s really rather annoying as it is connected to an automatic HDMI switch that will switch to the PC when it turns on, thus changing the picture if I’m using the Xbox, PS3 or another device connected to the switch.

      Automatic Maintenance has been long turned off, as per this article:

      https://support.microsoft.com/kb/2799178?wa=wsignin1.0

      Anyone have any other ideas?

  4. scylla said on January 10, 2015 at 7:07 pm
    Reply

    Wow! I never use the Windows key and I never use the Pause key – and now I’ve found a use for both! It’s quicker even than a desktop shortcut. You are a hero, Martin :-*

  5. Don said on January 15, 2015 at 5:39 am
    Reply

    A month or so after getting my new Windows 8.1 laptop, I started noticing my computer already turned on in the morning. I traced it to the “TaskScheduler” scheduled task. “TaskScheduler” is the Automatic Maintenance that we see in the Windows Action Center. Even though the task was set to stop the task if it runs longer than 1 hour, the task was still running many hours later. Even though the task was set to stop the task after the computer ceases to be idle, the task continued after I started using the computer.

    It was really annoying because my laptop battery would be drained in the morning.

    I couldn’t figure out anything to do. When I changed the task to start only on AC power, or not to wake the computer, something change the task back to the original settings. I didn’t want to disable it altogether because I suspect the task needs to run for Windows to work properly. I can run Maintenance manually when the laptop is on AC power; that is a pain, and I don’t know when it would be needed.

    But problem disappeared after a couple of months. The task now stops after an hour, just as it’s supposed to. I think it started working properly after a Windows Update.

    I expect that the task does a variety of things, and Microsoft can change those “things” in Windows Update. Maybe Microsoft screwed up and allowed some “thing” to be uninterruptible – that’s what I experienced last year. I have a suspicion I’ll see this problem again.

  6. luke said on March 7, 2015 at 6:29 pm
    Reply

    A couple of lines I’d like to add to the topic.

    TRY THIS IF THINGS STILL DO NOT WORK
    even after you have tried the procedures suggested above
    (you should really start from them, before).

    I experienced random awakenings from S3 sleep state too.

    With device management, I prevented everything, mouse, keyboard, all nics, from reactivating the pc from its sleep state.

    I upgraded the BIOS and altered some of its settings (e.g. ehci hand-off), installed more recent chipset drivers and even changed to disabled the USB selective suspend setting in advanced power settings.

    But still no changes.

    Via —> powercfg /lastwake

    I found out that one of my usb root hubs was the cause of the last wake;
    but it seemed to me, that hub, that it was the root hub connected to the usb mouse port (suspicion proved by evidence when I moved the mouse on purpose during sleep, and the pc woke up).

    Then I suddenly remembered I am behind a KVM switch.
    I don’t know exactly what class my KVM switch belongs to (see http://en.wikipedia.org/wiki/KVM_switch#Classes_of_USB_KVM_switches),
    anyway there was an option in it, via keyboard sequence, to deactivate its mouse emulation
    (I have an Aten switch).

    A new HID mice was installed, and now, after having unticked the option in device management for preventing it from waking the computer, everything works OK.

    Hurray!

    In short,
    pay ATTENTION if you are behind a KVM switch:
    you may have to disable (if allowed) any available MOUSE EMULATION feature before things really work.

  7. Paul said on September 9, 2015 at 12:12 pm
    Reply

    FYI Even though I had wake timers disabled in my power config, running powercfg -waketimers revealed two that were set and waking the computer anyway. I went into task scheduler to disable them, so hopefully that works.

  8. Michael said on December 21, 2017 at 12:12 pm
    Reply

    Hi,

    I still have this issue, I tried:
    Run the command powercfg -lastwake : which gave zero causes for wake…
    If I put my pc in sleep mode and switch off the light in the living room, the pc awakes!

    So It isn’t a software issue but a hardware one! Any ideas to solve?
    I’m running Arock Z77 Extreme 4, with a corsair 1000W modular psu

Leave a Reply

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

Please note that your comment may not appear immediately after you post it.