This feature extends the battery life of Chrome OS device during prolonged non-use by proactively hibernating or shutting down the device after a configurable time.
Chrome OS devices usually support at least 14 days of standby. Users that return to the device tend to do so in the first 3 days. Thus instead of sitting in standby until the battery is completely discharged, this feature suspends to disk (hibernates) or shuts down the device proactively after spending configured time in standby. This helps in reducing battery degradation due to deep discharge. This can also reduce the frequency of trickle charges during boot.
This flowchart depicts the state machine for shutdown-from-suspend.
powerd before every suspend will schedule an alarm (that can wake the system from standby) if one is not already running for
lower_power_from_suspend_sec pref. On every resume, powerd identifies if the wake is triggered by the user. If so, powerd stops the alarm and resets the state machine. If not, powerd checks if the timer set above has expired. If the timer has expired, powerd will hibernate the device if supported and not disabled via
disable_hibernate, or shut down the device if line power is not connected.
disable_hibernatein your boxster config, if hibernate is supported on your device.
lower_power_from_suspend_secpref for the device.
It's helpful to set a very low value for
lower_power_from_suspend_sec, like 30 seconds. Use
powerd_dbus_suspend --disable_dark_resume=false to suspend the machine manually. Then examine
/var/log/power_manager/powerd.LATEST to see what happened on resume.
# echo 0 > /var/lib/power_manager/disable_hibernate
# echo x > /var/lib/power_manager/lower_power_from_suspend_sec # restart powerd
Perform the following steps to disable hibernate globally, forcing powerd to use shutdown from suspend only:
# echo 1 > /var/lib/power_manager/disable_hibernate # restart powerd
Perform the following steps to disable hibernate or shutdown from suspend:
# echo 0 > /var/lib/power_manager/lower_power_from_suspend_sec # restart powerd