Battery status line too long

Bug #619816 reported by David Barth
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ayatana Ubuntu
Fix Released
Medium
Karl Lattimer
Ubuntu Translations
Fix Released
Medium
Unassigned
indicator-power
Fix Released
Undecided
Unassigned
indicator-power (Ubuntu)
Fix Released
Medium
Karl Lattimer

Bug Description

Binary package hint: gnome-power-manager

The status information displayed in the g-p-m indicator menu is generally too long.

Mpt proposed a better set of strings to display the status information for batteries: https://wiki.ubuntu.com/BatteryStatusMenu#Items

Tags: patch
David Barth (dbarth)
Changed in gnome-power-manager (Ubuntu):
assignee: nobody → Karl Lattimer (karl-qdh)
importance: Undecided → Medium
milestone: none → ubuntu-10.10-beta
Changed in ayatana-ubuntu:
assignee: nobody → Karl Lattimer (karl-qdh)
importance: Undecided → Medium
milestone: none → ubuntu-10.10-beta
Changed in gnome-power-manager (Ubuntu):
status: New → Triaged
Karl Lattimer (karl-qdh)
Changed in gnome-power-manager (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Karl Lattimer (karl-qdh) wrote :

Testing a new patch now.

One of the items on https://wiki.ubuntu.com/BatteryStatusMenu#Items couldn't be fixed, which was the "X (estimating…)" - the problem here is that gnome-power-manager is actually pretty sensible in that it will always have a time remaining available to display. The other case is where we're "in an undefined state we are not charging or discharging and the batteries are also not charged" - which is an error case more than a reasonable place to put an estimating label.

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

Attached is the updated patch for gnome-power-manager including the new strings.

I have an updated build of the package building in my ppa; https://launchpad.net/~karl-qdh/+archive/ppa which will hopefully be accepted and built soon :)

I _REALLY_ need someone else to test this :( unfortunately I don't have any way of doing so as my laptop is on lucid and my testing machine doesn't have a battery.

Changed in gnome-power-manager (Ubuntu):
status: In Progress → Fix Committed
tags: added: patch
Revision history for this message
Karl Lattimer (karl-qdh) wrote :

added more detailed conditions to the strings and removed some erroneous strings.

Revision history for this message
Karl Lattimer (karl-qdh) wrote :
Revision history for this message
Karl Lattimer (karl-qdh) wrote :
Revision history for this message
Karl Lattimer (karl-qdh) wrote :
Revision history for this message
Karl Lattimer (karl-qdh) wrote :
Revision history for this message
Karl Lattimer (karl-qdh) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-power-manager - 2.31.90-0ubuntu5

---------------
gnome-power-manager (2.31.90-0ubuntu5) maverick; urgency=low

  * debian/patches/12-add-appindicators.patch
    - Shorten strings for bettery status to match the specification at
      https://wiki.ubuntu.com/BatteryStatusMenu#Items (LP: #619816)
 -- Ken VanDine <email address hidden> Tue, 24 Aug 2010 10:52:36 -0400

Changed in gnome-power-manager (Ubuntu):
status: Fix Committed → Fix Released
Karl Lattimer (karl-qdh)
Changed in ayatana-ubuntu:
status: New → Fix Released
Revision history for this message
Maxim Levitsky (maximlevitsky) wrote :

I disagree this this is fixed. I'll say that new format is broken.
Instead of old intuitive message of

Laptop battery 1 hour 15 minutes left we get
Laptop battery 1:15 left.
What is that? Hours? Minutes?

Also g-p-m settings dialog is littered with these short formattings.

Like:
Put display to sleep when inactive for 0:05. WTF?

It was:

Put display to sleep when inactive for 5 minutes.

What is better?

Changed in ayatana-ubuntu:
status: Fix Released → New
Changed in gnome-power-manager (Ubuntu):
status: Fix Released → New
Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 619816] Re: Battery status line too long

Maxim, please don't say "Wtf", it's insulting. I agree, though, that
1h15m would be compact and more easily understood. I'm not sure what the
internationalised equivalent would be, though.

Mark

Revision history for this message
Maxim Levitsky (maximlevitsky) wrote :

Sorry about that, I was really frustrated.

Here g-p-m is very broken (and it was working very well in 10.04),
It:

10.10 regressions:

* This one.

* shows battery status twice on battery hotplug, and as soon as I remove the battery, it shows the status once,
so it never realizes battery is removed. Somewhere battery is added twice.
Note that I don't have /proc and sysfs interfaces in kernel config. I also tested this with ubuntu's kernel (2.6.35-generic...)
Kernel has only /sys battery interface.

* Shows 'estimating' all the time AC is plugged and battery is charging.

Older regressions:

* Its gconf settings for lock on suspend (which I disable, because I don't want screensaver nor black screen (pun intended) on resume are ingnored. the indicator-session now just always locks the screen.

* Doesn't show battery percentage on discharge (10.4 addition, I swallowed it I'll say...)
* Doesn't hibernate the system on empty battery because the threshold (which is specified in time which is not accurate) is too low (its like 2 minutes). I worked that around by editing gconf keys.
* Doesn't allow to configure 'on battery' settings if battery wasn't plugged before the log-in.

Revision history for this message
Maxim Levitsky (maximlevitsky) wrote :

Note that all above issues are reported ether by me or others.
Also I said it worked very well in 10.04. Well it still has the problems I wrote about, but I could live with them with workarounds.
Now its unusable.

Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

OK. Those are good detailed reports. Is there a bug open for each of
them? We're going to nail g-p-m issues in 11.10, we know that's a bit of
a swamp and have a plan to ask a contractor to help drain it in the next
round. If you're interested, let me know, otherwise good bug reports
would be most useful and will get addressed.

Mark

Revision history for this message
Maxim Levitsky (maximlevitsky) wrote :

On Thu, 2010-09-23 at 23:38 +0100, Mark Shuttleworth wrote:
> OK. Those are good detailed reports. Is there a bug open for each of
> them? We're going to nail g-p-m issues in 11.10, we know that's a bit of
> a swamp and have a plan to ask a contractor to help drain it in the next
> round. If you're interested, let me know, otherwise good bug reports
> would be most useful and will get addressed.
>
> Mark
>

Yes, like I said I reported them all:

https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/144830
This bug is mostly fixed in 10.04, but only problem remaining is that
g-p-m doesn't update its properies window when I plug batter after
login.
Granted its not possible currently to tell if system has battery before
its plugged, but after it is g-p-m should update the properties window.
I discussed that on LKML, and more or less nothing came out of that.
We ended up with the decision that kernel need to present somehow a flag
to userspace that battery bay exists, but no battery present.

https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/496221
This bug deals with too low hibernate thresholds.
Its piece of cake to fix. All its needed is to make system hibernate as
soon as battery hits 5% (or to be safe 10%).
(And let user override that to lower value if user really fells like he
wants to).
Besides, it happened to me that due to natural LiION decay, battery
might die on as high as 10% percent. (but on next boot, the total amount
of energy it can store is reduced, so it doesn't happen again.

https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/616443
10.10 bug, maybe in my case a bit different.
I just see the battery status twice, in exact same way.
I am sure that some code adds it twice to indicator-applet.

https://bugs.launchpad.net/ubuntu/+source/indicator-session/+bug/645370
This deals with forced screensaver on suspend.
To be honest, I didn't report that bug for long time, and today while
searching though g-p-m bugs I found this new report.

As a side note I also seen many more g-p-m issues, but they mostly are
kernel related unlike mine.

Also just a small note about the fact that due to variate of ways
brightness can be set from hardware keys, g-p-m often doesn't let
keyboard set the bightness (usually because it is set i hardware or
kernel acpi 'video' driver. As a result of this users with remote
controls that have brightness up/down keys can't use them.

I think these are all the bugs.

Best regards,
Maxim Levitsky

Revision history for this message
Maxim Levitsky (maximlevitsky) wrote :

To be honest, I didn't report these bugs. Sorry.
I usually search before I fill the bugreports to be sure I don't fill a duplicate.

This bugreport deals with missing percentage on g-p-m icon
https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/539912

And this is bugreport about 'estimating....' never ending message.
https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/633552

So, indeed I didn't report any of these bugs.

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

 * Sorry the formatting errors were missed during testing.
 * Dropping the percentage was part of the ui spec provided by mpt.
 * The continuous estimating was an oversight, in that it didn't happen in testing. I can only assume some batteries don't get a time estimation at all.

In order to fix these issues, we should;
 * replace estimating with a percentage remaining, the patch originally did this
 * add a second formatting function which will provide hours/minutes for the settings dialog (regression in the patch) and have a specific function for generating the hh:mm for the indicator.

Multiple batteries were untested but were based on the upstream model so I'm not sure what's wrong there.

Any of the other issues mentioned here aren't related to the indicator & the menu status line being too long.

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

mpt should have a say on 1h23m style formatting, and we'd need to ask someone familiar with internationalisation about any implications of it.

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

The attached patch changes the output to 0h04m in the menu and now once again says 0 hours 30 mins in the preferences

I've also made the xhxxm string translatable, but this needs to be picked up by translators, possibly too late for that :/

I can remove the string change and go back to 0:04 instead quite easily.

This also kills the estimating case as it seems to be incorrect, and just displays a percentage instead.

David Planella (dpm)
Changed in ubuntu-translations:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
David Planella (dpm) wrote :

I've just been pointed to this bug and I've added a translations task to keep track of it.

> mpt should have a say on 1h23m style formatting, and we'd need to ask someone familiar with internationalisation about any implications of it.

The translations team will be glad to help here, but what's the actual question, though?

> I've also made the xhxxm string translatable, but this needs to be picked up by translators, possibly too late for that :/

Generally making strings translatable that weren't before is not a problem for translators. It might be a bit tight, as the last language pack will be created next week on the 30th as per the LanguagePackTranslationDeadline, but if the change is accepted, uploaded soon and announced on the translators list as per [1], I'm sure many translation teams will still be able to translate it in a few days.

Thanks.

[1] https://wiki.ubuntu.com/FreezeExceptionProcess#UserInterfaceFreeze%20Exceptions

Revision history for this message
Maxim Levitsky (maximlevitsky) wrote :

Note that I have *one* battery, and in fact g-p-m statistic dialog is right about that.
Its the g-p-m icon that shows the battery twice.
That happens if I hotplug the battery.

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

@Maxim, my battery is also not removable :/ macbook pro

@David, the question is, what should the translations be for time in the following format %dh%02dm (e.g. 1h02m), the default translation could be %d:%02d (1:02)

Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

Karl, thanks for picking up the issues in this bug. IN 11.04 we'll need
to really nail G-P-M and make it rock. I like the idea of having a
default translation fallback to 3:05.

Mark

Revision history for this message
racecar56 (racecar56) wrote :

@Maxim, I also have the battery hotplug problem. ASUS Eee PC 1201T.

Revision history for this message
Maxim Levitsky (maximlevitsky) wrote :

Still none of mine issues, including this one were fixed/triaged

Revision history for this message
Maxim Levitsky (maximlevitsky) wrote :

@Mark Shuttleworth, will these issues be fixed one day?
I actually fixed the double battery appearence in g-p-m tray icon, but my bug got marked as duplicate and still ignored

Revision history for this message
Kate Stewart (kate.stewart) wrote :

Updated the milestone to that of an active release, so it should show up on the searches now.

Changed in gnome-power-manager (Ubuntu):
milestone: ubuntu-10.10-beta → oneiric-alpha-3
Changed in gnome-power-manager (Ubuntu):
milestone: oneiric-alpha-3 → ubuntu-11.10-beta-1
Martin Pitt (pitti)
Changed in gnome-power-manager (Ubuntu):
milestone: ubuntu-11.10-beta-1 → ubuntu-11.10-beta-2
Revision history for this message
Martin Pitt (pitti) wrote :

gnome-power-manager is no more in oneiric. Does that still affect oneiric, which has indicator-power?

affects: gnome-power-manager (Ubuntu) → indicator-power (Ubuntu)
Changed in indicator-power (Ubuntu):
milestone: ubuntu-11.10-beta-2 → none
status: New → Incomplete
Changed in indicator-power (Ubuntu):
status: New → Confirmed
Martin Pitt (pitti)
Changed in indicator-power (Ubuntu):
milestone: none → ubuntu-11.10-beta-2
Revision history for this message
Javier Jardón (jjardon) wrote :

The ui spec proposed by mpt was implemented in the current indicator-power. See https://wiki.ubuntu.com/BatteryStatusMenu#Items

Changed in indicator-power:
status: New → Fix Released
Changed in indicator-power (Ubuntu):
status: Incomplete → Fix Released
Gabor Kelemen (kelemeng)
Changed in ubuntu-translations:
status: Triaged → Fix Released
Tim Penhey (thumper)
Changed in ayatana-ubuntu:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.