What is power management in windows

Power Management

Другие идентичные по назначению опции: Power Management Option.

Среди опций BIOS, относящихся к категории функций управления энергосберегающими возможностями компьютера, иногда можно встретить опцию Power Management (Управление питанием компьютера). Обычно в этой опции можно использовать значения Max Saving (Максимальная экономия), Min Saving (Минимальная экономия), User Define (Определяемый пользователем режим), а также Enabled (Включено) и Disabled (Выключено).

Принцип работы

Хорошо известно, что персональный компьютер – это сложное устройство, потребляющее много электроэнергии. Однако далеко не всегда от компьютера требуется работа на полную мощность, и поэтому очень часто энергия, потребляемая компонентами компьютера, может расходоваться впустую. Разумеется, этот фактор имеет большое значение для пользователя, особенно если он владеет мобильным компьютером.

Эта проблема давно беспокоила разработчиков чипсетов и процессоров, и они приложили немало усилий для того, чтобы ее решить и оптимизировать потребление энергии различными компонентами ПК. Одной из технологий, созданных для этой цели, является технология APM (Advanced Power Management, Расширенное управление электропитанием), разработанная еще в начале 1990-х гг компаниями Intel и Microsoft. Стандарт APM подразумевал возможность работы компьютера в нескольких режимах сохранения энергии, и стал настолько удачным, что просуществовал до середины 2000-х гг, когда на смену ему пришел более совершенный стандарт ACPI. Однако до сих пор существует множество компьютеров, поддерживающих стандарт APM.

Стандарт APM поддерживает 4 основных энергетических состояния персонального компьютера. Первое состояние – режим нормальной работы, когда компьютер полностью включен и все его компоненты работают на полную мощность. Такой режим устанавливается, когда компьютер активно используется человеком или фоновыми программами.

Второй режим также применяется во время активного функционирования задач операционной системы, однако при этом часть компонентов работает на пониженных частотах или в энергосберегающем режиме.

Третье состояние носит название Standby. При его выборе большинство устройств переводится в энергосберегающий режим, а процессор может быть даже выключен. Этот режим используется в том случае, если пользователь не производит активных действий с компьютером. Пользователь может легко вывести компьютер из состояния Standby – ему достаточно осуществить движение мышью или нажать клавишу на клавиатуре.

Режим Suspend подразумевает более глубокое погружение компьютера в сон – в этом случае большинство компонентов ПК выключено. Состояние операционной системы сохраняется в памяти, как и в режиме Standby, однако для вывода системы из режима Suspend требуется большее время, чем для вывода из Standby.

И наконец, существует состояние, когда весь компьютер со всеми своими компонентами выключен, и привести его в рабочее состояние можно только нажатием кнопки питания на системном блоке.

Для управления энергосберегающими состояниями APM при помощи средств BIOS и предназначена опция Power Management. Разберем подробнее доступные пользователю варианты значений опции.

Вариант Max Saving включает режим сохранения энергии, который подразумевает переход компьютера в энергосберегающий режим уже через минуту отсутствия пользовательской активности. Само собой разумеется, что в данном случае экономия электроэнергии является максимальной, однако такой быстрый переход в режим энергосбережения не всегда бывает удобным.

Min Saving подразумевает переход в энергосберегающее состояние спустя гораздо больший промежуток времени, обычно через 10 минут. Этот вариант более удобен для пользователя, хотя при нем расходуется большее количество энергии.

Существует также опция User Defined, предлагающая пользователю больше возможностей для настройки энергосберегающих режимов и, в частности, ручную установку временных интервалов.

Вариант опции Disabled выключает управление состояниями APM со стороны BIOS. Однако это не означает, что пользователь в этом случае лишится возможности управлять энергосберегающими режимами компьютера. Если на компьютере установлена операционная система, поддерживающая технологию ACPI (для линейки Windows это все ОС, начиная с Windows 2000), то в этом случае пользователь может регулировать режимы энергосбережения при помощи богатых возможностей интерфейса ACPI.

Читайте также:  Как изменить домен windows server 2012

В опции Power Management может встретиться также вариант Enabled. Этот вариант включает общую поддержку технологии APM через BIOS. Однако детальную настройку режимов в этом случае можно производить только средствами ОС (в том числе и ОС, не поддерживающих ACPI, таких, как Windows 98 и более ранние).

Какое значение выбрать?

