PowerManagementConfiguration

Revision 16 as of 2005-10-31 22:02:37

Clear message

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

Decisions

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

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

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.

UBZ discussion

  • 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/

  • 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
  • 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.

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.