tree: aed32ee037e0e84c9c4f016422a45c2c1a1ef695 [path history] [tgz]
  1. client/
  2. common/
  3. dbus/
  4. dbus_bindings/
  5. default_prefs/
  6. docs/
  7. init/
  8. minijail/
  9. optional_prefs/
  10. powerd/
  11. tmpfiles.d/
  12. tools/
  13. udev/
  14. .presubmitignore
  15. .project_alias
  17. OWNERS

ChromeOS Power Management

The ChromeOS power manager consists of several components:

  • powerd: C++ system daemon running as the power user that initiates dimming the screen, suspending the system, etc.
  • powerd_setuid_helper: setuid root binary used by powerd to perform actions requiring additional privileges.
  • powerd_suspend: shell script executed by powerd (by way of powerd_setuid_helper) to suspend and resume the system.
  • send_metrics_on_resume: shell script executed by powerd_suspend and by the send-boot-metrics Upstart job to report suspend-related metrics.


The docs/ subdirectory contains additional documentation. Along with answers to frequently-asked questions, the following information is available:

  • Adaptive Charging describes how charging is delayed for maintaining battery health.
  • ALS Backlight describes ALS prefs for backlight in powerd.
  • Battery Notifications describes when low-battery notifications are shown by the UI.
  • Inactivity Delays describes powerd's logic for taking action (e.g. dimming the backlight or suspending) when the user is inactive.
  • Input describes how powerd handles input events.
  • Keyboard Backlight describes powerd's logic for controlling the keyboard backlight.
  • Logging describes where and how powerd logs informative messages.
  • Power Buttons describes how power buttons work.
  • Power Supplies describes powerd's logic for determining the state of power supplies (e.g. batteries or line power).
  • Screen Brightness describes powerd's logic for controlling the display backlight.
  • Shutdown and Reboot describes why and how ChromeOS systems shut down and reboot.
  • Suspend and Resume describes powerd's process for suspending and resuming the system.
  • Thermal describes how powerd monitors system thermal state to provide thermal hinting to Chrome.
  • udev Usage describes how powerd uses the udev system to learn about hardware changes.

Code Overview

This repository contains the following subdirectories:

commonCode shared between powerd and tools
dbusD-Bus policy configuration files
default_prefsDefault pref files installed to /usr/share/power_manager
docsDetailed documentation in Markdown format
init/sharedScripts shared between Upstart and systemd
init/systemdsystemd-specific config files
init/upstartUpstart-specific config files installed to /etc/init
optional_prefsPref files conditionally installed based on USE flags
powerdPower manager daemon
powerd/policyHigh-level parts of powerd that make policy decisions
powerd/systemLow-level parts of powerd that communicate with the kernel
toolsUtility programs; may depend on powerd code
udevudev configuration files and scripts