PowerManagementConfiguration

Differences between revisions 14 and 15
Revision 14 as of 2005-05-09 20:56:16
Size: 2319
Editor: ca-studio-bsr1o-251
Comment: high priority
Revision 15 as of 2005-10-31 21:35:38
Size: 6452
Editor: 187_220_103_66-WIFI_HOTSPOTS
Comment: first UBZ BoF discussion, rather messy
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
= Power Management Configuration =
Line 4: Line 3:
== Status ==  * '''Launchpad entry:''' https://launchpad.net/distros/ubuntu/+spec/power-management-configuration
 * '''Created:''' [[Date(2005-04-23T01:36:42Z)]] by MattZimmerman[[BR]]
 * '''Contributors:''' MatthewGarret, OliverGrawert, MatthewPaulThomas, ThomMay
 * '''Packages:'''
  * `acpid` - all scripts removed, merely echoes out to HAL.
  * `acpi-support` - scripts move under the aegis of gnome-power
  * `gnome-power` (needs to be included)
  * `gnome-power-preferences` (needs tweaking)
  * `gnome-screensaver` (needs to warn when screensaver delay > any power management)
modularized so they work cross platform rather than being x86 specific.
  * `pbbuttonsd` (should be replaced with pmud for minimal functionality)
  * `pmud` - merely echoes out to HAL
Line 6: Line 16:
  * Created: [[Date(2005-04-23T01:36:42Z)]] by MattZimmerman[[BR]]
  * Priority: HighPriority[[BR]]
  * People: MatthewGarrettLead, OliverGrawertSecond[[BR]]
  * Contributors: MatthewPaulThomas[[BR]]
  * Interested: ThomMay [[BR]]
  * Status: BreezyGoal, UduBof, DistroSpecification, ApprovedSpecification[[BR]]
  * Packages: [[BR]]
  * Depends: [[BR]]
== Summary ==
Line 15: Line 18:
== Introduction == ...
Line 17: Line 20:
A user interface is needed for configuring power management preferences. == Scope and rationale ==
Line 19: Line 22:
== Rationale == There should be simple, reliable, and understandable methods of:
 * shutting down the computer
 * putting the computer into a low-power-use state
 * going into a low-power-use state after some period of inactivity
 * blanking the screen, instead of using a power-sapping screensaver, when running on battery power
 * preventing data loss when the battery runs out.
Line 21: Line 29:
Currently, the user must edit a file in `/etc` to enable suspend to RAM, and to select which services will be restarted. Also, it's currently impossible to configure how the system should behave in various situations, such as on lid close.
All of these points should be configurable via a graphical UI to enhance usability.
Currently people need to edit text files in `/etc` to enable suspend to RAM, and to select which services will be restarted. Also, it's currently impossible to configure how the system should behave in various situations, such as on lid close. All of these points should be configurable graphically.
Line 24: Line 31:
== Scope and Use Cases == == Use cases ==
Line 26: Line 33:
 * Enable suspend to RAM
 * Configure system behavior when lid closes
 * Configure system behavior for low and critical battery
Line 30: Line 34:
== Implementation Plan ==

== Design ==

 * Put "When using battery:" and "When using AC power:" into a table
 - "Screensaver and Power Settings"?
  - on battery you may want no screensaver, just blanking
  - you should be notified if screen blanking time < screensaver time

When the lid is closed:
 * put the computer to sleep
 * turn off the screen (keep playing music etc)

Polish up the interface
 * Currently three tabs
 * Panel icon is overly complicated (should just show AC/battery and charge level)
 * Left-clicking on panel icon does nothing (make it a menu)

 


 related links:
 https://wiki.ubuntu.com/PowerManagementConfiguration
 http://gnome-power.sf.net/

