This article provides background information and technical implementation details for Advanced Power Management (APM) support under Microsoft Windows 2000.
Windows 2000 includes an APM solution based on the APM 1.2 specification. Windows 2000 native support includes only Suspend, Resume, Battery Indicator, and Off (that is, the operating system will power off the system when shut down or hibernate completes). Support is not implemented for other APM BIOS calls.
NOTE: The OnNow power management architecture in the Windows 2000 operating system is designed to provide the optimum user experience and system performance on systems with Advanced Configuration and Power Interface (ACPI) system board and BIOS support to ensure that the operating system controls both device and system power states. The OnNow/ACPI architecture also provides an integrated system-wide user interface that allows the user to conveniently and simply set preferences for power usage.
Windows 2000 support for APM as described in this article is provided solely to ensure compatibility for well-designed legacy APM systems. System designers are strongly encouraged to implement ACPI solutions on both mobile and desktop systems that run either Windows 2000 or Windows 98 operating systems. Power management support in future versions of Windows operating systems will be based solely on ACPI.
| APM Capabilities in Windows 2000 | |
| Windows 2000 Setup and APM | |
| APM in the Registry | |
| Cautions and Tips for APM Support and Windows 2000 | |
| How Microsoft Tested for the AutoEnable APM List |
APM will not work with every system running Windows 2000. Microsoft has tested APM-capable systems to determine how well each system and BIOS combination supports APM.
APM support is being implemented to support mobile systems that meet the following criteria:
| • | Hardware meets basic Windows 2000 requirements. |
| • | An ACPI-compliant BIOS is not expected to be available for end-user upgrade for the system for Windows 2000. |
| • | Its APM 1.2-compliant BIOS is not on the "Disable APM List" (described later in this article) for a particular BIOS version number and date. |
| • | All user-defined CMOS power control features are disabled or minimized. Timeouts should be set to Off or to the longest possible time allowed. The APM BIOS is enabled. IMPORTANT: APM support must be enabled in the BIOS when Windows 2000 is installed. Although APM can be disabled on many mobile systems, a non-ACPI system that has APM disabled in the BIOS will not have power-management capabilities installed under Windows 2000. |
AutoEnable APM List. In a similar manner to that used for ACPI BIOS support under Windows 2000, systems that passed testing at Microsoft have been placed on the "AutoEnable APM List." This list is used to let Windows 2000 Setup know whether it is safe to install APM support. This AutoEnable APM List includes the APM system/BIOS combinations that Microsoft believes are stable and ready to support APM while running Windows 2000. Windows 2000 Setup will install and enable APM support automatically on such systems.
Disable APM List. Microsoft placed entries for specific system/BIOS combinations on the Disable APM List that malfunctioned in testing when APM was turned on. For system/BIOS combinations on the Disable APM List, Windows 2000 Setup will not install or enable APM support.
Neutral Systems. Systems that are not on the AutoEnable APM List or the Disable APM List are considered "neutral." In such cases, the user can manually install the APM support in Windows 2000 by using the installation method provided with the operating system:
| • | In the Control Panel Power applet, click the APM tab, and select the option to enable (or disable) APM support. |
| • | In the Control Panel System applet, click the Hardware tab and click the Device Manager button. Find the "NT APM/ Legacy Support" class, and under it find the "NT APM/ Legacy Interface" node. Enable or disable this setting in the same way that any device is enabled or disabled. |
During installation, Windows 2000 Setup Loader uses values in Biosinfo.inf to determine whether the system is on the AutoEnable APM List or the Disable APM List. Then Setup acts on the system as follows:
| • | AutoEnableAPM value in Biosinfo.inf: Because this system's APM BIOS is known to work with Windows 2000, APM support is installed and enabled automatically. |
| • | Disable value in Biosinfo.inf: Because this system's APM BIOS is known to malfunction with Windows 2000, APM support will not be installed. For a system in this category, Windows 2000 provides no user interface option to install or turn on APM. |
| • | No value in Biosinfo.inf (neutral; enable by default): This system's BIOS does not appear in Biosinfo.inf; APM support will be installed, but not enabled. The user can turn APM on (or off) using the APM tab of the Control Panel Power applet. |
Users and OEMs must take care in choosing to enable APM support on "neutral" systems, because there is no guarantee of system behavior when running the NTAPM service.
CAUTION: End-users and OEMs must not attempt to circumvent the Disable APM List. Forcing APM support to run on a system that is on the Disable APM List will generally produce erratic, undesirable results on an otherwise stable system.
The following registry key can contain value entries that indicate whether Windows 2000 Setup found the system to be on the AutoEnable or Disable APM lists:
HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Control\ BiosInfo\ APM
A value of 1 means AutoEnable; a value of 2 means Disable. If there is no entry, the system is considered to be neutral.
The following registry key contains the MultifunctionAdapter entries for the system:
HKEY_LOCAL_MACHINE\ HARDWARE\ Description\ System\ MultifunctionAdapter
If the Windows 2000 Ntdetect module finds an APM BIOS on the system, it creates a MultifunctionAdapter subkey with an entry for APM. Such subkeys are numbered on each system, starting with 1. To find the MultifunctionAdapter subkey for APM on a specific system, search for a value of Identifier=APM.
In the following example, the MultifunctionAdapter subkey for APM is 22, but it could be any number:
HARDWARE\DESCRIPTION\System\MultifunctionAdapter\22 Class Name: Adapter Last Write Time: 12/4/98 - 3:30 PM Value 0 Name: Component Information Value 1 Name: Configuration Data Type: REG_FULL_RESOURCE_DESCRIPTOR Value 2 Name: Identifier Type: REG_SZ Data: APM
If there is no such value of Identifier=APM under a MultifunctionAdapter subkey in the registry, then Ntdetect didn't find an APM BIOS for the system; therefore, the system's class is set to neutral. If such a MultifunctionAdapter subkey exists, it means that APM is present; however, this does not necessarily mean that APM is usable under Windows 2000. Setup checks Biosinfo.inf for that information.
The APM registry information stored by Ntdetect is defined in the following structure:
typedef struct _APM_REGISTRY_INFO {
// To ensure dual-boot compatibility
// with Windows NT 4.0:
UCHAR ApmRevMajor;
UCHAR ApmRevMinor;
USHORT ApmInstallFlags;
// Defines for 16-bit interface connect:
USHORT Code16BitSegment;
USHORT Code16BitOffset;
USHORT Data16BitSegment;
// New part of the structure for Windows 2000:
UCHAR Signature[3];
UCHAR Valid;
// Detection Log Space:
UCHAR DetectLog[16];
} APM_REGISTRY_INFO, *PAPM_REGISTRY_INFO;
When the NTAPM service (Ntapm.sys) starts, it sets the value of ApmActive to Active=1 in the following registry key:
HKEY_LOCAL_MACHINE\ CurrentControlSet\ Control\ ApmActive
A system with an ACPI motherboard that doesn't support APM will install and function as an ACPI system. The following registry key will be present, with a value of Start=0:
HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Sevices\ ACPI
Not all computers have either APM or ACPI, such as legacy mobile systems with no power management method. In these cases, no power management support is provided by the operating system.
Disable APM on Multiprocessor Systems. Be certain that APM is turned off in the BIOS of a multiprocessor system, because such a system can seriously malfunction when Ntdetect tries to call APM. Microsoft will not support APM on multiprocessor systems in Windows 2000. However, ACPI works well with multiprocessor systems.
Disable APM on Desktops Systems. APM BIOS and APM support in the operating system must be turned off for all desktop systems. The APM BIOS can cause problems even if the system isn't running operating system support for APM.
For example, a PC with a PCI add-on graphics adapter might have Ntapm.sys turned off and the APM BIOS turned on, which will time out and suspend the system at some point. The APM BIOS cannot correctly save and restore the video display, so upon resume, the video display is gone.
Microsoft encountered another example in testing: a system employed as a server had Ntapm.sys turned off in the operating system, but the APM BIOS was turned on. The BIOS would time out and suspend the system, because it did not appear busy, even though the server was heavily loaded.
Disable APM on an Incompatible System. If APM support has been enabled, but Windows 2000 and APM are not compatible on a specific system, try the following options:
| • | Disable APM using the APM tab in the Control Panel Power applet. |
| • | Boot in Safe Mode (F8) and delete Ntapm.sys from the %winnt%\system32\drivers folder. |
Caution for Graphics Adapter Changes. End users should be cautioned that using a graphics adapter other than the one included in their system could result in problems, because changing the graphics adapter will change the system's APM configuration and function. The APM BIOS might not detect a new graphics adapter added to a system or a graphics adapter in a docking station. If the adapter is not discovered by the APM BIOS, Suspend will not work.
Turn Off Screen Blanking. If a video timeout is set in the BIOS and the screen blanks, moving a built-in pointing device can wake the system, but a USB or other external mouse cannot. To prevent this from occurring, turn off screen blanking in the BIOS, and use the Blank (default) screen saver.
Pre-set Single Power Button. On some systems, there is a single button that can be set in the BIOS to serve as either the Off or Suspend/Resume button. The setting for the button's functionality must be the same for the BIOS and in the user interface setting in the operating system. The most common setting for button functionality is Suspend/Resume.
Ensure Operating System Control. The system BIOS should be configured to allow the operating system to turn off the screen, disk, and so on, rather than letting the APM BIOS control these actions. If APM performs these tasks (rather than the operating system), the components won't always be restored to the original settings upon wake-up. If the operating system controls these devices, there is a more reliable chance of the device being restored to its previous state.
In particular, timeouts in the BIOS should be set to NONE or for as long as possible. Then be sure that the operating system timeouts set in the Control Panel Power applet are shorter than those set in the BIOS. (Some APM BIOSes will refuse to function if the timeouts are set to NONE, so use the longest possible value in such cases.)
APM and User Interface Options. The user can determine whether APM is running on a system by selecting Shutdown from the Start menu--if APM support is running, the Stand-By entry appears in the list of choices.
Two options must be set manually using the Control Panel Power applet:
| • | For notebook systems, the battery gauge on the tool bar must be turned on manually. |
| • | Hibernate must be turned on manually, even though it works without ACPI or APM, with ACPI, or with APM. |
In testing APM capabilities to determine which systems would be added to the AutoEnable APM list, the APM test team at Microsoft focused on systems supported in previous versions of Windows, testing systems already available at Microsoft. After those systems were categorized as listed earlier, the testing coverage was expanded to include the systems in the Microsoft test base until all available systems were tested.
NOTE: There is no program for OEMs to submit APM systems for testing, nor will APM systems be accepted if submitted to Microsoft for testing.
Call to action for APM BIOS:
| • | For information, please send e-mail to ihv@microsoft.com with APM BIOS in the Subject line. Please include your name, title, company name, and phone and fax numbers. |
| • | The APM 1.2 specification is available on the web at http://www.microsoft.com/ whdc/ hwdev/ archive/ busbios/ amp_12.mspx. |