Power

Differences between revisions 2 and 38 (spanning 36 versions)
Revision 2 as of 2010-02-10 14:47:09
Size: 8906
Editor: eth0
Comment: one of several system status menus
Revision 38 as of 2013-08-23 14:11:05
Size: 13185
Editor: mpt
Comment: "Auto sleep" should be "Lock when idle"/"Sleep when idle" [Iain Lane]
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from PowerMenu
## page was renamed from Ubuntu/PowerStatusMenu
= Power status menu =
## page was renamed from BatteryStatusMenu
## page was renamed from PowerStatusMenu
Line 5: Line 4:
There should be a simple power status menu replacing the panel applet displayed by `gnome-power-manager`. The rest of the `gnome-power-manager` interface should work as normal. <<TableOfContents>>
Line 7: Line 6:
We also offer this design to KDE and Kubuntu developers as a possible replacement for the menu displayed by `kpowersave`. Ubuntu has various interfaces dealing with power. On the PC, these include a Power panel in System Settings, a battery menu, alerts for low battery, and the ability to suspend or hibernate. On the phone, they include a Battery panel in System Settings, and alerts for low battery.
Line 9: Line 8:
== Rationale == == PC ==
Line 11: Line 10:
The power status menu exists to indicate how much time you have left when a rechargeable thing (battery, UPS, mouse, iPod, Bluetooth phone, ''etc'') is discharging, and conversely how much longer everything needs to fully charge. <<Anchor(settings)>>
=== Power settings ===
Line 13: Line 13:
== Artwork requirements summary == {{attachment:power-settings-compatibility.png}}