== Decisions ==

 * Power button -> pop up the logout dialog (kde, xfce, etc have logout dialog?)
  - "Are you sure you want to shut down?"
   - ( Sleep ) ( Restart ) ( Log Out ) ( Switch User ) ( Too ) ( Many ) ( Buttons ) ( Cancel ) (( Shut Down ))
     - enter -> shutdown
     - s -> sleep
     - r -> reboot
     - l -> logout
     - w(?) -> switch user
     - esc -> cancel
     (localizeable...)
     - possible to disable by local admin! (think of pools of computers)
  - Default to shutdown? -> improve logout dialog

 * Improve the logout dialog
  - allow keyboard shortcuts
  - pop it up instantly instead of graying out the screen
  - add "Switch User" to the logout dialog

== Design ==

 * "System" > "Preferences" > "Power Management" should open the "Power Management" window.
  attachment:battery-vs-mains.jpg
  attachment

 * If "Show power status in the panel" is checked, a power management menu should be available in the panel. The menu's title should be an icon representing the current power status:

 *

=== How to get there from here ===

 * Asking what the suspend button does is silly (suspend!) (or hibernate, if that doesn't work)

 * Create common infrastructure for event scripts (used by acpi, apm, pbbuttons).
 * Remove "When suspend button is pressed:" options (suspend!)
 * Remove "When battery power critical:" options?
   - or restrict choices -- "do nothing" probably isn't valid here
     (Corner case of unreliable power detection: pop up a "do you really want
     to do that" warning when the user chooses this option?)
   - OS X always warns at 15 minutes, and always sleeps at 0 minutes, no prefs

 * The logout dialog seems to have code that detects whether your hardware can hibernate or not. This should similarly be reflected in the options available in the power management prefs.


 * Fix "You have not got DPMS support enabled in gnome-screensaver. You cannot cannot [sic] change the screen shutdown time using this program." alert
  - how does one enable it? (other than to install gnome-screensaver instead of xscreensaver ;-)

* Why does "Power Preferences" do almost nothing on some machines?? Suspect it's when gnome-power-manager isn't running. because you need to run that command "gnome-power-manager", it seems to start some daemon.. so that should be started automatically when you open the panel. It's started via gnome-session, but that doesn't help when you just installed it.


== Implementation ==

 * Get everything using the same set of scripts (`/etc/power/event.d/` vs. `/etc/apm/scripts.d/`).
Line 42: Line 124:
=== Packages Affected === == Goals ==
Line 44: Line 126:
 * `gnome-power` (needs to be included)
 * `acpi-support` - scripts move under the aegis of gnome-power , modularized so they work cross platform rather than being x86 specific.
 * `pbbuttonsd` (should be replaced with pmud for minimal functionality)
 * `acpid` - all scripts removed, merely echoes out to HAL.
 * `pmud` - merely echoes out to HAL
 
=== User Interface Requirements ===
 
gnome-power-preferences - latest CVS looks good for UI purposes (this has changed since the BOF on Monday).
1. Make it work the same everywhere.
2. Logout dialog (see above).
3. Allow user to change the options that we think they should be able to change, without editing text files.
4. Don't run CPU intensive screen saver (blank screen) when running on battery power.
Line 54: Line 131:
== Outstanding Issues == === Screensaver related problems ===

Turn off screensaver while on battery (use xscreensaver command line):
  -activate Turn on the screensaver (blank the screen), as if the user
                had been idle for long enough.

  -deactivate Turns off the screensaver (un-blank the screen), as if user
                activity had been detected.


== Unresolved issues ==

 * What if nobody is running Gnome (e.g. nobody is logged in yet / Kubuntu)? We need some system that depends only on hal/glib. If this system is configurable, how will such configuration be presented? Probably this is too difficult to be done for Dapper.

modularized so they work cross platform rather than being x86 specific.

  • pbbuttonsd (should be replaced with pmud for minimal functionality)

  • pmud - merely echoes out to HAL

Summary

...

Scope and rationale

There should be simple, reliable, and understandable methods of:

  • shutting down the computer
  • putting the computer into a low-power-use state
  • going into a low-power-use state after some period of inactivity
  • blanking the screen, instead of using a power-sapping screensaver, when running on battery power
  • preventing data loss when the battery runs out.

Currently people need to edit text files in /etc to enable suspend to RAM, and to select which services will be restarted. Also, it's currently impossible to configure how the system should behave in various situations, such as on lid close. All of these points should be configurable graphically.

Use cases

Design

  • Put "When using battery:" and "When using AC power:" into a table - "Screensaver and Power Settings"?
    • - on battery you may want no screensaver, just blanking

      - you should be notified if screen blanking time < screensaver time

When the lid is closed:

  • put the computer to sleep
  • turn off the screen (keep playing music etc)

Polish up the interface

Decisions

  • Power button -> pop up the logout dialog (kde, xfce, etc have logout dialog?)

    • - "Are you sure you want to shut down?"
      • - ( Sleep ) ( Restart ) ( Log Out ) ( Switch User ) ( Too ) ( Many ) ( Buttons ) ( Cancel ) (( Shut Down ))
        • - enter -> shutdown - s -> sleep - r -> reboot - l -> logout - w(?) -> switch user - esc -> cancel (localizeable...) - possible to disable by local admin! (think of pools of computers)

      - Default to shutdown? -> improve logout dialog

  • Improve the logout dialog
    • - allow keyboard shortcuts - pop it up instantly instead of graying out the screen - add "Switch User" to the logout dialog

Design

  • "System" > "Preferences" > "Power Management" should open the "Power Management" window.

    • attachment:battery-vs-mains.jpg attachment
  • If "Show power status in the panel" is checked, a power management menu should be available in the panel. The menu's title should be an icon representing the current power status:

How to get there from here

  • Asking what the suspend button does is silly (suspend!) (or hibernate, if that doesn't work)
  • Create common infrastructure for event scripts (used by acpi, apm, pbbuttons).
  • Remove "When suspend button is pressed:" options (suspend!)
  • Remove "When battery power critical:" options?
    • - or restrict choices -- "do nothing" probably isn't valid here
      • (Corner case of unreliable power detection: pop up a "do you really want to do that" warning when the user chooses this option?)
      - OS X always warns at 15 minutes, and always sleeps at 0 minutes, no prefs
  • The logout dialog seems to have code that detects whether your hardware can hibernate or not. This should similarly be reflected in the options available in the power management prefs.
  • Fix "You have not got DPMS support enabled in gnome-screensaver. You cannot cannot [sic] change the screen shutdown time using this program." alert
    • - how does one enable it? (other than to install gnome-screensaver instead of xscreensaver Wink ;-)

* Why does "Power Preferences" do almost nothing on some machines?? Suspect it's when gnome-power-manager isn't running. because you need to run that command "gnome-power-manager", it seems to start some daemon.. so that should be started automatically when you open the panel. It's started via gnome-session, but that doesn't help when you just installed it.

Implementation

  • Get everything using the same set of scripts (/etc/power/event.d/ vs. /etc/apm/scripts.d/).

  • [http://gnome-power.sf.net GnomePower]

    • Needs to be integrated with current collection of acpi-support scripts for functionality.
    • UI needs to be cleaned up for use by basic users and only expose the required functionality
  • Integrate battery applet into HAL/Gnome-Power
  • Extend hwdb to ask about suspend functionality

Use data from hwdb to create a blacklist in breezy+1 of cards/models that don't work properly with vbetool. BR Investigate alternative solutions for vbetool in situations where it can't work.BR Notify users of proprietary drivers that suspend/hibernate will not work for them.BR

Goals

1. Make it work the same everywhere. 2. Logout dialog (see above). 3. Allow user to change the options that we think they should be able to change, without editing text files. 4. Don't run CPU intensive screen saver (blank screen) when running on battery power.

Turn off screensaver while on battery (use xscreensaver command line):

  • -activate Turn on the screensaver (blank the screen), as if the user
    • had been idle for long enough.
    -deactivate Turns off the screensaver (un-blank the screen), as if user
    • activity had been detected.

Unresolved issues

  • What if nobody is running Gnome (e.g. nobody is logged in yet / Kubuntu)? We need some system that depends only on hal/glib. If this system is configurable, how will such configuration be presented? Probably this is too difficult to be done for Dapper.

PowerManagementConfiguration (last edited 2008-08-06 16:31:02 by localhost)