Custom Power Settings for Signed Drivers
In Windows Vista and later versions, device and driver vendors can define custom device-specific power settings that are integrated with the Windows Vista power plans. The AddPowerSetting directive in the driver's INF associates a power setting value with a friendly name, a description, and a globally unique identifier (GUID) and specifies default settings for each power personality in the system-defined power plans. The system displays the custom power settings on the Advanced Settings tab of the Control Panel Power Options application.
Updated: January 21, 2008
Power settings affect how the device is installed and operates. Therefore, any vendor-supplied component that changes these settings must be signed. The only way for a vendor to define different settings or defaults for different customers is to supply separate signed driver packages.
Consider a customer who incorporates a display into systems that are used only in dim surrounding, such as movie theaters. In this situation, 75-percent brightness might be the desired default for AC power in the performance power scheme instead of 100-percent brightness. The only way that the display vendor can set these defaults on behalf of the customer is to supply a customer-specific signed installation package that defines this default.
If a customer requires power setting definitions or defaults that differ from those established at installation, it is the responsibility of the customer or system administrator to change them. The PowerCfg.exe command-line tool enables users to modify power schemes and individual power-setting values.
The INF can supply a default string for the friendly name and description of each power setting, or you can provide localized strings in an external DLL. A particular driver package must use one technique or the other; that is, you cannot include default strings in the INF for some customers and reference a DLL for other customers. For example, if the INF includes strings in English, you cannot also supply a DLL that is installed only in non-English-speaking locales. The DLL must be listed in the SourceDisksFiles section of the INF and is hashed along with the other files in the package.
If you later modify the DLL to change strings or to add support for more languages, you must create a new catalog file that contains the hash value of the modified DLL. If your changes are limited to the DLL and the driver binary has not changed, you can use the driver update acceptable (DUA) mechanism to receive a new signature for the catalog without retesting.
- Use the AddPowerSetting directive in the INF to integrate device power settings with system power plan settings.
- Provide localized friendly strings for the setting names and descriptions in an external DLL.
- Use the DUA mechanism on the Winqual Web site to update a driver package with a new signature, if necessary.
Powercfg Command-Line Options in TechNet Library