Whenever the current hardware has not been [[http://www.ubuntu.com/certification/|certified]] or [[https://wiki.ubuntu.com/UbuntuFriendly|validated]] that Suspend and Hibernate both work, then at the top of the “Power” panel of System Settings should be text explaining this, with a Help button linking to more information:
 * “Suspend has not been tested to work on this computer.”
 * “Hibernate has not been tested to work on this computer.”
 * “Suspend and Hibernate have not been tested to work on this computer.”
Below this text should be one or both of the checkboxes, “Allow Suspend anyway” and “Allow Hibernate anyway”.

Whenever one of these checkboxes is unchecked, the respective functions should not be present wherever they otherwise would be, including the rest of this settings panel itself, the [[SessionMenu|session menu]], and the Shut Down dialog.

{{attachment:power-settings-menu.png}}

At the bottom of the “Power” panel of System Settings should be a “Show battery status in the menu bar:” menu, with options “When battery is present”, “When battery is charging/in use”, and “Never”. By default, the setting should be “When battery is present”. (If the menu disappeared whenever the thing was fully charged, this would make it difficult to realize that it ''was'' fully charged.)

For reference, the GNOME3 "Power Settings panel":

{{attachment:gcc-power-final.png}}

<<Anchor(menu)>>
=== Battery menu ===

The battery menu exists to indicate how much time you have left when a rechargeable thing (battery, UPS, mouse, iPod, Bluetooth phone, ''etc'') is discharging, and conversely how much longer it will be before everything fully charges.

{{attachment:power-menu.png}}

=== Artwork requirements summary ===
Line 26: Line 51:
== Design ==

{{attachment:power-menu-no-brackets.jpg}}

=== When to show the menu ===

The “Power Management Preferences” window should be adjusted to a “Power Settings” window, with simpler options for when to display the power menu.

||<style="border: none;">{{attachment:gnome-power-manager-before.png}}||<style="border: none; vertical-align: middle;">→||<style="border: none;">{{attachment:gnome-power-manager-after.jpg}}||

By default (regardless of any previous Gnome Power Manager setting), the setting should be “Whenever a chargeable device is present”. (If the menu disappeared whenever the thing was fully charged, this would make it difficult to realize that it ''was'' fully charged.)

=== Icons ===
==== Icons ====
Line 42: Line 55:
In both the menu title and the menu contents, a chargeable thing should be represented by an outline icon that most closely matches the component or device: a battery, a mouse, or a generic box. In both the menu title and the menu contents, a battery should be represented by an outline icon that most closely matches the component or device: a battery, a mouse, or a generic box.
Line 46: Line 59:
If the thing is fully charged and not discharging, the icon interior should feature a plug emblem. If the thing is fully charged and not discharging, the icon interior should feature a plug emblem (bug Bug:850011).
Line 52: Line 65:
=== Title === ==== Title ====
Line 54: Line 67:
The menu title should tell you at a glance what you need to know most: what will lose power soonest, or otherwise which thing will take longest to charge. (More detailed information can be accessed inside the menu itself.)
## The menu title should tell you at a glance what you need to know most: what will lose power soonest and when, or otherwise which thing will take longest to charge and how long it will take. (More detailed information can be accessed inside the menu itself.)
The menu title should tell you at a glance what you need to know most: what device will lose power soonest (and optionally when), or otherwise which device will take longest to charge, optionally how long it will take, and optionally its current charge level. More detailed information can be accessed inside the menu itself.
Line 57: Line 69:
If the menu is set to “Whenever a chargeable device is present”, but the charge level has not yet been detected, the menu title should consist of a generic battery icon.  * If “Show battery status in the menu bar” is set to “Whenever a battery is present”, but the charge level has not yet been detected, the menu title should consist of a generic battery icon.
Line 59: Line 71:
If all components are fully charged and none are discharging, the menu title should consist of a battery-with-a-plug icon, mouse-with-a-plug icon, or thingy-with-a-plug icon, depending on which components are present (using thingy-with-a-plug if there are zero or multiple chargeable components).  * If all components are fully charged and none are discharging, the menu title should consist of a battery-with-a-plug icon, mouse-with-a-plug icon, or thingy-with-a-plug icon, depending on which components are present (using thingy-with-a-plug if there are zero or multiple chargeable components). The accessible name should be “Battery charged” regardless.
Line 61: Line 73:
If anything is discharging, the menu title should consist of an icon representing the thing that is estimated to lose power first. For example, if your notebook battery is estimated to discharge in 1 hour 47 minutes, and your wireless mouse battery is estimated to discharge in 27 minutes, the menu title should appear as a mouse icon containing a red sliver.
## If anything is discharging, the menu title should consist of an icon representing the device that is estimated to lose power first, followed by the estimated time remaining for that device in hours and minutes. For example, if your notebook battery is estimated to discharge in 1 hour 47 minutes, and your wireless mouse battery is estimated to discharge in 27 minutes, the menu title should appear as a mouse icon containing a red sliver, followed by the text “0:27”.
 * If anything is discharging, the menu title should represent the device (not battery, but device) that is estimated to lose power first. For example, if your notebook battery is estimated to discharge in 1 hour 47 minutes, and your wireless mouse battery is estimated to discharge in 27 minutes, the menu title should represent the mouse.
Line 64: Line 75:
If nothing is discharging, the menu title should consist of an icon representing the thing that is estimated to take longest to charge. For example, if your wireless mouse battery is estimated to finish charging in 48 minutes, and your UPS is estimated to finish charging in 1 hour 10 minutes, the menu title should appear as a UPS icon containing a lightning bolt.
## If no devices are discharging, the menu title should consist of an icon representing the device that is estimated to take longest to charge, followed by the estimated time remaining to charge in hours and minutes in brackets. For example, if your wireless mouse battery is estimated to finish charging in 48 minutes, and your UPS is estimated to finish charging in 1 hour 10 minutes, the menu title should appear as a UPS icon containing a lightning bolt, followed by the text “(1:10)”.
 * If no devices are discharging, the menu title should represent the device that is estimated to take longest to charge.
Line 67: Line 77:
## In both the charging and discharging cases, if there is not enough information yet to calculate the time remaining, the text should read “(Estimating…)”. The menu title should begin with the icon of the thing it is representing.
Line 69: Line 79:
=== Items === If “Show Time in Menu Bar” and/or “Show Percentage in Menu Bar” is checked, the icon should be followed by brackets. If “Show Time in Menu Bar” is checked (as it should be by default), the brackets should contain the estimated time remaining for that item to charge or to lose power, in H:MM format. If “Show Percentage in Menu Bar” is checked (as it should not be by default), the brackets should contain the percentage charge for that device. If both are checked, the time and percentage should be separated by a space.
Line 71: Line 81:
The menu should contain one item for each chargeable thing, a separator if there are any chargeable devices, and a “Power Settings…” item. Regardless, the accessible name for the whole menu title should be the same as the accessible name for that thing’s item inside the menu itself.

For example, if both “Show Time in Menu Bar” and “Show Percentage in Menu Bar” are checked:

 * If your notebook battery is discharging at 99% but there is not enough information yet to calculate the time remaining, the menu title should appear as a battery icon followed by the text “(estimating… 99%)”, and the accessible name should be “Battery (estimating… 99%)”.

 * If your notebook battery is at 18% charge, estimated to run out in 1 hour 47 minutes, and your wireless mouse battery is at 30% charge, estimated to run out in 27 minutes, the menu title should appear as a mouse icon containing a red sliver, followed by the text “(0:27 30%)”, and the accessible name should be “Mouse (27 minutes to charge, 30%)”.

 * If your wireless mouse battery is at 34% charge, estimated to finish charging in 48 minutes, and your UPS is at 81% charge, estimated to finish charging in 1 hour 10 minutes, the menu title should appear as a UPS icon containing a lightning bolt, followed by the text “(1:10 81%)”, and the accessible name should be “UPS (1 hour 10 minutes to charge, 81%)”.

==== Items ====

The menu should contain one item for each chargeable battery or similar component, a separator if there are any chargeable components, a “Show Time in Menu Bar” item, and a “Power Settings…” item.

<<Anchor(login-screen)>>
At the login screen, the items for chargeable things should be insensitive (so that they can still be read, but not selected), and the “Power Settings…” item should not be present at all (so that you can’t wander around System Settings, or use power settings to hinder others from logging in). The only sensitive item should be “Show Time in Menu Bar”.
Line 74: Line 99:
 1. any internal battery or batteries (if there is more than one, listed alphabetically in order of sysfs path, but not showing that sysfs path)  1. any internal battery or batteries (if there is more than one, listed alphabetically in order of `sysfs` path, but not showing that `sysfs` path)
Line 79: Line 104:
The menu item for each chargeable thing should consist of three elements. The menu item for each chargeable thing should consist of two elements.
Line 83: Line 108:
 1. Text representing the name of the component (“Battery”, “Mouse”, “UPS”, “Alejandra’s iPod”, ''etc'') and the charge status:
  * “X is charged” if it is fully charged and not discharging
  * “X (estimating…)” if it is charging or discharging, but an accurate time estimate cannot be made yet
  * “X H:MM until charged” if it is charging
  * “X” if it is discharging with 12 hours or more left
  * “X H:MM left” if it is discharging with less than 12 hours left.
 (We investigated showing this time as a table column, but it looked worse.)
 1. Text representing the name of the component (“Battery”, “Mouse”, “UPS”, “Alejandra’s iPod”, ''etc'') and the '''charge status''' in brackets:
  * “''X'' (charged)” if it is fully charged and not discharging
  * “''X'' (estimating…)” if it is charging or discharging, but an accurate time estimate cannot be made yet
  * “''X'' (H:MM to charge)” if it is charging, with the accessible name “''X'': ''MM'' minutes to charge” or “''X'': ''H'' hours ''MM'' minutes to charge”
  * “''X''” if it is discharging with 12 hours or more left
  * “''X'' (''H'':''MM'' left)” if it is discharging with less than 12 hours left, with the accessible name “''X'': ''MM'' minutes left” or “''X'': ''H'' hours ''MM'' minutes left”.
Line 97: Line 121:
== gnome-power-manager changes == <<Anchor(multiple-batteries)>>
==== Handling multiple batteries ====
Line 99: Line 124:
`gnome-power-manager` should be altered so that it no longer presents its own notification area item. If a device has multiple batteries and uses only one of them at a time, they should be presented as separate items inside the menu, but should be totalled for the purpose of the menu title (fixing bug Bug:833337).
Line 101: Line 126:
== Handling upgrades == For example, if your notebook has two internal batteries — one fully charged, and one that will discharge in 22 minutes — and your wireless mouse battery is estimated to discharge in 27 minutes, then the menu title should represent the mouse. Even though the internal battery will lose power first, the mouse is the ''device'' that will lose power first.
Line 103: Line 128:
Since the previous power menu is a notification area item, and it is being removed at the same time as the new power menu is introduced, there are no upgrade considerations.

== Implementation ==
==== Implementation ====
Line 108: Line 131:
 * Patch GNOME Power Manager to not show it's status icon irregardless of the GConf Key if the Power Menu is running.  * Patch GNOME Power Manager to not show its status icon irregardless of the GConf Key if the Power Menu is running.
Line 114: Line 137:
== Unresolved issues == === Links ===
Line 116: Line 139:
 * The new design leaves no way of accessing the “Power Statistics” window.  * Upstream GNOME control center power panel work: [[http://live.gnome.org/Design/SystemSettings/Power]]
 * Upstream Indicator work: [[http://live.gnome.org/GnomeShell/Design/Guidelines/SystemStatus/BatteryPower]]

=== Unresolved issues ===

 * Bug Bug:883857: Battery warning popup buttons dont make sense

== Phone ==

=== “Battery” settings ===

||<tablestyle="float:left;margin:0 1em 1em 0;" style="border:none;">{{attachment:phone-battery-settings.png}}||

''Erratum: “Auto sleep” should be “Lock when idle” or “Sleep when idle” as described below.''

In the “Battery” settings panel, the “Charge level” and “Last full charge” should both be displayed to zero decimal places, and “Last full charge” using the most appropriate unit: for example, “2 hours ago” or “51 minutes ago”. When appropriate, the “Last full charge” row should instead read “Charging” or “Fully charged” with no time value.

The graph should show the charge level over the past 24 hours. Charge level while asleep should be shown as a dotted line, from the level just before sleep to the level just after waking.

“Lock when idle” should be a mirror of [[SecurityAndPrivacySettings#phone-locking|the “Lock when idle” item in “Security & Privacy”]]. (For example, it should instead read “Sleep when idle” when “Lock security” is set to “Swipe (No security)”.)

||<tablestyle="clear:both" style="border:none">||

=== Indicator ===

||<tablestyle="float:left;margin:0 1em 1em 0;" style="border:none;">{{attachment:phone-battery-indicator.png}}||

The battery indicator on phone should use the same icon scheme as the title of the battery menu on PC.

The “Charge level” item should be insensitive, showing the charge status of the phone’s battery. If a Bluetooth headset is connected and its charge level is known, “Charge level” should instead be “Internal battery”, and it should be followed by a similarly insensitive “Bluetooth headset” item showing the charge status of the headset.

Ubuntu has various interfaces dealing with power. On the PC, these include a Power panel in System Settings, a battery menu, alerts for low battery, and the ability to suspend or hibernate. On the phone, they include a Battery panel in System Settings, and alerts for low battery.

PC

Power settings

power-settings-compatibility.png

Whenever the current hardware has not been certified or validated that Suspend and Hibernate both work, then at the top of the “Power” panel of System Settings should be text explaining this, with a Help button linking to more information:

  • “Suspend has not been tested to work on this computer.”
  • “Hibernate has not been tested to work on this computer.”
  • “Suspend and Hibernate have not been tested to work on this computer.”

Below this text should be one or both of the checkboxes, “Allow Suspend anyway” and “Allow Hibernate anyway”.

Whenever one of these checkboxes is unchecked, the respective functions should not be present wherever they otherwise would be, including the rest of this settings panel itself, the session menu, and the Shut Down dialog.

power-settings-menu.png

At the bottom of the “Power” panel of System Settings should be a “Show battery status in the menu bar:” menu, with options “When battery is present”, “When battery is charging/in use”, and “Never”. By default, the setting should be “When battery is present”. (If the menu disappeared whenever the thing was fully charged, this would make it difficult to realize that it was fully charged.)

For reference, the GNOME3 "Power Settings panel":

gcc-power-final.png

Battery menu

The battery menu exists to indicate how much time you have left when a rechargeable thing (battery, UPS, mouse, iPod, Bluetooth phone, etc) is discharging, and conversely how much longer it will be before everything fully charges.

power-menu.png

Artwork requirements summary

icons.jpg

A total of 97 icons are needed, though 33 of these may be covered by only three distinct graphics (leaving a total of 67), and 60 others consist of 30 pairs that differ only in coloring.

(3✕) For each of {battery, mouse, generic device}, there should be:

  • (1) an icon for “running on AC”
  • (11) icons for “charging” at levels of charge from 0% to (nearly) 100%, in 10% increments (these might all be the same icon)
  • (10) icons for “discharging but not critical” at levels of charge from 10% to 100%, in 10% increments
  • (10) icons for “discharging and soon depleted” at levels of charge from 10% to 100%, in 10% increments.

There should also be (1) a generic battery icon, for use when a battery has been removed or when its charge level has not yet been determined.

Icons

icons.jpg

In both the menu title and the menu contents, a battery should be represented by an outline icon that most closely matches the component or device: a battery, a mouse, or a generic box.

If it is a battery that is either missing or of unknown charge level, it should use the generic battery icon.

If the thing is fully charged and not discharging, the icon interior should feature a plug emblem (bug 850011).

If it is discharging, the icon interior should be filled from left to right approximately as much as the remaining charge. If it has less than 30 minutes left, the fill should be red rather than black. (This coloring is deliberately time-based, not percentage-based; how much time you have left is more important than how long the battery can theoretically last.)

And if it is charging, the icon interior should feature a lightning bolt emblem. Depending on clarity and space available, the icon interior may also be filled from left to right approximately as much as the amount charged.

Title

The menu title should tell you at a glance what you need to know most: what device will lose power soonest (and optionally when), or otherwise which device will take longest to charge, optionally how long it will take, and optionally its current charge level. More detailed information can be accessed inside the menu itself.

  • If “Show battery status in the menu bar” is set to “Whenever a battery is present”, but the charge level has not yet been detected, the menu title should consist of a generic battery icon.
  • If all components are fully charged and none are discharging, the menu title should consist of a battery-with-a-plug icon, mouse-with-a-plug icon, or thingy-with-a-plug icon, depending on which components are present (using thingy-with-a-plug if there are zero or multiple chargeable components). The accessible name should be “Battery charged” regardless.
  • If anything is discharging, the menu title should represent the device (not battery, but device) that is estimated to lose power first. For example, if your notebook battery is estimated to discharge in 1 hour 47 minutes, and your wireless mouse battery is estimated to discharge in 27 minutes, the menu title should represent the mouse.
  • If no devices are discharging, the menu title should represent the device that is estimated to take longest to charge.

The menu title should begin with the icon of the thing it is representing.

If “Show Time in Menu Bar” and/or “Show Percentage in Menu Bar” is checked, the icon should be followed by brackets. If “Show Time in Menu Bar” is checked (as it should be by default), the brackets should contain the estimated time remaining for that item to charge or to lose power, in H:MM format. If “Show Percentage in Menu Bar” is checked (as it should not be by default), the brackets should contain the percentage charge for that device. If both are checked, the time and percentage should be separated by a space.

Regardless, the accessible name for the whole menu title should be the same as the accessible name for that thing’s item inside the menu itself.

For example, if both “Show Time in Menu Bar” and “Show Percentage in Menu Bar” are checked:

  • If your notebook battery is discharging at 99% but there is not enough information yet to calculate the time remaining, the menu title should appear as a battery icon followed by the text “(estimating… 99%)”, and the accessible name should be “Battery (estimating… 99%)”.
  • If your notebook battery is at 18% charge, estimated to run out in 1 hour 47 minutes, and your wireless mouse battery is at 30% charge, estimated to run out in 27 minutes, the menu title should appear as a mouse icon containing a red sliver, followed by the text “(0:27 30%)”, and the accessible name should be “Mouse (27 minutes to charge, 30%)”.
  • If your wireless mouse battery is at 34% charge, estimated to finish charging in 48 minutes, and your UPS is at 81% charge, estimated to finish charging in 1 hour 10 minutes, the menu title should appear as a UPS icon containing a lightning bolt, followed by the text “(1:10 81%)”, and the accessible name should be “UPS (1 hour 10 minutes to charge, 81%)”.

Items

The menu should contain one item for each chargeable battery or similar component, a separator if there are any chargeable components, a “Show Time in Menu Bar” item, and a “Power Settings…” item.

At the login screen, the items for chargeable things should be insensitive (so that they can still be read, but not selected), and the “Power Settings…” item should not be present at all (so that you can’t wander around System Settings, or use power settings to hinder others from logging in). The only sensitive item should be “Show Time in Menu Bar”.

The order for chargeable things should be:

  1. any internal battery or batteries (if there is more than one, listed alphabetically in order of sysfs path, but not showing that sysfs path)

  2. any UPS
  3. any wireless mouse
  4. anything else.

The menu item for each chargeable thing should consist of two elements.

  1. The icon representing that thing.
  2. Text representing the name of the component (“Battery”, “Mouse”, “UPS”, “Alejandra’s iPod”, etc) and the charge status in brackets:

    • X (charged)” if it is fully charged and not discharging

    • X (estimating…)” if it is charging or discharging, but an accurate time estimate cannot be made yet

    • X (H:MM to charge)” if it is charging, with the accessible name “X: MM minutes to charge” or “X: H hours MM minutes to charge”

    • X” if it is discharging with 12 hours or more left

    • X (H:MM left)” if it is discharging with less than 12 hours left, with the accessible name “X: MM minutes left” or “X: H hours MM minutes left”.

Selecting the item for a chargeable component should open Gnome Power Manager’s “Device Information” window for that component. (A KDE implementation would open the “KPowersave Information Dialog”.)

The “Power Settings…” item should open the Power Settings window. (In a KDE implementation, it would open the “KPowersave Settings” window.)

Unfortunately the Linux kernel does not provide real-world identifiers for multiple batteries in a computer; they have only serial numbers, and labels of the form “BAT0” and “BAT1”. So we cannot show useful distinguishing labels like “Battery (front slot)” in the menu.

Handling multiple batteries

If a device has multiple batteries and uses only one of them at a time, they should be presented as separate items inside the menu, but should be totalled for the purpose of the menu title (fixing bug 833337).

For example, if your notebook has two internal batteries — one fully charged, and one that will discharge in 22 minutes — and your wireless mouse battery is estimated to discharge in 27 minutes, then the menu title should represent the mouse. Even though the internal battery will lose power first, the mouse is the device that will lose power first.

Implementation

  • Run along side the GNOME Power Manager
  • Patch GNOME Power Manager to not show its status icon irregardless of the GConf Key if the Power Menu is running.
  • Use the DevKit-Power and GPM DBus APIs to gather information on state of the system.

  • Major issue is testing all of the corner cases (hard to reproduce)
    • Need to write user runable tests (Wiki pages)
    • Feed into Ubuntu Testing Team

Unresolved issues

  • Bug 883857: Battery warning popup buttons dont make sense

Phone

“Battery” settings

phone-battery-settings.png

Erratum: “Auto sleep” should be “Lock when idle” or “Sleep when idle” as described below.

In the “Battery” settings panel, the “Charge level” and “Last full charge” should both be displayed to zero decimal places, and “Last full charge” using the most appropriate unit: for example, “2 hours ago” or “51 minutes ago”. When appropriate, the “Last full charge” row should instead read “Charging” or “Fully charged” with no time value.

The graph should show the charge level over the past 24 hours. Charge level while asleep should be shown as a dotted line, from the level just before sleep to the level just after waking.

“Lock when idle” should be a mirror of the “Lock when idle” item in “Security & Privacy”. (For example, it should instead read “Sleep when idle” when “Lock security” is set to “Swipe (No security)”.)

Indicator

phone-battery-indicator.png

The battery indicator on phone should use the same icon scheme as the title of the battery menu on PC.

The “Charge level” item should be insensitive, showing the charge status of the phone’s battery. If a Bluetooth headset is connected and its charge level is known, “Charge level” should instead be “Internal battery”, and it should be followed by a similarly insensitive “Bluetooth headset” item showing the charge status of the headset.

Power (last edited 2017-01-27 12:17:50 by mpt)