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.
Here is what you need to do:
- Tap on the Windows-key on your keyboard.
- Type cmd and wait for cmd.exe to appear in the results.
- Right-click on cmd.exe and select run as administrator. This launches an elevated command prompt that is needed for the operation.
- 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.
- Run the command powercfg -devicequery wake_armed to display the list of devices that can wake the computer.
- Run the command powercfg -A to display the system's supported sleep states.
- 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.
- Use Windows-Pause to open the System control panel.
- Switch to Device Manager there and locate the network adapters group on the page that opens up.
- Double-click on the device to open its properties and switch to the Power Management tab.
- Check the allow this device to wake the computer preference. If it is checked, the device is allowed to wake the computer automatically.
- To disable the capability, uncheck the option and click ok afterwards.
- 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.
- Switch to the advanced tab afterwards.
- 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.
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.
- Press the Windows-key, type Task Scheduler and hit enter.
- 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?
“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.
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”?!
Teddy, thanks ;)
That would be merci beaucoup.
De rien. :)
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
Good evening to you. I’m glad you find my site useful ;)
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:
Anyone have any other ideas?
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 :-*
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.
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.
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.
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.
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