About

Although insisting on power efficiency and low power consumption, Windows power management seems to benefit from quite a lacking and sometimes outright broken implementation. More than often, in many reported cases, either the power management driver has not been properly implemented by the hardware manufacturer or Windows does not offer a reasonable way to implement power management. In the latter cases, we find hacks and modifications where people tend to disable essential features such as wake-up timers or hibernation that should rather be exploited as a feature by Microsoft rather being a source of errors and conflicts.

The software presented on this page named Zzz has been developed to counter a situation with Hewlett Packard (HP) servers that have been officially found to not support power management. The most popular argument given is that servers are not supposed to hibernate or to power off however that does not cover all usage cases.

Screenshots

Download

Source Code

You can check out the source using the Subversion URL:

Installing and Using

The zip file can be downloaded and the contents extracted to their final position. Upon launching the executable Zzz.exe, the program will hide inside the notification tray and remain resident. The user can right click the icon in the notification tray in order to configure Zzz.

Zzz is meant to start with Windows and stay resident in the notification tray and to perform various power-management actions when the computer is determined by Zzz to be idle. Contrasted with the Windows power management options, Zzz additionally allows to perform actions such as shutting down the computer entirely after a configurable idle time period by selecting the Shutdown option from the Actions menu.

Triggering with MQTT and Node-Red Alexa

By following the menu SettingsMQTT, an MQTT server can be configured such that Zzz will subscribe to a topic and wait for messages. Upon connecting to the MQTT broker on the specified topic, Zzz will listen on the following sub-topics:

  • CONFIGURED_MQTT_TOPIC/Action
  • CONFIGURED_MQTT_TOPIC/State

where CONFIGURED_MQTT_TOPIC is the topic that was configured by the user. The messages sent on the MQTT sub-topics are JSON formatted.

Action

The CONFIGURED_MQTT_TOPIC/Action sub-topic is meant to trigger various actions for Zzz. The following parameters are available:

Parameter Possible Value Description
Action Hibernate Hibernate the operating system.
Standby Set the OS into standby mode.
Shutdown Shut down the operating system.
Dim Dim the screen(s).
Lock Lock the screen.

For instance, after Zzz is configured to subscribe to the MQTT topic, the following payload delivered to the MQTT topic CONFIGURED_MQTT_TOPIC/Action:

{ "Action": "Dim" }

will dim all the screens attached to the computer.

State

The CONFIGURED_MQTT_TOPIC/State sub-topic is meant to to report and accept commands that pertain to the state of Zzz. The following commands are available:

Parameter Possible Value Description
State Enabled Enable Zzz with the current settings.
Disabled Disable Zzz.

For instance, if the following message is sent on the CONFIGURED_MQTT_TOPIC/State sub-topic:

{ "State": "Enabled" }

then Zzz will enable itself. Conversely, the following message sent on the CONFIGURED_MQTT_TOPIC/State sub-topic:

{ "State": "Disabled" }

will disable Zzz.

Automation

Automation can be performed via Node-Red and perhaps even Alexa, such that a voice command will be able to trigger the various actions.

The following Node-Red flow when triggered via Alexa's voice command "Alexa, turn computer screen off":

  • instantiates a new Alexa device called "Computer Screen",
  • listens only to "off" messages,
  • builds the JSON payload as { "Action": "Dim" },
  • sends the payload to the MQTT server where it will be picked up by Zzz.

and Zzz then turns the computer screens off.

HP ProLiant

HP ProLiant servers suffer from a lack of support from Windows, experiences include running the powercfg command resulting in an output such as:

The following sleep states are available on this system: Hibernate
The following sleep states are not available on this system:
Standby (S1)
        The system firmware does not support this standby state.
Standby (S2)
        The system firmware does not support this standby state.
Standby (S3)
        The system firmware does not support this standby state.
Hybrid Sleep

that would imply that the system does not support hibernation, standby nor hybrid sleep.

Even if the Microsoft hotfix released by KB2698957 (provided here for convenience), which pertains to resolving power management issues on HP ProLiant servers, is applied, the output of powercfg will be the same but it will enable the hibernation option.

Contrary to what the operating system reports, hibernation can be enabled manually by issuing the command:

powercfg /h on

in a command prompt - which executes successfully and reports that hibernation has been enabled regardless of the powercfg report.

The effect of enabling hibernation manually is that a new Hibernate option will be added to the Windows shutdown menu but the power management settings accessed via the Windows Control Panel will be unable to automatically trigger hibernation on a timer even if it is configured.

Zzz implements a custom timer that will trigger hibernation regardless of the system power management features and will allow HP ProLiant servers to hibernate after they have been idle for a configurable amount of time.

License

Zzz was released on the 18th of December 2018 and is licensed under the MIT license.

Credits for the icons goes to flaticons.com.


windows/zzz.txt · Last modified: 2022/04/19 08:28 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.