Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Windows 8.1 based computer does not resume from hibernation (S4) or from sleep (S3) randomly if you run an application to set an RTC wake-up time


View products that this article applies to.

Symptoms

Consider the following scenario:
  • You are running a Windows 8.1 based computer.
  • You use an application such as pwrtest.exe to set an RTC wake-up time so that the computer can wake up automatically after sleeping for a certain period of time.

A more common scenario is that you use the pwrtest.exe tool to run the sleep/hibernation cycle to do the stress test.

In this scenario, randomly the machine may not resume from hibernation (S4) or from sleep (S3) automatically. However, if you press any key or the power button, the system resumes correctly.

↑ Back to the top


Cause

This issue can happen if the “Allow wake timers” setting in the current power plan is disabled by certain application or the power plan itself is changed to a different one, which doesn’t have the “Allow wake timers” setting enabled in it.

To make the machine resume from sleep/hibernation successfully, the “Allow wake timers” setting in the current power plan needs to be enabled. Before pwrtest.exe starts to execute the sleep or hibernation cycle, it checks the current power plan and enable the  “Allow wake timers” setting in it if it’s not enabled. However, during the sleep cycle, any application can still modify the power plan and disable this setting or change the current power plan to a different one. If the “Allow wake timers” setting is not enabled in the currently selected power plan when the system enters into sleep/hibernation, it won’t resume from sleep/hibernation automatically.

On the Windows 8.1 system, the following scheduled task has been known to cause problem like this.

"\Microsoft\Windows\Sysmain\WsSwapAssessmentTask"

This scheduled task will launch the “%windir%\system32\rundll32.exe sysmain.dll,PfSvWsSwapAssessmentTask” program and this rundll32.exe process will launch a winsat.exe process to do the assessment. When winsat.exe is launched, it will change the current power plan to “High Performance”, perform the assessment and then change it back to the previous one once the assessment is completed. However, if the assessment is not completed when the system enters into sleep/hibernation, and because by default the  “Allow wake timers” setting in the “High Performance” power plan is not enabled, the system won’t be able to resume automatically.

Any other application who either disables the “Allow wake timers” setting in the current power plan or changed the current power  to a different one, which doesn’t have the “Allow wake timers” setting enabled in it, can also lead to the same result.

↑ Back to the top


More Information

If anyone changes the power plan, the following event is supposed to be recorded in the system event log.

Source: UserModePowerService

Event Content: Process <Process Name> (process ID:xxxx) reset policy scheme from {381b4222-f694-41f0-9685-ff5bb260df2e} to {8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c}

Each power plan is associated with a GUID. To find out the GUID for the built-in system power plan, please refer to the following article.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa373177(v=vs.85).aspx

For the non-system built-in power plan, you can run the “powercfg /query <GUID>” command to query its name and also the detailed configuration.

By combining the information from the system event log and the powercfg command output, we can know if any process changed the power plan before sleep but doesn’t change it back, which leads to the final issue.

To workaround the issue, you can disable the process who changes the power plan temporarily. If the issue is caused by the WsSwapAssessmentTask task, you can disable this task temporarily to work-around the problem.

↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 3012223
Revision : 1
Created on : 1/7/2017
Published on : 10/24/2014
Exists online : False
Views : 1298