Computer wakes a second after entering sleep mode

gnrtool82

Posts: 27   +0
Hello-

I have a task scheduled to occur daily each night to put my computer (mac mini 2012 running windows 10) to sleep. It runs a bat file (Rundll32.exe Powrprof.dll,SetSuspendState sleep) to put it into sleep. This works, sort of.

Usually instantly, the computer awakes. I'm trying to decipher the event logs, but they're beyond my understanding of computers.

It appears to have something to do with the WLAN, but I'm not sure what I'd need to disable and whether or not that would affect other things.

My goal is to run this task and wake it ~15 hours later with a wakeup script. I've tested these and they worked once, but for some reason, something is causing problems.

I appreciate any help. Thank you!
 

Attachments

  • event_logs.txt
    14.4 KB · Views: 5
So with newer age laptops desktops CPU/WLAN/GPU various other items have their own power settings and you will need to look at the power properties of each to ensure they will utilize your script. You may have to check default gpo policies as well on your system to ensure something isn't counteracting your script. It also depends on what your script looks like. If you shared your script I might be able to help.
 
Looking at your event log (good choice to show it):
Log Name: System
Source: BROWSER
Date: 12/16/2017 9:45:05 PM
Event ID: 8033
Description: The browser has forced an election on network

>> normal condition & can be expected as systems connect/disconnect from your lan

Log Name: System
Source: Microsoft-Windows-Kernel-Power
Date: 12/16/2017 9:45:05 PM
Event ID: 42
Description: The system is entering sleep

>> this is your script

Log Name: System
Source: Microsoft-Windows-Kernel-General
Date: 12/16/2017 9:45:05 PM
Event ID: 1
Description: The system time has changed

>> yawn, so what? This is an Internet service interruption!!
DISABLE WAKE ON LAN


Log Name: System
Source: Microsoft-Windows-WLAN-AutoConfig
Date: 12/16/2017 9:45:05 PM
Event ID: 10002
Description: WLAN Extensibility Module has stopped.
Module Path: C:\WINDOWS\System32\bcmihvsrv64.dll
>> consequence of sleep

Log Name: System
Source: Microsoft-Windows-Kernel-Power
Date: 12/16/2017 9:45:06 PM
Event ID: 107
Description: The system has resumed from sleep.

>> resuming 1 minute after sleep begun​
 
Log Name: System
Source: Microsoft-Windows-Kernel-Power
Date: 12/16/2017 9:45:05 PM
Event ID: 42
Description: The system is entering sleep

Log Name: System
Source: Microsoft-Windows-Kernel-Power
Date: 12/16/2017 9:45:06 PM
Event ID: 107
Description: The system has resumed from sleep.

>> resuming 1 minute after sleep begun​

These events, that appear to show that the system wakes back up from suspend/hibernation straight after it goes to sleep, are often misleading. Often, if you check the event log, nothing appears to have happened in the time since the computer supposedly woke itself up, and the time when you woke it up much later.

Today I finally figured out what's going on. The "wake from sleep" event is generated when you wake the computer, but when the event is generated, the clock is still set to the time it was at when the computer went to sleep, so it appears to have happened just one second after the sleep event. The very next thing Windows does is synchronise the clock. So it's just an artefact of the clock being incorrectly set.
 
These events, that appear to show that the system wakes back up from suspend/hibernation straight after it goes to sleep, are often misleading. Often, if you check the event log, nothing appears to have happened in the time since the computer supposedly woke itself up, and the time when you woke it up much later.

Today I finally figured out what's going on. The "wake from sleep" event is generated when you wake the computer, but when the event is generated, the clock is still set to the time it was at when the computer went to sleep, so it appears to have happened just one second after the sleep event. The very next thing Windows does is synchronise the clock. So it's just an artefact of the clock being incorrectly set.
Son of a...! Thanks for sharing, way too many hours wasted looking into this.
 
Back