Skip to content
Yuri Momotyuk edited this page Nov 5, 2015 · 4 revisions

Power management for PC-BSD

Basic info

Power management solution for Pc-BSd consist of 3 main parts:

  • pwrd daemon (daemon that controls all power related things)
  • pwrcli (command line interface to daemon)
  • pc-power (UI for pwrd. Should be able to show current status, change daemon settings, etc)

All power control is profile based. User is able to set profiles for those states:

  1. Device is on external power

  2. Device is on battery power

  3. Device is on battery power and battery has low power.

Main planned features:

  • Display battery info (hardware info like supplyer, capacity, etc and current state including predicted lifetime and system power consumption). Multiple batteries should be supported.
  • Control LCD backlight level (including optionally using intel_backlight port) Multiple backlights should be supported.
  • Set actions on system ACPI buttons. User will be able to set some action ("power off", "sleep" or "hibernate") for power button, sleep button or notebook lid close
  • Dynamic CPU frequency and sleep states changing (based on powerd code). Currently powerd has no external interface to change parameters dynamically, so (it is terrible!) I need to implement powerd functionality :(
  • Collect and display power statistics (display battery rate and power consumption in time)
  • Ability to power off some USB devices (like webcam, internal bluetooth adaptor and so on)
  • Ability to power off WiFi adaptor

Milestones and current state

Alpha0

First alpha release and first merge to main pc-bsd repo. Features:

  • Displaying battery status
  • LCD backlight level control
  • Desktop notifications

Detailed:

pwrd:

  • Changing LCD backlight (done at 90%, need some last testing)
  • Collecting hardware related info (done at 90%, need some last testing)
  • Collecting status info (battery status, LCD backlight current level) (done at 90, need some last testing)
  • Notification subsystem (not started)
  • Profile manipulation (not started)

pwrcli:

  • displaying hardware related info, displaying current status (done)
  • changing LCD backlight level include relative (done)

pc-power:

  • displaying current battery and power status (not started)
  • displaying battery hardware info (not started)
  • manipulating LCD brightness (not started)
  • displaying notifications (not started)

Alpha1

Planned features:

  • powerd replacement
  • collect cpu related information (cpu load, frequance, temperature and so on)

Alpha3

Planned features:

  • power statistic graphs

Final

Planned features:

  • disabling / enabling devices (USB devices and WiFi adapters)