How can I prevent my computer from waking up accidentally?

40

17

When I put my computer into sleep mode, it will wake up while I'm away from it. There's nothing near the computer that could move the mouse or accidentally press a button and I have no idea what might be causing it.

I tried checking what woke it, apparently LASTWAKE only tells me that it has been in sleep mode, not what woke it up.

enter image description here

I also couldn't find anything in my Power Options regarding Sleep that seems off. Poking around in the Event Viewer I notice the following: enter image description here

The Power-Troubleshooter event at the top notes the following:

The system has returned from a low power state.

Sleep Time: ‎2012‎-‎10‎-‎27T11:31:53.408927000Z Wake Time: ‎2012‎-‎10‎-‎27T12:25:51.887029300Z

Wake Source: Unknown

So does anyone have an idea to find out what might be causing it and how I can prevent my computer from randomly waking up?

Ivo Flipse

Posted 2012-10-27T21:15:38.633

Reputation: 24 054

When it woke up, did it go back to sleep again? Or just stay powered on until you send it to sleep again manually? I'm thinking that if it's programmed to wake up to get updates from Windows Update, I would expect it to go back to sleep when it's done. – Samir – 2014-09-14T09:53:29.543

3Wake on network activity, perhaps? I've also owned more than one laptop that woke itself up for seemingly no reason at all - when the lid was closed and inside a laptop bag – agent86 – 2012-10-27T21:22:04.540

Yup, same for me. In my case, a 3G card that kept trying to dial out. Whenever I put the laptop to sleep, I'd power off all the radios first. – None – 2012-10-27T21:23:15.973

It might be my laptop or NAS, but how can I figure out what might be causing it? – Ivo Flipse – 2012-10-27T21:23:25.693

I'm not in front of my Win8 box at the moment, but does the event log have any details about what triggered the power state change? – Nathan Osman – 2012-10-27T21:30:24.687

I guess its easier to find that out next time it happens, unless there's an easy way to find the event – Ivo Flipse – 2012-10-27T21:34:10.737

I swear I read somewhere that in Windows 8 when you put a computer to sleep it will automatically wake up after three hours in order to shut down completely; since the computer doesn't do that it means the problem is in this final power transition. I can't find anything however to back this up however. – badp – 2012-10-27T21:53:54.450

Run the command and check powercfg -devicequery wake_armed and check which device is causing the system to wake up. Then you can disable it under the device manager by right click on device and select properties under the power management tab. – avirk – 2012-11-02T02:22:15.963

3Check out your Power Management Options on your Control Panel> Power Settings>Change plan settings>Change advanced power settings. -> “Multimedia settings” option, “When sharing media.” ->”Allow the computer to sleep. Check other options one by one while you’re at it. – avirk – 2012-11-02T02:48:13.313

Answers

16

I've had this problem before when I had network shares that were hosted on the sleeping machine, but accessed by other machines on the network. There are some settings for network cards that determine if it can wake the machine from sleep, and under what conditions:

This TechNet article explains the power management settings for network devices on Win7. There's not a Win8 version of this page yet, but I assume they are somewhat similar.

Beyond this, many other devices with similar checkboxes to allow for waking - I'd probably advise turning as many of these off as possible, and seeing if your problem persists. If it does, you might consider a binary search style approach to figure out which one is the offending sleep-disturber.

agent86

Posted 2012-10-27T21:15:38.633

Reputation: 376

@IvoFlipse Are you saying you disabled the wake-on-mouse trigger, but you could still wake it up with the mouse? That doesn't sound right. I just want to know if it was your network adapter that was waking up your computer. – Samir – 2014-09-14T10:04:38.377

@sammyg sadly I can't check this anymore, since I've long since upgraded the relevant parts. But yes, it didn't sound right to me either – Ivo Flipse – 2014-09-16T06:27:01.240

Given that I can still wake my computer by clicking on my mouse, even though I disabled it, I think your answer must have been what solved my problem. So enjoy the bounty :-) – Ivo Flipse – 2012-11-03T11:27:30.513

18

If you type in your elevated command prompt powercfg /waketimers, it will display a list of scheduled tasks that will wake the computer. You might discover what could be causing this to occur.

If it is a wake timer that's causing this behavior, if you go into the Advanced power settings, under the Sleep category, you can disable Wake Timers. This might fix your issue, if this is the culprit.

For instance, I see this when executing that command: enter image description here

EDIT:

Also, by the way, I did recall this occurring with my laptop once. It took a bit of troubleshooting, but I discovered that the culprit was my Microsoft Arc Touch Mouse. I discovered that the USB dongle (which received its wireless signal), caused the computer to periodically wake up, even though the mouse wasn't powered on. I fixed the issue by finding the USB device in the Device Manager and, under Properties, turning off "Allow this device to wake this computer". However, I found a more prudent solution was to just not leave it plugged into the laptop all the time. :)

Ben Richards

Posted 2012-10-27T21:15:38.633

Reputation: 11 662

How were you able to determine that it was your Microsoft Arc Touch mouse that was waking up your computer? Were you able to see that somehow in the system? – Samir – 2014-09-14T10:12:53.807