Поскольку поддержка технологии APM актуальна лишь для старых операционных систем, не поддерживающих технологию ACPI, то в большинстве случаев опцию Power Management можно выключить, установив значение Disabled.

Однако если вы используете старые операционные системы, такие, как MS-DOS или ранние версии Windows, то управление энергосберегающими состояниями средствами BIOS во многих случаях будет очень полезным. Конкретный энергосберегающий режим при этом можно выбрать, исходя ваших потребностей и приоритетов – либо максимальная работоспособность компьютера при минимуме энергосберегающих функций, либо максимальное сохранение электроэнергии и умеренная производительность компьютера.

Device power management

The ACPI 6.3 specification defines a set of namespace objects to specify device power information for a device. For example, one set of objects can specify the power resources that a device requires in each supported device power state. Another object type can describe the ability of the device to wake from a low-power state in response to hardware events.

Device power management in Windows

While a system is running (that is, the system is in the ACPI-defined working state, S0), individual devices can make transitions between device power states, depending on activity, to save power. In traditional PC systems, ACPI-defined sleeping states (S1 through S4) are also used to save power, but these disconnected, high-latency sleep states are not used on Windows SoC platforms. Therefore, battery life is highly dependent on how platforms implement run-time device power management.

Devices that are integrated into the SoC can be power-managed through the Windows Power Framework (PoFx). These framework-integrated devices are power-managed by PoFx through a SoC-specific power engine plug-in (microPEP) that knows the specifics of the SoC’s power and clock controls. For more information about PoFx, see Overview of the Power Management Framework.

For peripheral devices that are not integrated into the SoC, Windows uses ACPI Device Power Management. For these ACPI-managed devices, the power policy owner in a device driver stack (typically the function or class driver) makes device power state transition decisions, and the Windows ACPI driver, Acpi.sys, invokes ASL control methods to apply the required platform-specific power controls.

It is possible to, and some device stacks do, use ACPI Device Power Management — alone, or in combination with the microPEP — for on-SoC device power management.

As described in Device power management in ACPI, Windows supports the D3cold power management capabilities that are defined in the ACPI 5.0 specification. By using this support, devices, platforms and drivers can opt-in to having device power completely removed during run-time idle periods. This capability can significantly improve battery life. However, removing power must be supported by all affected components in order to be able to return to D0 successfully. For this reason, drivers (bus and function), as well as the platform itself, must indicate that they support it. For more information about D3cold driver opt-in, see Supporting D3cold in a Driver.

Device power management in ACPI

Namespace devices support up to four device power states, numbered D0 (full-function, or «on») to D3 (no function, or «off»). Each state can have different power requirements, with higher-numbered states consuming less power than lower-numbered states. In addition, the D3 (off) state has two sub-states, D3hot and D3cold. The D3hot sub-state requires the device to remain accessible on its parent bus so that it can respond to bus-specific software commands. This requirement, and the power used to meet it, are removed in D3cold. Finally, a device can be armed to wake itself from a low-power state due to a hardware event, and, if necessary, to also bring the platform out of an idle state.

Читайте также:  Wacom desktop center не видит планшет mac os

The platform indicates its support for D3cold by granting the OS control of the «_PR3 Support» feature (bit 2) when requested by using the platform-wide OSPM Capabilities Method. For more information, see section 6.2.10.2, «Platform-wide OSPM Capabilities», in the ACPI 5.0 specification.

Power-managed devices use child objects to describe their power capabilities to the operating system. The following sections describe these capabilities and objects.

Power resources and states

A device declares its support for a power state by listing the set of power resources it requires in order to be in that state. ACPI Power Resources represent the voltage rails that power devices and the clock signals that drive them. These resources are declared at the root of the namespace. Each power resource has an _ON and an _OFF method through which it is controlled, and an _STA method to report its state. For more information, see section 7.1, «Declaring a Power Resource Object», of the ACPI 5.0 specification.

The Windows ACPI driver, Acpi.sys, monitors the power dependencies among devices that share resources, and, as these devices transition between power states, ensures that only the power resources that are actually needed by a device are turned on at any particular time.

Power Resource Requirements (_PRx)

There is a Power Resource Requirements (_PRx) object, where x = 0, 1, 2, or 3, for each supported device power state. When the device driver decides to transition to a new power state, Acpi.sys ensures that any power resources required for the new state are turned on, and that any resources no longer in use are turned off.

