Be green with Windows Vista Power Management...
Windows Vista has a new tool for investigating and configuring Power Management features. For this discussion, I'll focus on PowerCFG -LastWake feature that is new for Windows Vista. This tool can help diagnose individual, corporation, and Original Equipment Manufacturer (OEM) issues with machines returning from a sleep state. In Windows XP there was no easy way to determine who woke the machine, it was mostly trial and error. So for Vista, LastWake was created to make it easier to assist in identifying what actually woke the machine.
From my personal experience, I have the machine set to never sleep in the Control Panel Power Management settings as I wanted this to be manual. I would then set my desktop to a S3 sleep state when I left the room as my contribution to being green. Many times I found my desktop up and running upon my return. When I upgraded to Windows Vista, my machine continued to wake up on its own. With the new PowerCFG tool, I decided to try and see if I could identify what woke my computer.
Before leaving for work, my machine was placed into S3. When I got home, my machine was on and running waiting for me to log in. After logging in and opening a command window, I typed in the following command:
powercfg -lastwake
Wake History Count - 1
Wake History [0]
Wake Source Count - 1
Wake Source [0]
Type: Device
Instance Path: PCI\VEN_8086&DEV_27C8&SUBSYS_01A81028&REV_01\3&172e68dd&0&E8
Friendly Name:
Description: Intel(R) 82801G (ICH7 Family) USB Universal Host Controller - 2
7C8
Manufacturer: Intel
From this example, my USB Host Controller sent the signal to wake the computer. But who actually woke the machine? To find this out I queried for devices that are armed for wake. Three devices were returned by the query.
powercfg -DEVICEQUERY wake_armed
Microsoft USB IntelliMouse Explorer
HID Keyboard Device (003)
High Definition Audio Controller
By opening Device Manager and selecting View menu and choosing Device by Connection, I found the USB Host controller with the label _27C8. Opening that, I found it was my desktop mouse as it is the only device plugged into the USB controller that has the ability to wake my machine up. Upon further investigation, it turned out to be our house cats. They would use the desk as a launching pad to the window's ledge and sometimes they would step on the mouse pad on their way to the window. My resolution to this dilemma was to open Device Manager, locate the mouse and its Power Management settings, and simply uncheck "Allow this device to wake the computer".
From the OEM support perspective, this tool can help identify issues with custom devices. In one recent case, an OEM had a customer where if they manually placed the machine to sleep using an extra button on the laptop, the machine would wake shortly after. PowerCFG listed the following results:
powercfg /lastwake
Wake History Count - 1
Wake History [0]
Wake Source Count - 1
Wake Source [0]
Type: Device
Instance Path: ACPI\PNP0x0x\2&XXXXxXXX&2
Friendly Name:
Description: ACPI Sleep Button
Manufacturer: (Standard system devices)
When I heard about this, I asked them to remove the key from the keyboard for cleaning. Once it was reattached, the problem went away, so we only had a sticky key issue.
For the network administrator, this tool can help diagnose why machines are resuming when connected to a network. Protocols like router ARP packets can trigger Wake-On-LAN events. One such experience proved that the network card was waking the machine. The administrator was not interested in whom or what was waking the machine; they just wanted it set so only the administrators could do this. So after PowerCFG showed the NIC was responsible, we went into Device Manager and opened Power Management properties under the network adapter. We then set it to "Allow this device to wake the computer". We then followed up by setting "Only allow management stations to wake the computer", which gives the administrators control over this behavior in their domain by using a magic packet to wake a computer.
These are just a few examples of using PowerCFG, and there are a great many other uses available to explore: one just needs to do PowerCFG /? to see the possibilities.
If you would like to keep abreast of how Microsoft continues to innovate in power management please check our environmental website at https://www.microsoft.com/environment.
David Winkler
OEM Support Team
Comments
- Anonymous
June 09, 2009
PingBack from http://insomniacuresite.info/story.php?id=7423