Computers go back to sleep 2 minutes after remote wakeup
Here's a brief explanation of what we're doing: Using Active Directory's Group Policy, we set our computers to sleep after 3 hours of inactivity. We are then waking up all of these computers at a specific time via Wake On LAN. The utility that we use to
send WOL's "magic packet" is EMCO's WakeOnLan utility. That part works just fine, the computers wake up exactly as intended.
Our problem is that the computers that we wake up go back to sleep 2 minutes after they've been remotely woken up. According to the event logs (Event ID 42), the reason is "System Idle". I would prefer that the computers don't sleep for another 3 hours
after being woken up, so what can I do to reset the sleep timer upon wakeup? Is there a better way to accomplish my goal?
December 29th, 2011 11:52am
Apparently this has been a problem in past versions of Windows. I happened to find this old article:
http://support.microsoft.com/default.aspx?scid=kb;en-us;318355&Product=winxp
It basically says that the computer forgets why it woke up, then goes back to sleep. It points to another article that basically says to install all updates. I have a Windows 7 machine that I'm using to test this, and I installed all of the updates (including
the optional ones), except for the language packs. Afterwards, I still had the same problem.
Any ideas??
Free Windows Admin Tool Kit Click here and download it now
December 30th, 2011 9:47am
Apparently this has been a problem in past versions of Windows. I happened to find this old article:
http://support.microsoft.com/default.aspx?scid=kb;en-us;318355&Product=winxp
It basically says that the computer forgets why it woke up, then goes back to sleep. It points to another article that basically says to install all updates. I have a Windows 7 machine that I'm using to test this, and I installed all of the updates (including
the optional ones), except for the language packs. Afterwards, I still had the same problem.
Any ideas??
**UPDATE**
I was able to confirm that Windows doesn't know why it woke up. Event ID 1 in the System log reads:
The system has resumed from sleep.
Sleep Time: 2012-01-12T13:23:02.910523800Z
Wake Time: 2012-01-12T13:30:10.968000800Z
Wake Source: Unknown
December 30th, 2011 5:46pm
Hi,
Regarding the issue, I just wondering whether this problem occurs when you wake up your machine locally?
Please use “powercfg –requests” to check which process cause this problem and post the result here.William Tan
TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
January 4th, 2012 12:53pm
Hi,
Regarding the issue, I just wondering whether this problem occurs when you wake up your machine locally?
Please use “powercfg –requests” to check which process cause this problem and post the result here.William Tan
TechNet Community Support
January 5th, 2012 4:38am
Hi Zhen,
This problem does not occur when I wake up the machine locally.
Here's the results of "powercfg -requests"
DISPLAY:
None.
SYSTEM:
[SERVICE] \Device\HarddiskVolume2\Windows\System32\svchost.exe (CryptSvc)
AWAYMODE:
None.
Free Windows Admin Tool Kit Click here and download it now
January 5th, 2012 1:13pm
Looks like I fixed the issue. There are a couple of computers still not cooperating, but for the most part all is well. Here's what I found:
First, apparently starting with Vista, Microsoft added a registry key to specify the sleep timeout from an unattended wakeup. The default value of this key is 120 seconds. There's a nice article about it here: http://www.vistax64.com/tutorials/171042-sleep-return-timeout-unattended-wake-up.html
In case that link breaks, here's a brief summary:
The key is located here: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0\DefaultPowerSchemeValues
To change:
Balanced: 381b4222-f694-41f0-9685-ff5bb260df2e
High Performance: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
Power Saver: a1841308-3541-4fab-bc81-f71556f20b4a
The "ACSettingIndex" is for when the machine is plugged in and DC is for running on battery power. Changing the ACSettingIndex for the relevant power plan fixed the problem with most computers.
To implement this change, I made a custom Administrative Template (.adm) to use within Group Policy. It's certainly not perfect or infallible, but here it is:
CLASS MACHINE
CATEGORY "WakeOnLAN"
POLICY "Sleep Timer After Remote Wakeup"
#if version >= 5 ;Executes if OS is Win XP SP2 or higher (based on version of Group Policy Editor)
EXPLAIN !!SettingHelp
;Registry key is applies to the "High performance" power plan. To change the "Balanced" plan use 381b4222-f694-41f0-9685-ff5bb260df2e instead of 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
KEYNAME SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0\DefaultPowerSchemeValues\8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
PART "BackToSleepTimeout" NUMERIC
VALUENAME "ACSettingIndex"
MIN 60 MAX 14400 DEFAULT 3600 SPIN 900
END PART
#endif
END POLICY
END CATEGORY
[strings]
; explains
SettingHelp="By default, Windows computers are set to return to sleep 120 seconds after a remote wakeup. This Administrative Template facilitates the change of the appropriate registry key. Do NOT set policy to "Disabled." This deletes the registry key."
March 23rd, 2012 5:29pm