Why does my Windows computer immediately turn back on after sleep/hibernate?

52

29

After clicking sleep or hibernate in Windows 7, my computer loads for a while and then goes into sleep mode, but not 1 second later it powers back up. The event log has no errors and no warnings appear when it comes back out of sleep/hibernation.

Here's my system specifications:

I believe this is all that's relevant. I've installed the latest chipset drivers, but I'm unable to update my BIOS (but this is another matter; maybe because the motherboard in the V3-P5G31 bundle is different).

I've also tried turning off the "Allow this device to wake up my computer" for the network card, keyboard, and mouse -- but this makes no difference.

If flashing the BIOS is the only thing that will fix this, then I will create a new question to this effect.

Maybe I should change the suspend mode from S3 to S1?

Nick Bolton

Posted 2010-02-26T13:23:18.153

Reputation: 2 941

Answers

44

To continue from Nicholaz's answer this reveals some wake events in the event log that I missed out, since they were not errors:


To find out what caused your computer to wake from sleep, do the following:

Open Event Viewer by clicking the Start button , clicking Control Panel, clicking System and Maintenance, clicking Administrative Tools, and then double-clicking Event Viewer.‌ If you are prompted for an administrator password or confirmation, type the password or provide confirmation.

  1. Expand Windows Logs, and then click System.

  2. In the Actions pane, click Filter Current Log.

  3. In the Filter Current Log dialog box, in the Logged list, select the time range.

  4. In the Event sources list, select Power-Troubleshooter, and then click OK.

  5. In Event Viewer, in the System pane, select the date and time for the event that you want to view.

  6. On the General tab, view the Wake Source for the event.


After inspecting the filtered results, I see plenty of messages like so:

The system has resumed from sleep.

Sleep Time: ‎2010‎-‎02‎-‎24T23:42:44.283678200Z
Wake Time: ‎2010‎-‎02‎-‎24T23:43:10.233041900Z

Wake Source: Device -USB Root Hub

However, I've also spotted this rather annoying "unknown source" variant:

The system has resumed from sleep.

Sleep Time: ‎2010‎-‎02‎-‎20T22:41:30.687040200Z
Wake Time: ‎2010‎-‎02‎-‎21T10:07:54.488171000Z

Wake Source: Unknown

I will update my answer if the solution is disallowing this device to wake the computer.

Update:

I have resolved my issue!

Turns out that the "USB Root Hub" source is a little misleading; it was actually both my keyboard and mouse that were waking up my computer (without being touched/pressed). The solution was to uncheck "Allow this device to wake up the computer" on both the mouse and keyboard devices (selecting them independently does not resolve the issue).

Perhaps updating my mouse/keyboard drivers will fully resolve the issue.

Nick Bolton

Posted 2010-02-26T13:23:18.153

Reputation: 2 941

1If you disallow mouse and keyboard to "wake from sleep", how do you wake the computher after it goes into sleep? (or am I misreading something?) – Kevin Fegan – 2014-10-12T19:32:45.460

Ahh cool, great to hear the link had been helpful (hint hint :-)) – Nicholaz – 2010-02-26T20:20:40.117

Haha, accepted ;) -- also, updating my Logitech drivers did not "fix" the issue. Stupid bug. Oh well. – Nick Bolton – 2010-02-27T23:03:51.697

4@KevinFegan: Power button. – Macke – 2015-06-06T07:30:33.823

This saved me, got the same problem windows starting after 1sec sleep... disabling keyboard and mouse wake solved it. finally i can use WOL! – Jens Marchewka – 2016-09-17T09:38:04.593

It fix the issues on Windows 8 (and 8.1) too. – Vargas – 2013-12-11T11:24:40.313

20

I had this exact same problem on the exact same motherboard. But in my case it was just the mouse doing it; the keyboard couldn't wake it up if its life depended on it (and I have it set to do it, too). Probably because I'm using a PS/2 keyboard, not a USB one, and the auto-wake-up seems connected to USB hub weirdness. Or something.

I think I'm going to look for a BIOS upgrade now.

At another article, I saw two great commands to run in command prompt that will give more specific answers:

powercfg -lastwake

and

powercfg -devicequery wake_armed

Chris E

Posted 2010-02-26T13:23:18.153

Reputation: 201

3and after you've found out the name of the device just powercfg -devicedisablewake <device_name> to stop it from doing it (require admin) – flagg19 – 2014-09-24T18:18:42.840

I made a program for this purpose. Requires .Net (included since Vista). https://dl.dropboxusercontent.com/u/260388200/Disarm-Wake-Timers.rar VirusTotal Scan (only one random av picks this as a malware prob. bcause of the necessary UAC permission): https://www.virustotal.com/it/file/eae8564c72fbdd8492523eec6e49ff5f1adc7c364ea7749cad837924ec499187/analysis/1454381129/