Device state supported Resource requirements object to use Resources to include in requirements object
D0 (required) _PR0 All power and clocks required for full function of the device.
D1 _PR1 Any power or clocks required for the class-defined reduced-functionality of this state.
D2 _PR2 Any power or clocks required for the class-defined reduced-functionality of this state.
D3hot (required) _PR3 Only the power or clocks required for the device to appear on its bus and respond to a bus-specific command.

If a particular platform supports the D3cold feature, and the device driver for a device opts-in to D3cold, the device’s _PR3 power resources will, if they are not being used by any other device, be turned off sometime after the transition to D3Cold.

For more information about the power resource requirements for a device that supports D3cold, see Firmware Requirements for D3cold.

Device Power State (_PSx)

There is a Power State method, _PSx, where x = 0, 1, 2, or 3, for each supported device power state Dx. This method is optional, but, if it is present, it is invoked before the power resources for the state are turned off, and after the power resources for the state are turned on. _PSx is intended to perform any platform-specific actions required around the power cycle. _PSx must not access device registers that are assigned to the function driver, access bus-standard registers that are assigned to the bus driver, or switch power resources on or off, which is an operation reserved for Acpi.sys.

Wake capabilities

Power-managed devices might be able to detect events when in a low-power state and cause the platform to wake up to handle them. To enable this feature, Windows needs information about the capabilities of both the platform and the device.

Sx Device Wake State (_SxW)

On a given platform, there is a specific mapping between device states that support the wake capability and system states that can respond to wake events. ACPI defines the _SxW object to provide this information to the operating system. There is an SxW object for each supported system power state, Sx. Because SoC platforms are always in S0, the only object of interest here is _S0W. This object specifies the platform’s ability to wake from a low-power idle state in response to a device’s wake signal. The object is used by Windows to determine the target D-state for the device during system low-power idle. For more information about _S0W, see section 7.2.20, «_S0W (S0 Device Wake State)», in the ACPI 5.0 specification.

For most SoC platforms, devices are aggressively power-managed to the D3 state when idle, and the system is capable of waking from low-power idle while the device is in this state. For such a system, the _S0W object returns 3 (or 4, if it also supports D3cold).

_S0W(4) is a requirement for D3Cold regardless of whether or not the device supports wake.

Any D-state can be designated as the lowest-powered wake-capable state, and some device classes or buses use different values. For instance, SDIO- and USB-connected devices use state D2 for this state.

To facilitate the migration of device drivers from WindowsВ 7 to WindowsВ 8 or WindowsВ 8.1, your device might be required to supply _S4W as well. Currently, the only device class that has this requirement is networking (Ndis.sys).

Wake-capable interrupts (_CRS)

The resource description for a device indicates that the device is capable of detecting and signaling a wake event by marking an interrupt as «wake-capable» (either ExclusiveAndWake or SharedAndWake). Windows and device drivers provide special handling of such interrupts to ensure that they are enabled when the device transitions to a low-power state. For more information, see the descriptions of the Interrupt and GpioInt resource descriptors in section 6.4.3.6, «Extended Interrupt Descriptor», and section 6.4.3.8.1 , «GPIO Connection Descriptors», of the ACPI 5.0 specification.

Wake enablement

Depending on user scenario or system policy, wake-capable devices may or may not actually be armed for wake. Therefore, wake-capable interrupts may or may not be enabled when the device is idle. In addition to enabling interrupts, Windows uses the following mechanisms to enable wake on a device.

Device Sleep Wake (_DSW)

ACPI defines the _DSW object as a way for the operating system to inform the ACPI platform firmware about the next sleep or low-power idle period. This object is optional, and is used only if the platform has a need to configure platform-specific wake hardware in advance. The target D-state for the device and the target S-state for the system are both provided. The D-state and S-state combination will always comply with the information provided by the device’s _SxW object(s).

Power Resources for Wake (_PRW)

In some cases, additional power resources must be turned on for a device to be enabled for wake. In this case, the device can provide the _PRW object to list those additional power resources. The Windows ACPI driver, Acpi.sys, will manage these power resources as it normally does, making sure that they are turned on when they are needed by a device (that is, a wake-enabled device), and are turned off otherwise.

_PRW is also used to define the wake capability for traditional (full-ACPI hardware) PC platforms.

Читайте также:  Убрали гаджеты windows 10
Оцените статью