@badp What does "external mouse and keyboard" mean? Do you mean wireless? And how did you solve the problem? – Samir – 2014-09-14T10:14:28.633

@badp Hey, maybe your computer was working the night shift?! :) You sleep, it works. It sleeps, you work. That's only fair, as long as you both get some sleep time. – Samir – 2014-09-14T10:18:48.217

@sammyg I asked this question in 2012... Mouse and keyboard were wired, just not the laptop's built-in. – badp – 2014-09-14T11:05:30.253

@badp You have a good memory then! :) OK, I understand now. What did you do to fix the problem? Just unplug mouse and keyboard? IIRC, my desktop computer wakes up when I unplug the mouse. – Samir – 2014-09-14T11:34:15.663

@sammyg My memory is not that good! :P – badp – 2014-09-14T12:16:50.007

I have this as well and "There are no active wake timers in the system." That said, it could very well be that additional wake timers are set when the system goes to sleep. – badp – 2012-10-27T21:51:32.830

It says: There are no active wake timers in the system. – Ivo Flipse – 2012-10-27T21:51:37.213

Re: your edit. I have an external mouse and keyboard plugged in at all times but normally those devices are unable to wake up the system anyway... I guess I'll try turning that switch off then. – badp – 2012-10-27T21:55:02.887

1Nope, no joy. I found my computer was still awake when I woke up :( – badp – 2012-10-28T07:37:29.150

6

You should check if you have anything similar to this in your BIOS:

enter image description here

Setting everything to disabled at the "Power" tab should override any Windows settings.

page4096

Posted 2012-10-27T21:15:38.633

Reputation: 580

6

I fixed this by doing the following:

  1. Go Device Manager
  2. Selecting each keyboard and mouse device and right-click Properties
  3. Go to the Power Management tab and untick "Allow this device to wake the computer".

tvStatic

Posted 2012-10-27T21:15:38.633

Reputation: 813

I like to wake up my computer with the mouse and the keyboard. However, somehow the Logitech wireless mouse woke up the laptop with a slight motion. So I disabled it, and now I stick to waking up the computer with the keyboard space button. – olee22 – 2013-07-19T06:55:06.533

6

There might be a scheduled task for the night that wakes up the computer.

I would check "Schedule tasks" (or whatever it is called on Windows 8), and specifically in your case the task of Microsoft / Windows / Time Synchronization / Conditions tab / check-box "Wake the computer to run this task".

You can also disallow all wake-up timers in Power Options / Advanced settings / Sleep / Allow wake timers.

Some helpful articles (and their comments) :

How to Fix a Computer that Keeps Waking Up
How To Prevent Your Computer From Waking Up Accidentally

harrymc

Posted 2012-10-27T21:15:38.633

Reputation: 306 093

I checked the Power Options, they were all turned off in my case. I also checked the Schedule tasks, but the check boxes are all ticked off. – Ivo Flipse – 2012-10-30T13:04:10.447

Thanks for the tip, it was on the things that woke up my computer. – olee22 – 2013-07-19T06:55:42.613

See also http://superuser.com/a/522628/35525

– David d C e Freitas – 2013-09-15T05:35:57.180

4

Sometimes there are several things in parallel behind a problem, which was my case. There were several things that woke my laptop at night occasionally. I had to alter all these:

  1. LAN-card, Wifi-card: Switch off network card "Allow this device to wake the computer"
  2. Logitech wireless mouse: Switch off "Allow this device to wake the computer"
  3. Mouse/keyboard in Logitech unifying controller "Allow this device to wake the computer"
  4. Hard drive maintenance schdeuled at 03:00 AM(defragmenter)
  5. Windows Backup scheduled at 03:00 AM
  6. Windows Update scheduled at 02:00 AM
  7. Windows Time synchronisation
  8. Multimedia streaming
  9. Shared folders on the hard drive

I changed the settings in the Network Card properties, Mouse properties, Time settings, Windows Backup. I also run command prompt: powercfg /waketimers.

Then I went through all the sub folders of in Task Scheduler, and modified all remaining tasks to run during weekdays, at lunch time or at dinner time. I've also set to have an idle period of 15 minutes, and to stop if I resume using the laptop. For example windows backup slows down my hard drive access, and I don't want it to interrupt my work, and it will run next day anyway. See the two screenshots below.

Start menu\Task Scheduler\[tasks]\Trigger\Daily At 03:00 AM every day

Start menu\Task Scheduler\[tasks]\Conditions\Wake* the computer to run this task

I like to wake up my laptop with the mouse and keyboard, but then I disabled the mouse. It woke the laptop even just by shaking the table a bit, and sometime even without movement (probably due to the wireless connection of the mouse). So now, I stick to the space bar (it is a wired external keyboard).

Otherwise, I have Windows 8 Pro, on a 2013 model Sony S13 laptop, with UEFI bios.

enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here

The "regular maintenance" setting can also be accessed through: Control Panel\System and Security\Action Center\Automatic Maintenance

olee22

Posted 2012-10-27T21:15:38.633

Reputation: 406

Did you have Windows Update set to automatically check, download and install updates? – Samir – 2014-09-14T11:44:40.350

1

Well, I have not really had a lot of time to investigate this. This problem sort of comes and goes, and I don't have all the time in the world to sit by the computer and wait for it to misbehave. But at least in my case, this appears to be related to the internal workings of Windows 8 and its different scheduled tasks and triggers.

a

You can see from the screenshot above that the automatic maintenance last ran on 2015-09-13 at 00:57 hours. Despite the fact that automatic maintenance is disallowed according to the settings, as seen in Action Center.

b

Note that the option "allow scheduled maintenance to wake up my computer at the scheduled time" is checked.

Windows automatically runs scheduled maintenance on a daily schedule when you're not using your computer.

This includes tasks such as software updates, security scanning, and system diagnostics. This maintenance will run daily if you aren't using your computer at the time you've chosen. If your computer is in use at the scheduled time or maintenance is behind schedule, Automatic Maintenance will run the next time the computer is not being used.

Pay attention to the last sentence in that text. What they left out is that it will wake the computer if necessary. "Automatic Maintenance will run the next time the computer is not being used [and wake it if necessary]."

I am often late with installing Windows updates, and I install them manually. This is because I need my computer for work, and I prefer to review the updates before they are installed. I therefore prefer to install them at my own pace and when I have time. I simply like to be in control of my own computer. Not some wise guy from Microsoft telling me how to run my system. But because my update installs are often overdue, the Windows 8 is apparently configured to kick in some of these scheduled tasks, and even wake the computer if necessary and install the updates for you, and successfully install the updates by overriding your user preference not to install updates automatically.

They have stepped this up now in Windows 10 to the point where you as a user don't even have the choice to review and install updates manually. Go figure... your computer is remotely controlled and dictated to from Redmond. Nice!

c

In the screenshot above, you can see that the wake timers have been disabled.

d

I actually use WOL (wake on lan) and I can't have it disabled. I don't want to! I choose not to! But this should not affect the problem that's being described. If there was any unexpected wakes due to network devices waking the computer by sending some gibberish packets on the network, this should be remedied by enabling WOL only for magic packets (as suggested in other answers here).

But the reason the computer is still being waken up is highly likely because of the way Windows 8 is configured to trigger scheduled tasks that wake the computer. In my case, these appear to be caused by overdue Windows update installs.

e

You can see in the screenshot above that the Regular Maintenance task last ran on 2015-09-13 at 00:57 hours. That's the same date and time as seen in Action Center.

I believe this is what's causing the infamous Wake Source: Unknown string to be printed for the powercfg -lastwake command. If you want to try to prevent the computer from waking up unexpectedly (and gain back some control of your computer) I would suggest disabling all of these scheduled tasks:

\Microsoft\Windows\TaskScheduler:

  • Idle Maintenance
  • Maintenance Configurator
  • Manual Maintenance
  • Regular Maintenance

\Microsoft\Windows\WindowsUpdate:

  • AUFirmwareInstall
  • AUScheduledInstall
  • AUSessionConnect
  • Scheduled Start
  • Scheduled Start With Network

You will find these by running taskschd.msc from the run prompt and navigating to their location.

Update: still wakes up


I just had my computer wake me up and disturb my sleep, because it can't sleep, or it won't sleep. This thing is out of control! It's sick! It's alive! I will have to hospitalize it or myself.

C:\Windows\system32>powercfg -lastwake
Wake History Count - 1
Wake History [0]
  Wake Source Count - 0

As usual... useless! But the next command pointed out a possible culprit.

C:\Windows\system32>powercfg -waketimers
Timer set by [PROCESS] \Device\HarddiskVolume1\Users\Sammy\AppData\Roaming\Spoti
fy\Spotify.exe expires at 02:00:50 on 2015-09-20.
  Reason: generic

I did have Spotify running in the foreground. Once I exited Spotify, the wake timer disappeared.

C:\Windows\system32>powercfg -waketimers
There are no active wake timers in the system.

Go figure! But I should mention that I am overdue with Windows Update... updates. Again! But also worth mentioning, is that I have disabled WOL for the NIC a few days ago, and I have rebooted since (so those settings should be applied). So this clearly shows that WOL is not the culprit... at least not in this case. (Unless those little check boxes in Device Manager are broken, and are indicating a disabled feature but clicking on them is not changing anything in the system.)

I don't have the time and energy to investigate this further, especially not at this hour. I need my sleep. So does the computer... but some corporate jerks across the ocean seem to think otherwise so they had the system programmed to disobey my commands. Well.. I guess I will have to start pulling the plug! Hah! I would like to see them beat that old-fashioned trick. Remove the power and it should not wake up.

Samir

Posted 2012-10-27T21:15:38.633

Reputation: 17 919

0

Wade through all the scheduled tasks in Task Scheduler and, under Conditions, make sure that "Wake the computer to run this task" is NOT set (except for those where you may actually want this action). You can also control whether the task runs on battery or not, if you have a laptop.

Daniel R Hicks

Posted 2012-10-27T21:15:38.633

Reputation: 5 783