– beppe9000 – 2016-02-02T02:49:44.783

1Thanks @flagg19; super helpful! Note: it seems to require double quotes around the device name, like this: powercfg -devicedisablewake "Intel(R) Ethernet Connection (2) I219-V" – Ryan – 2016-03-19T02:38:13.397

1Simple powershell to disable all(run as adm): powercfg -devicequery wake_armed | % { powercfg -devicedisablewake $_ } – Gauss – 2018-11-30T02:58:09.270

5

My Windows PC was having the exact same problem. Turned out to be I had a USB phone charging cord hanging out of one of the PC USB ports with nothing attached. Removing the cord and only using it when I needed to solved the problem.

Jim Fink

Posted 2010-02-26T13:23:18.153

Reputation: 51

1Weird! That should not happen. ಠ_ಠ Was it a special, proprietary cord or a generic cord that could be used with any phone? (Not that I expect and answer from Jim, but you never know.) – Synetech – 2013-11-29T02:20:53.353

5

For future use: Waking up can also be done by "Wake Timers". To disable those, follow this instructions:

Simple fix

1.Search for power plan.

2.Click on power plan

3.Select advanced settings

4.Expand sleep section

5.Expand allow wake timers.

6.Disable both of them.

Complex fix

1.Search for task scheduler.

2.Go through each task checking the Conditions.

3.If you see "Wake the computer to run this task" ticked then untick it (need to right > click on task and select properties).

Credit goes to monkeymiles, original url: Source

Yonixw

Posted 2010-02-26T13:23:18.153

Reputation: 151

3

My answer was a different one: The Samsung Magician application.

I used the answers here to look in the log, and mine was "unknown" which obviously didn't help much. I disabled devices, etc., nothing worked.

And then I ran across "Windows 8 wakes up IMMEDIATELY from sleep" over on Windows 8.1 IT Pro forums. And so I did the same and stopped running Magician. And my problem was solved. Sleep works fine.

So if all else fails, and you have a Samsung SSD, disable the magician application.

Kevin Anderson

Posted 2010-02-26T13:23:18.153

Reputation: 141

2

I have both a "gaming" mouse and keyboard from Logitech. Both come with extra buttons and keys which can be programmed. As a result of its additional functionality, my mouse shows up with devices both under the mouse and keyboard headings in the device manager.

I was able to configure my PC so that only my keyboard would wake the PC. The only way to do this however is by figuring out which HID Keyboard devices were related to my mouse through trial and error. Basically, I unchecked "Allow this device to wake the computer" on one of the devices, put the computer to sleep, and then moved the mouse. If the PC woke up, I tried unchecking the box on one of the other "HID Keyboard Device" entries. Eventually I determined which entry was related to my mouse, and then I rechecked the box on all of the other devices.

Thomas

Posted 2010-02-26T13:23:18.153

Reputation: 21

1

You may benefit from updating your BIOS if it's not the newest version already, and/or mucking around with the BIOS settings that wake the machine up. I think you can turn off USB standby power and so on with various mainboards.

You may find that the intent of an option in poorly-documented BIOS interfaces is slightly different than the results it produces - for example, on an early build of the P8Z68-V Pro EFI image (BIOS replacement) if you turn off USB legacy keyboard and mouse support... they stop working in the EFI interface. The mainboard has no PS/2 ports. At this point there is only one way to re-enable them - clear all the settings to default with the reset button.

Fortunately the newer revisions fixed this because it was driving me loopy (the legacy USB keyboard support didn't work properly either, I couldn't use the Intel SSD firmware update CD).

evilspoons

Posted 2010-02-26T13:23:18.153

Reputation: 449

1

I got the answer. I also had the same problem, and the answer is because of your power settings.

Most people set it to high perfomance which doesn't let it enter sleep. Just see Troubleshoot power problems and download a small file. It'll fix it for sure; I tried it.

Gratine

Posted 2010-02-26T13:23:18.153

Reputation: 11

0

I've had this problem caused by a PS/2 mouse. Although it was set to -DEVICEDISABLEWAKE my BIOS did not respect this setting and would wake the PC anyway if the mouse moved. Replacing it with a USB mouse resolved it.

finnw

Posted 2010-02-26T13:23:18.153

Reputation: 131

0

I had the same issue, but I was able to solve it. I removed the power adapter from the UPS power supply on to a separate outlet.

Dan A

Posted 2010-02-26T13:23:18.153

Reputation: 1

0

When I had this problem, it persisted even when I unplugged everything except the power cord. Restarting the computer solved it.

B T

Posted 2010-02-26T13:23:18.153

Reputation: 603