Copy the executable sleeper.exe to the
local machine. As this is a power
management test it must be run from the local machine.
Simply
put, to help make power management testing easier. Windows 2000’s behavior when you select the “Stand By” option
from the “Shutdown Windows” dialog is it will try to put the machine into the
lowest sleep state reported by the machine.
If the request to go to that sleep state is rejected by one device
driver, Windows 2000 will then try the next lightest sleep state and so on
until it either a. No drivers fail the request to go to a particular sleep
state or b. There are no other sleep states to try. If the second case occurs a dialog box will come up and state
which driver failed the request to go to ‘Stand By’ but there is no information
stating which system sleep state that was.
If
you are trying to test S3 support you need some way to force the system to only
try S3 and not fall back to S1. In the
past the method to do this was to run a tool called dumppo. When you ran dumppo you would then modify
the admin power policies minsleep and maxsleep states to be the sleep state you
wanted to test. Then you would select
“Stand By” from the “Shutdown Windows” dialog to go to the sleep state you
specified in the admin power policy.
This
method is cumbersome and prone to mistakes, hence the need for this tool. With this tool you simple execute the
program and you will be presented with several buttons in which you can
initiate the sleep action from there.
This button is
designed to test a scenario that currently exists in WHQL through the ACPI
Stress test. The scenario is a reset is
performed at the end of writing the hibernation file instead of shutting off
the system. Since the ACPI Stress test
is a required test to get WHQL certification and again it is difficult to
properly set this scenario up a click of the ‘S4 (with reset)’ button will
perform this task of setting up the machine to do the restart and then initiate
a hibernation request.
No. This feature
is provided to give the tester or developer easy access to the shutdown and off
feature of power management.
It is actually quite
simple. The program will output to an
attached debugger (kernel or user mode debugger) a string stating which sleep
state it is selecting. If the machine
is going to Sx then the string is going to state “Selecting Sx” where x is the
state the machine is going to.
If you want to verify what is occurring from the system’s
point of view you will need to first attach a kernel debugger with the correct
symbols to the systeme the test is to be run on. Once the kernel debugger is attached break in by hitting
CTRL-C. Once at the kd> prompt enter
in ‘bp hal!HalpAcpiPreSleep’ and press enter.
Now a break point is set at the last function executed before the
machine goes to its sleep state. Next
hit ‘g’ to continue and then initiate the sleep state desired via the
program. When the debugger breaks in at
the break point, enter in ‘!poaction’ at the kd prompt. In the output from !poaction look for the
entry labeled SystemState. This is the
sleep state that the system is going to.
Below is an example debug
session determining which sleep state the machine is going to when the system
is going to S1:
kd> bp hal!HalpAcpiPreSleep
kd> g
Selecting S1
Breakpoint 0 hit
halacpi!HalpAcpiPreSleep:
8006ae88 55 push ebp
kd> !poaction
PopAction: 80471ef0
State..........: 3 - Set System State
Updates........: 0
Action.........: Sleep
Lightest State.: Sleeping1
Flags..........: 40000000 DisableWakes
Irp minor......: SetPower
System State...: Sleeping1 ß-This is the sleep state the machine is going to
Hiber Context..: 00000000
PopAction.DevState 814f03c8
Irp minor......: SetPower
System State...: Sleeping1
Worker thread..: 8153f740
Status.........: 0
Waking.........: FALSE
Cancelled......: FALSE
Ignore errors..: FALSE
Ignore not imp.: FALSE
Wait any.......: FALSE
Wait all.......: FALSE
Present Irp Q..: Head:814f0420 Empty
Order:
DevNode Seq....: 5a
NoLists........: 30
Partial........: Head:814f03fc Empty
Rebase.........: Head:814f03fc Empty
7 Paged, Root-Enum
2a 7:0 81213708 w \Driver\audstub
We welcome your comments, problem reports and wish-list requests. Please submit them by pointing your Internet browser to http://www.microsoft.com/ddk.
© Microsoft Corporation 2000