Battery status line too long

Bug #619816 reported by David Barth on 2010-08-18
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ayatana Ubuntu
Medium
Karl Lattimer
Ubuntu Translations
Medium
Unassigned
indicator-power
Fix Released
Undecided
Unassigned
indicator-power (Ubuntu)
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

David Barth (dbarth) on 2010-08-18
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) on 2010-08-23
Changed in gnome-power-manager (Ubuntu):
status: Triaged → In Progress
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.

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
Karl Lattimer (karl-qdh) wrote :

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

Karl Lattimer (karl-qdh) wrote :
Karl Lattimer (karl-qdh) wrote :
Karl Lattimer (karl-qdh) wrote :
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) on 2010-08-25
Changed in ayatana-ubuntu:
status: New → Fix Released
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

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

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.

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.

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

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

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.

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.

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.

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) on 2010-09-24
Changed in ubuntu-translations:
status: New → Triaged
importance: Undecided → Medium
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

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.

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)

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

racecar56 (racecar56) wrote :

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

Maxim Levitsky (maximlevitsky) wrote :

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

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

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) on 2011-08-31
Changed in gnome-power-manager (Ubuntu):
milestone: ubuntu-11.10-beta-1 → ubuntu-11.10-beta-2
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) on 2011-08-31
Changed in indicator-power (Ubuntu):
milestone: none → ubuntu-11.10-beta-2
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) on 2011-12-16
Changed in ubuntu-translations:
status: Triaged → Fix Released
Tim Penhey (thumper) on 2012-01-26
Changed in ayatana-ubuntu:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers