tree: 51cacb69015d5bb425ef4c5a28356af3c3884e55 [path history] [tgz]
  1. common/
  2. dbus/
  3. dbus_bindings/
  4. default_prefs/
  5. docs/
  6. init/
  7. optional_prefs/
  8. powerd/
  9. tools/
  10. udev/
  11. .gitignore
  12. .presubmitignore
  13. .project_alias
  14. libpower_manager-client-test.pc.in
  15. libpower_manager-client.pc.in
  16. OWNERS
  17. power_manager-client.gyp
  18. power_manager.gyp
  19. README.md
power_manager/README.md

Chrome OS Power Management

The Chrome OS 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_dbus_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.

Documentation

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

  • 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 handle's input events.
  • Keyboard Backlight describes powerd's logic for controlling the keyboard backlight.
  • Logging describes where and how powerd logs informative messages.
  • Screen Brightness describes powerd's logic for controlling the display backlight.
  • Suspend and Resume describes powerd's process for suspending and resuming the system.

Code Overview

This repository contains the following subdirectories:

SubdirectoryDescription
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