Power

Differences between revisions 3 and 62 (spanning 59 versions)
Revision 3 as of 2010-02-10 14:48:08
Size: 8796
Editor: eth0
Comment: removes redundant heading
Revision 62 as of 2014-03-21 12:26:44
Size: 18393
Editor: mpt
Comment: + "Warnings" wireframes
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
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.

We also offer this design to KDE and Kubuntu developers as a possible replacement for the menu displayed by `kpowersave`.

== Rationale ==

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.

== Artwork requirements summary ==

||<tablestyle="float: right; margin: 0 0 1em 1em;" style="border: none;">{{attachment: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.

== 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 ===
## page was renamed from BatteryStatusMenu
## page was renamed from PowerStatusMenu

<<TableOfContents>>

Ubuntu has various interfaces dealing with power. These include a panel in System Settings (“Battery” on the phone and tablet, “Power” on the PC), a battery menu, alerts for low battery, and the ability to suspend or hibernate.

|| '''Function''' || '''Phone''' || '''Tablet''' || '''PC''' ||
|| See charge level ||<-2> (./) indicator, settings || (./) indicator, settings ||
|| See time when last full ||<-2> (./) settings || /!\ ||
|| See charge history ||<-2> (./) settings || (./) settings dialog (less room in settings) ||
|| See time remaining ||<-2> {X} (too variable) || (./) indicator, settings ||
|| Configure screen blanking ||<-2> {X} ([[SecurityAndPrivacySettings#phone-locking|combined with locking]]) || (./) settings ||
|| Configure auto-suspend ||<-2> {X} ([[SecurityAndPrivacySettings#phone-locking|combined with locking]]) || (./) settings ||
|| Configure lid-close behavior || {X} (no lid) || {X} (no lid, yet) || (./) settings ||
|| Confirm charging has begun ||<-2> || ||
|| Confirm discharging has begun ||<-2> || ||
|| Be warned of critically low battery ||<-2> || ||

== Information about chargeable things ==

=== Icon ===
Line 38: Line 26:
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. Wherever it is represented, a chargeable thing should be represented by an outline icon that most closely matches the component or device: a battery, a mouse, or otherwise a generic box.
Line 42: Line 30:
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 48: Line 36:
<<Anchor(percentage)>>
=== Percentage ===

Wherever a component’s percentage charge is shown, it should be rounded to zero decimal places and have no trailing space, for example “99%” or “100%”.

<<Anchor(color)>>
=== Color ===

The color for a component’s charge level should follow a gradient from bright green (`#00ff00`) for 100% to bright red (`#ff0000`) for 0%. (This color should not be used in the indicator, however, as it would be present so much of the time as to be distracting.)

<<Anchor(time-presentation)>>
=== Time remaining ===

<<Anchor(time-relevance)>>
The '''time is relevant''' for a component if “Show Time in Menu Bar” is checked (as it should be by default), and either (a) the component is charging, or (b) the component is discharging ''and'' the estimated time is less than 24 hours. (A time greater than 24 hours is probably a mistaken calculation.)

The '''brief time-remaining string''' for a component should be:
 * the time remaining for it to empty or fully charge, if estimable, in H:MM format; otherwise
 * “estimating…” if the time remaining has been inestimable for less than 30 seconds; otherwise
 * “unknown” if the time remaining has been inestimable for between 30 seconds and one minute; otherwise
 * the empty string.

The '''expanded time-remaining string''' for a component should be the same as the brief time-remaining string, except that if the time is estimable:
 * if the component is charging, it should be “H:MM to charge”
 * if the component is discharging, it should be “H:MM left”.

The '''accessible time-remaining string''' for a component should be the same as the expanded time-remaining string, except that the H:MM time should be rendered as “''H'' hours ''M'' minutes”, or just as “''M'' minutes” if the time is less than one hour.

<<Anchor(multiple-batteries)>>
=== 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|battery menu]], but everywhere else they should be aggregated (bug Bug:880881). Their percentages should be averaged. If any are discharging, the aggregated time remaining should be the maximum of the times for all those that are discharging, plus the sum of the times for all those that are idle. Otherwise, the aggregated time remaining should be the the maximum of the times for all those that are charging.

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.

<<Anchor(settings)>>
== Settings ==

On the phone and tablet, the System Settings panel should be labelled “Battery”, because “Power” would be imprecise; it is uncommon for those devices to be connected to mains power except when charging. But on the PC, the panel should be labelled “Power”, because desktop PCs never run off battery (and the panel may also include a UPS).

||<tablestyle="float:left;margin:0 1em 1em 0" style="border:none;width:310px">{{attachment:phone-battery-settings.png}}<<BR>>''Erratum: “Last full charge:” should be “Last full charge”.''||

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

The “Charge level” (phone/tablet) or “Battery charge level” (PC), should be shown as a [[#percentage|percentage]]. The “Last full charge” should similarly be displayed to zero decimal places, 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.

On the PC, the charge meter should use [[#color|the color for that charge level]]. And in the “Statistics” graph on the PC, and the charge graph on the phone/tablet, each point should use the color for that charge level. Charge level while asleep should be shown as a dotted line, from the level just before sleep to the level just after waking. The Y axis should be unlabelled, because its meaning and range is obvious, with major tick marks at 0% 50% and 100%. The X axis should have tick marks for every o’clock that has passed in the past 24 hours, with major tick marks for the most recent o’clock and every six before that, labelled using the current time format but without minutes. For example, if you use AM/PM format and the current time is 4:51 PM, the labelled tick marks should be “10 PM”, “4 AM”, “10 AM”, and (the last tick mark) “4 PM”. In addition, yesterday’s range should be labelled “Yesterday” when there is room, and today’s with “Today”.

“Lock when idle” should be a mirror of [[SecurityAndPrivacySettings#phone-locking|the “Lock when idle” item in “Security & Privacy”]], with the same summary value and page stack.

The “Switch off screen when inactive:” and “Suspend when inactive:” menus should all have options “After 5 minutes”, “After 10 minutes”, “After 15 minutes”, “After 20 minutes”, “After 30 minutes”, “After 1 hour”, “After 2 hours”, “After 3 hours”, and “Never”.

Any option in either “Switch off screen when inactive:” menu that is equal to or greater than the current selection in the corresponding “Suspend when inactive:” menu should be selectable but greyed out, indicating that it has no effect. For example, if “When using battery:” “Suspend when inactive:” is set to “After 2 hours”, then in the “When using battery:” “Switch off screen when inactive:” menu, the options “After 2 hours”, “After 3 hours”, and “Never” should be greyed out.

“Brightness…” and “Bluetooth…” should navigate to the relevant System Settings panel. “Wi-Fi…” should navigate to [[Networking#wi-fi|the “Network” panel with the first Wi-Fi card selected]]. “Statistics” should open the Power Statistics window.

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

The “Show battery status in the menu bar:” menu should have 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.)

== Indicator and menu ==

<<Anchor(menu)>>
The battery indicator 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. On the PC, the battery menu exists to give you more detailed information, and to let you access [[#settings|power settings]].

On the PC, everything that is accessible in the battery menu should also be accessed in the settings panel, because the menu may not be present.

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

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

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

=== Presence ===

On a phone or tablet, the indicator should always be present, because these devices almost always rely on battery.

On a PC, if you are logged in, the menu should be present depending on [[#settings|the “Show battery status in the menu bar” setting]]. If you are not logged in (at the login screen, lock screen, or standalone installer session), the menu should be present as if the setting was “When battery is present”.
Line 50: Line 117:
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.)

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 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 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 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)”.

## In both the charging and discharging cases, if there is not enough information yet to calculate the time remaining, the text should read “(Estimating…)”.

=== Items ===

The menu should contain one item for each chargeable thing, a separator if there are any chargeable devices, and a “Power Settings…” item.

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)
 1. any UPS
 1. any wireless mouse
 1. anything else.

The menu item for each chargeable thing should consist of three elements.
Regardless of form factor, the indicator should tell you at a glance what you need to know most: which component will lose power soonest (and optionally when), or otherwise which component 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. On a phone or tablet, the component in question will almost always be the phone or tablet itself, though it may be an external keyboard.

 * 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 component (not battery, but component) 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.

On the PC, if [[#time-presentation|the time is relevant]] and/or “Show Percentage in Menu Bar” is checked, the icon should be followed by brackets. If the time is relevant, the brackets should contain [[#time-presentation|the time-remaining string]] for that component. If “Show Percentage in Menu Bar” is checked (as it should not be by default), the brackets should contain the [[#percentage|percentage]] for that device. If both conditions are true, 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 component 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%)”.

<<Anchor(login-screen)>>
=== Menu contents ===

==== PC ====

The menu should contain:
 1. One item for each battery, regardless of whether it is present. (If there are more than one, they should be listed alphabetically in order of `sysfs` path, but not showing that `sysfs` path.)
 1. One item for each UPS.
 1. One item for each connected wireless mouse or keyboard (bug Bug:1100546).
 1. One item for each other connected component with known charge level, for example a music player or phone.
 1. A separator, if you are logged in and the menu has any previous items.
 1. A “Show Time in Menu Bar” checkmark item, if you are logged in.
 1. A “Show Percentage in Menu Bar” checkmark item, if you are logged in.
 1. A “Power Settings…” item, if you are logged in (so that you can’t wander around System Settings while logged out, or use power settings to hinder others from logging in).

(If you are not logged in, and there are no chargeable components, the menu would contain nothing at all. But that does not matter, because in that case [[#Presence|the menu should not be present anyway]].)

The menu item for each chargeable component should consist of two elements.
Line 79: Line 162:
 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.)

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.)
 1. Text representing the name of the component (“Battery”, “Mouse”, “UPS”, “Alejandra’s iPod”, ''etc'') and the '''charge status''' in brackets:
  * “''X'' (not present)” if it is a battery that has been removed;
  * “''X'' (charged)” if it is fully charged and not discharging;
  * “''X'' (''[[#time-presentation|expanded time-remaining string]]'')” if it is charging, or discharging with less than 24 hours left;
  * “''X''” if it is discharging with 24 hours or more left.

The accessible label for the menu item should be the same as the visible label, except with the [[#time-presentation|accessible time-remaining string]] instead of the expanded time-remaining string.

If you are logged in, selecting the item for a chargeable component should open the “Device Information” window for that component (bug Bug:1255655). If you are not logged in (at the login screen or standalone installer session), the item should be insensitive.

The “Power Settings…” item should open the System Settings “Power” panel.
Line 93: Line 176:
== gnome-power-manager changes ==

`gnome-power-manager` should be altered so that it no longer presents its own notification area item.

== Handling upgrades ==

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 ==

 * Run along side the GNOME Power Manager
 * Patch GNOME Power Manager to not show it's status icon irregardless of the GConf Key if the Power Menu is running.
 * Use the Dev``Kit-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
===== Session variations =====

''This is a summary only; the specifications of individual items are authoritative.''

In the '''guest session''' and '''live session''', the menu should be identical to the normal session.

In the '''standalone installer session''' and at the '''login screen''':
 * The individual items for batteries etc should be insensitive.
 * “Show Time in Menu Bar”, “Show Percentage in Menu Bar”, and “Power Settings…” should not be present.

==== Phone and tablet ====

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

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.

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

== Warnings ==

||<^ style="border:none">{{attachment:battery-critical-pc.png}}||<^ style="border:none">{{attachment:battery-critical-phone.png}}||

== State changes ==

=== When a component begins discharging ===

=== When a component begins charging ===

== Links ==

 * 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]]
Line 112: Line 211:
 * The new design leaves no way of accessing the “Power Statistics” window.  * Bug Bug:883857: Battery warning popup buttons dont make sense

Ubuntu has various interfaces dealing with power. These include a panel in System Settings (“Battery” on the phone and tablet, “Power” on the PC), a battery menu, alerts for low battery, and the ability to suspend or hibernate.

Function

Phone

Tablet

PC

See charge level

(./) indicator, settings

(./) indicator, settings

See time when last full

(./) settings

Warning /!\

See charge history

(./) settings

(./) settings dialog (less room in settings)

See time remaining

(X) (too variable)

(./) indicator, settings

Configure screen blanking

(X) (combined with locking)

(./) settings

Configure auto-suspend

(X) (combined with locking)

(./) settings

Configure lid-close behavior

(X) (no lid)

(X) (no lid, yet)

(./) settings

Confirm charging has begun

Confirm discharging has begun

Be warned of critically low battery

Information about chargeable things

Icon

icons.jpg

Wherever it is represented, a chargeable thing should be represented by an outline icon that most closely matches the component or device: a battery, a mouse, or otherwise 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.

Percentage

Wherever a component’s percentage charge is shown, it should be rounded to zero decimal places and have no trailing space, for example “99%” or “100%”.

Color

The color for a component’s charge level should follow a gradient from bright green (#00ff00) for 100% to bright red (#ff0000) for 0%. (This color should not be used in the indicator, however, as it would be present so much of the time as to be distracting.)

Time remaining

The time is relevant for a component if “Show Time in Menu Bar” is checked (as it should be by default), and either (a) the component is charging, or (b) the component is discharging and the estimated time is less than 24 hours. (A time greater than 24 hours is probably a mistaken calculation.)

The brief time-remaining string for a component should be:

  • the time remaining for it to empty or fully charge, if estimable, in H:MM format; otherwise
  • “estimating…” if the time remaining has been inestimable for less than 30 seconds; otherwise
  • “unknown” if the time remaining has been inestimable for between 30 seconds and one minute; otherwise
  • the empty string.

The expanded time-remaining string for a component should be the same as the brief time-remaining string, except that if the time is estimable:

  • if the component is charging, it should be “H:MM to charge”
  • if the component is discharging, it should be “H:MM left”.

The accessible time-remaining string for a component should be the same as the expanded time-remaining string, except that the H:MM time should be rendered as “H hours M minutes”, or just as “M minutes” if the time is less than one hour.

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 battery menu, but everywhere else they should be aggregated (bug 880881). Their percentages should be averaged. If any are discharging, the aggregated time remaining should be the maximum of the times for all those that are discharging, plus the sum of the times for all those that are idle. Otherwise, the aggregated time remaining should be the the maximum of the times for all those that are charging.

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.

Settings

On the phone and tablet, the System Settings panel should be labelled “Battery”, because “Power” would be imprecise; it is uncommon for those devices to be connected to mains power except when charging. But on the PC, the panel should be labelled “Power”, because desktop PCs never run off battery (and the panel may also include a UPS).

phone-battery-settings.png
Erratum: “Last full charge:” should be “Last full charge”.

power-settings.png

The “Charge level” (phone/tablet) or “Battery charge level” (PC), should be shown as a percentage. The “Last full charge” should similarly be displayed to zero decimal places, 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.

On the PC, the charge meter should use the color for that charge level. And in the “Statistics” graph on the PC, and the charge graph on the phone/tablet, each point should use the color for that charge level. Charge level while asleep should be shown as a dotted line, from the level just before sleep to the level just after waking. The Y axis should be unlabelled, because its meaning and range is obvious, with major tick marks at 0% 50% and 100%. The X axis should have tick marks for every o’clock that has passed in the past 24 hours, with major tick marks for the most recent o’clock and every six before that, labelled using the current time format but without minutes. For example, if you use AM/PM format and the current time is 4:51 PM, the labelled tick marks should be “10 PM”, “4 AM”, “10 AM”, and (the last tick mark) “4 PM”. In addition, yesterday’s range should be labelled “Yesterday” when there is room, and today’s with “Today”.

“Lock when idle” should be a mirror of the “Lock when idle” item in “Security & Privacy”, with the same summary value and page stack.

The “Switch off screen when inactive:” and “Suspend when inactive:” menus should all have options “After 5 minutes”, “After 10 minutes”, “After 15 minutes”, “After 20 minutes”, “After 30 minutes”, “After 1 hour”, “After 2 hours”, “After 3 hours”, and “Never”.

Any option in either “Switch off screen when inactive:” menu that is equal to or greater than the current selection in the corresponding “Suspend when inactive:” menu should be selectable but greyed out, indicating that it has no effect. For example, if “When using battery:” “Suspend when inactive:” is set to “After 2 hours”, then in the “When using battery:” “Switch off screen when inactive:” menu, the options “After 2 hours”, “After 3 hours”, and “Never” should be greyed out.

“Brightness…” and “Bluetooth…” should navigate to the relevant System Settings panel. “Wi-Fi…” should navigate to the “Network” panel with the first Wi-Fi card selected. “Statistics” should open the Power Statistics window.

power-settings-menu.png

The “Show battery status in the menu bar:” menu should have 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.)

Indicator and menu

The battery indicator 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. On the PC, the battery menu exists to give you more detailed information, and to let you access power settings.

On the PC, everything that is accessible in the battery menu should also be accessed in the settings panel, because the menu may not be present.

power-menu.png

phone-battery-indicator.png

Presence

On a phone or tablet, the indicator should always be present, because these devices almost always rely on battery.

On a PC, if you are logged in, the menu should be present depending on the “Show battery status in the menu bar” setting. If you are not logged in (at the login screen, lock screen, or standalone installer session), the menu should be present as if the setting was “When battery is present”.

Title

Regardless of form factor, the indicator should tell you at a glance what you need to know most: which component will lose power soonest (and optionally when), or otherwise which component 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. On a phone or tablet, the component in question will almost always be the phone or tablet itself, though it may be an external keyboard.

  • 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 component (not battery, but component) 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.

On the PC, if the time is relevant and/or “Show Percentage in Menu Bar” is checked, the icon should be followed by brackets. If the time is relevant, the brackets should contain the time-remaining string for that component. If “Show Percentage in Menu Bar” is checked (as it should not be by default), the brackets should contain the percentage for that device. If both conditions are true, 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 component 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%)”.

PC

The menu should contain:

  1. One item for each battery, regardless of whether it is present. (If there are more than one, they should be listed alphabetically in order of sysfs path, but not showing that sysfs path.)

  2. One item for each UPS.
  3. One item for each connected wireless mouse or keyboard (bug 1100546).

  4. One item for each other connected component with known charge level, for example a music player or phone.
  5. A separator, if you are logged in and the menu has any previous items.
  6. A “Show Time in Menu Bar” checkmark item, if you are logged in.
  7. A “Show Percentage in Menu Bar” checkmark item, if you are logged in.
  8. A “Power Settings…” item, if you are logged in (so that you can’t wander around System Settings while logged out, or use power settings to hinder others from logging in).

(If you are not logged in, and there are no chargeable components, the menu would contain nothing at all. But that does not matter, because in that case the menu should not be present anyway.)

The menu item for each chargeable component 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 (not present)” if it is a battery that has been removed;

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

    • X (expanded time-remaining string)” if it is charging, or discharging with less than 24 hours left;

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

The accessible label for the menu item should be the same as the visible label, except with the accessible time-remaining string instead of the expanded time-remaining string.

If you are logged in, selecting the item for a chargeable component should open the “Device Information” window for that component (bug 1255655). If you are not logged in (at the login screen or standalone installer session), the item should be insensitive.

The “Power Settings…” item should open the System Settings “Power” panel.

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.

Session variations

This is a summary only; the specifications of individual items are authoritative.

In the guest session and live session, the menu should be identical to the normal session.

In the standalone installer session and at the login screen:

  • The individual items for batteries etc should be insensitive.
  • “Show Time in Menu Bar”, “Show Percentage in Menu Bar”, and “Power Settings…” should not be present.

Phone and tablet

phone-battery-indicator.png

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.

Warnings

battery-critical-pc.png

battery-critical-phone.png

State changes

When a component begins discharging

When a component begins charging

Unresolved issues

  • Bug 883857: Battery warning popup buttons dont make sense

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