1. Boot from hardware and firmware
At first glance, startup and shutdown seem to be the most basic features of an operating system, but as you get a better understanding of how computers work, you quickly see that there’s nothing simple or basic about startup, shutdown, or related processes and procedures. In fact, anyone who’s worked with computers probably has had a problem with startup or shutdown at one time or another. Problems with startup and shutdown can be compounded in modern computers because of their extended frameworks for advanced configuration and power management in firmware and hardware.
Many administrators install Windows Server 2012 on desktop-class systems without giving careful consideration to how this could affect the operation of the computer. When you install Windows Server 2012 on a desktop-class system, it is critically important for you to understand how computers designed for desktop operating systems handle advanced configuration and power management in hardware and firmware. This will enable you to modify the hardware and firmware settings so that they work better with Windows Server 2012.
Hardware and firmware power states
Before the boot environment is loaded, computers start up from hardware and firmware. Windows desktop operating systems do things a bit differently from Windows Server operating systems when it comes to power-state management features. In Windows desktops, turning off a computer and shutting down a computer are separate tasks. By default, when you turn off a computer running a Windows desktop operating system, the computer enters standby mode. When entering standby mode, the operating system automatically saves all work, turns off the display, and enters a low power-consumption mode with the computer’s fans and hard disks stopped. The state of the computer is maintained in the computer’s memory. When the computer wakes from standby mode, its state is exactly as it was when you turned off your computer.
You can turn off a computer running a Windows desktop operating system and enter standby mode by tapping or clicking the Settings charm, tapping or clicking Power, and then tapping or clicking Sleep. To wake the computer from the standby state, you can press the power button on the computer’s case or a key on the computer’s keyboard. Moving the mouse also wakes the computer.
If you install Windows 8 or Windows Server 2012 on a mobile computer, the computer’s power state can be changed by closing the lid. By default with Windows 8, the computer enters the standby state when you close the lid. By default with Windows Server 2012, the computer doesn’t change its power state when you close or open the lid, but you can configure the server to shut down when you close the lid.
There are, however, a few “gotchas” with the power button and the standby state in Windows desktop operating systems. The way the power button works depends on the following:
- System hardware For the power button to work, the computer hardware must support the standby state. If the computer hardware doesn’t support the standby state, the computer can’t use the standby state and turning off the computer powers it down completely.
- System state For the power button to work, the system must be in a valid state. If the computer has installed updates that require a reboot or you’ve installed programs that require a reboot, the computer can’t enter the standby state and turning off the computer powers it down completely.
- System configuration For the power button to work, sleep mode must be enabled. If you reconfigured the power options on the computer and set the power button to the Shut Down action, the computer can’t use the standby state and turning off the computer powers it down completely.
You can determine exactly how the power options are configured on a Windows computer by tapping or clicking the Settings charm, tapping or clicking Control Panel, and tapping or clicking Power Options. The options available depend on the type of computing device.
Diagnosing hardware and firmware startup problems
Whether you are working with a Windows desktop operating system or a Windows Server operating system and trying to diagnose and resolve startup problems, be sure to keep in mind that power-state management capabilities are provided by the hardware but are enabled by the operating system. Because of this, to fully diagnose and resolve boot issues, you must look at the computer’s hardware and software, including the following items:
- Operating system
To better understand the hardware aspects of boot issues, let’s dig in and take a look at Advanced Configuration and Power Interface (ACPI). A computer’s motherboard/chipset, firmware, and operating system must support ACPI for the advanced power-state features to work. There are many types of motherboards/chipsets. Although older motherboards/chipsets might not be updateable, most of the newer ones have updateable firmware. Chipset firmware is separate from and different from the computer’s underlying firmware interface.
Currently, there are three prevalent firmware interfaces:
- Basic Input Output System (BIOS)
- Extensible Firmware Interface (EFI)
- Unified Extensible Firmware Interface (UEFI)
A computer’s BIOS, EFI, or UEFI programming provides the hardware-level interface between hardware components and software. Like chipsets themselves, BIOS, EFI, and UEFI can be updated. ACPI-aware components track the power state of the computer. An ACPI-aware operating system can generate a request that the system be switched into a different ACPI mode. BIOS, EFI, or UEFI responds to enable the requested ACPI mode.
ACPI 4.0 was finalized in June 2009 and ACPI 5.0 was finalized in December 2011. Computers manufactured prior to this time will likely not have firmware that is fully compliant, and you will probably need to update the firmware when a compatible revision becomes available. In some cases, and especially with older hardware, you might not be able to update a computer’s firmware to make it fully compliant with ACPI 4.0 or ACPI 5.0. For example, if you are configuring the power options and you don’t have minimum and maximum processor-state options, the computer’s firmware isn’t fully compatible with ACPI 3.0 and likely will not fully support ACPI 4.0 or ACPI 5.0 either. Still, you should check the hardware manufacturer’s website for firmware updates.
ACPI defines active and passive cooling modes. These cooling modes are inversely related to each other:
- Passive cooling reduces system performance but is quieter because there’s less fan noise. With passive cooling, Windows lessens power consumption to reduce the operating temperature of the computer but at the cost of system performance. Here, Windows reduces the processor speed in an attempt to cool the computer before increasing fan speed, which would increase power consumption.
- Active cooling allows maximum system performance. With active cooling, Windows increases power consumption to reduce the temperature of the machine. Here, Windows increases fan speed to cool the computer before attempting to reduce processor speed.
Power policy includes upper and lower limits for the processor state, referred to as the maximum processor state and the minimum processor state, respectively. These states are implemented by making use of a feature of ACPI 3.0 and later versions called processor throttling, and they determine the range of currently available processor performance states that Windows can use. By setting the maximum and minimum values, you define the bounds for the allowed performance states, or you can use the same value for each to force the system to remain in a specific performance state. Windows reduces power consumption by throttling the processor speed. For example, if the upper bound is 100 percent and the lower bound is 5 percent, Windows can throttle the processor within this range as workloads permit to reduce power consumption. In a computer with a 3-GHz processor, Windows would adjust the operating frequency of the processor between 0.15 GHz and 3.0 GHz.
Processor throttling and related performance states were introduced with Windows XP and Windows Server 2003, but these early implementations were designed for computers with discrete-socketed processors and not for computers with processor cores. As a result, they are not effective in reducing the power consumption of computers with logical processors. Beginning with Windows 7 and Windows Server 2008 R2, Windows reduces power consumption in computers with multicore processors by using a feature of ACPI 4.0 called logical processor idling and by updating processor-throttling features to work with processor cores.
Logical processor idling is designed to ensure that Windows uses the fewest number of processor cores for a given workload. Windows accomplishes this by consolidating workloads onto the fewest cores possible and suspending inactive processor cores. As additional processing power is required, Windows activates inactive processor cores. This idling functionality works in conjunction with the management of process performance states at the core level.
ACPI defines processor performance states, referred to as p-states, and processor idle sleep states, referred to as c-states. Processor performance states include P0 (the processor or core uses its maximum performance capability and can consume maximum power), P1 (the processor or core is limited below its maximum and consumes less than maximum power), and Pn (where state n is a maximum number that is processor dependent, and the processor or core is at its minimal level and consumes minimal power while remaining in an active state).
Processor idle sleep states include C0 (the processor or core can execute instructions), C1 (the processor or core has the lowest latency and is in a nonexecuting power state), C2 (the processor or core has longer latency to improve power savings over the C1 state), and C3 (the processor or core has the longest latency to improve power savings over the C1 and C2 states).
Windows switches processors or cores between any p-state and from the C1 state to the C0 state nearly instantaneously (fractions of milliseconds) and tends not to use the deep sleep states, so you don’t need to worry about the performance impact of throttling or waking up processors or cores. The processors or cores are available when they are needed. That said, the easiest way to limit processor power management is to modify the active power plan and set the minimum and maximum processor states to 100 percent.
Windows saves power by putting processor cores in and out of appropriate p-states and c-states. On a computer with four logical processors, Windows might use p-states 0 to 5, where P0 allows 100 percent usage, P1 allows 90 percent usage, P2 allows 80 percent usage, P3 allows 70 percent usage, P4 allows 60 percent usage, and P5 allows 50 percent usage. When the computer is active, logical processor 0 would likely be active with a p-state of 0 to 5, and the other processors would likely be at an appropriate p-state or in a sleep state.
ACPI 4.0 and ACPI 5.0 define four global power states. In G0, the working state in which software runs, power consumption is at its highest and latency is at its lowest. In G1, the sleeping state (in which software doesn’t run), latency varies with the sleep state and power consumption is less than the G0 state. In G2 (also referred to as S5 sleep state), the soft off state where the operating system doesn’t run, latency is long and power consumption is very near zero. In G3, the mechanical off state (in which the operating system doesn’t run), latency is long and power consumption is zero. There’s also a special global state, known as S4 nonvolatile sleep, in which the operating system writes all system context to a file on nonvolatile storage media, allowing the system context to be saved and restored.
Within the global sleeping state, G1, are the sleep-state variations summarized in Table 1. S1 is a sleeping state in which the entire system context is maintained. S2 is a sleeping state similar to S1 except that the CPU and system-cache contexts are lost and control starts from a reset. S3 is a sleeping state in which all CPU, cache, and chipset contexts are lost and hardware maintains the memory context and restores some CPU and L2 cache configuration context. S4 is a sleeping state in which it is assumed that the hardware has powered off all devices to reduce power usage to a minimum and only the platform context is maintained. S5 is a sleeping state in which it is assumed that the hardware is in a soft off state, where no context is maintained and a complete boot is required when the system wakes.
|S0||ON state||The system is completely operational, is fully powered, and completely retains the context (such as the volatile registers, memory caches, and RAM).|
|S1||Sleep state||The system consumes less power in this state than in the S0 state. All hardware and processor contexts are maintained.|
|S2||Sleep state||The system consumes less power in this state than in the S1 state. The processor loses power, and the processor context and contents of the cache are lost.|
|S3||Sleep state||The system consumes less power in this state than in the S2 state. The processor and hardware contexts, cache contents, and chipset context are lost. The system memory is retained.|
|S4||Hibernate state||The system consumes the least power in this state compared to all other sleep states. The system is almost at an OFF state. The context data is written to hard disk, and there is no context retained. The system can restart from the context data stored on the disk.|
|S5||OFF state||The system is in a shutdown state, and the system retains no context. The system requires a full reboot to start.|
Motherboard chipsets support specific power states. For example, a motherboard might support S0, S1, S4, and S5 states, but it might not support the S2 or S3 states. In Windows operating systems, the sleep power transition refers to switching off the system to a Sleep or Hibernate mode, and the wake power transition refers to switching on the system from a Sleep or Hibernate mode. The Sleep and Hibernate modes allow users to switch off and switch on systems much faster than the regular shutdown and startup processes.
Thus, a computer is waking up when the computer is transitioning from the OFF state (S5) or any sleep state (S1–S4) to the ON state (S0), and the computer is going to sleep when the computer is transitioning from ON state (S0) to OFF state (S5) or sleep state (S1–S4). A computer cannot enter one sleep state directly from another because it must enter the ON state before entering any other sleep state. Sleep and hibernate are disabled in Windows Server.
Resolving hardware and firmware startup problems
On most computers, you can enter BIOS, EFI, or UEFI during boot by pressing F2 or another function key. When you are in firmware, you can go to the Power screen or a similar screen to manage ACPI and related settings.
Power settings you might see include the following:
- Restore AC Power Loss or AC Recovery Determines the mode of operation if a power loss occurs and for which you’ll see settings such as Stay Off/Off, Last State/Last, Power On/On. Stay Off means the system remains off after power is restored. Last State restores the system to the state it was in before power failed. Power On means the system will turn on after power is restored.
- Wake On LAN From S4/S5 or Auto Power On Determines the action taken when the system power is off and a PCI Power Management wake event occurs. You’ll see settings such as Stay Off or Power On.
- ACPI Suspend State or Suspend Mode Sets the suspend mode. Typically, you’ll be able to set S1 state or S3 state as the suspend mode.
I provide two standard labels for each setting because your computer hardware might not have these exact labels. The firmware variant you are working with determines the actual labels that are associated with boot, power, and other settings.
Because Intel and AMD also have other technologies to help reduce startup and resume times, you might also see the following power settings:
- Enhanced Intel SpeedStep Technology (EIST), which can be either Disabled or Enabled
- Intel Quick Resume Technology, which can be either Disabled or Enabled
Enhanced Intel SpeedStep Technology (EIST or SpeedStep) allows the system to dynamically adjust processor voltage and core frequency, which can result in decreased average power consumption and decreased average heat production. When EIST or a similar technology is enabled and in use, you’ll see two different processor speeds on the System page in Control Panel. The first speed listed is the specified speed of the processor. The second speed is the current operating speed, which should be less than the first speed. If Enhanced Intel Speed-Step Technology is off, both processor speeds will be equal. Advanced Settings for Power Options under Processor Power Management can also affect how this technology works. Generally speaking, although you might want to use this technology with a Windows desktop operating system, you won’t want to use this technology with a Windows Server operating system.
Intel Quick Resume Technology Driver (QRTD) allows an Intel Viiv technology–based computer to behave like a consumer electronic device with instant on/off after an initial boot. Intel QRTD manages this behavior through the Quick Resume mode function of the Intel Viiv chipset. Pressing the power button on the computer or a remote control is what puts the computer in the Quick Sleep state, and the computer can Quick Resume from sleep by moving the mouse, pressing an on/off key on the keyboard (if available), or pressing the sleep button on the remote control. Quick Sleep mode is different from standard sleep mode. In Quick Sleep mode, the computer’s video card stops sending data to the display, the sound is muted, and the monitor LED indicates a lowered power state on the monitor, but the power continues to be supplied to vital components on the system, such as the processor, fans, and so on. Because this technology was originally designed for Windows XP Media Center Edition, it does not work in many cases with later Windows desktop operating systems and generally should not be used with Windows Server operating systems. You might need to disable this feature in firmware to allow a Windows desktop operating system to properly sleep and resume.
After you look at the computer’s power settings in firmware, you should also review the computer’s boot settings in firmware. Typically, you have a list of bootable devices and can select which one to boot. You also might be able to configure the following boot settings:
- Boot Drive Order Determines the boot order for fixed disks
- Boot To Hard Disk Drive Determines whether the computer can boot to fixed disks, and can be set to Disabled or Enabled
- Boot To Removable Devices Determines whether the computer can boot to removable media, and can be set to Disabled or Enabled
- Boot To Network Determines whether the computer can perform a network boot, and can be set to Disabled or Enabled
- USB Boot Determines whether the computer can boot to USB flash devices, and can be set to Disabled or Enabled
As with power settings, your computer might not have these exact labels, but the labels should be similar. You need to optimize these settings for the way you plan to use the computer. In most cases, with server hardware, you’ll only want to enable Boot To Hard Disk Drive. The exception is for when you use BitLocker Drive Encryption. With BitLocker, you’ll want to enable Boot To Removable Devices, USB Boot, or both to ensure that the computer can detect the USB flash drive with the encryption key during the boot process.