g-p-m is reporting 2 separate voltage/power levels

Bug #274681 reported by Steve Dee
82
Affects Status Importance Assigned to Milestone
gnome-power
Unknown
High
gnome-power-manager (Ubuntu)
Fix Released
High
Unassigned
Intrepid
Fix Released
High
Unassigned

Bug Description

After yesterday's/today's set of upgrades to Intrepid, gnome-power-manager has started reporting two separate power levels. One, showed on mouse-over and indicated in the tray icon, appears to be wildly incorrect. The other, indicated on left click, seems to show the correct reading.

Revision history for this message
Tom Cameron (drdabbles) wrote :

I can confirm this issue. It appears the applet's hover status hangs. Mine is currently stuck at 82.5% with 3 hours 15 min remaining. When I left-click the icon, I see that I have 61% free.

Revision history for this message
Josh Lee (jleedev) wrote :

I can also confirm this issue.

Changed in gnome-power-manager:
status: New → Confirmed
Revision history for this message
Mathieu Marquer (slasher-fun) wrote :
Revision history for this message
William Grant (wgrant) wrote :

There is potential for data loss (and otherwise extreme inconvenience) here.

Changed in gnome-power-manager:
importance: Undecided → High
Revision history for this message
Mathieu Marquer (slasher-fun) wrote :

Not sure whether this is related to the bug or just a bad luck, but first (and last) time I used my battery a long time with Ubuntu Intrepid Ibex, my battery capacity went from 82% to only 65% (of the original capacity)... :-(

Revision history for this message
James Westby (james-w) wrote :

Hi,

Running g-p-m in debug mode for a bit showed that it is tracking the battery
level ok, and the left-click menu gets it right. It seems to be the icon and
tooltip that stop updating after a couple of minutes.

Thanks,

James

Revision history for this message
Vincenzo Ciancia (vincenzo-ml) wrote :

I gave a false alarm on a duplicate report, because I said that action on critical battery is not performed after suspend. That was due on "use time for policy" being set and the time being a bit wrong. Using percentages or raising the thresholds a little bit makes the laptop react to battery critical events, so the problem is only with the battery indicator. William: you may want to revise priority. I also reported upstream - launchpad is not reporting upstream links for duplicates it seems, I will add it by hand.

Changed in gnome-power:
status: Unknown → New
Revision history for this message
Albert Damen (albrt) wrote :

This issue is caused by patch 19_fix_notification_messages.patch
According to gnome svn, the patch should be made in gpm_cell_array_get_time_until_action. However, "debian/rules patch" applies it in gpm_cell_array_update. Apparently, because upstream already made the change in gpm_cell_array_get_time_until_action, patch gets confused and applies the patch 90 lines later in gpm-cell-array.c:

gnome-power-manager-2.24.0$ patch -p1 < ../19_fix_notification_messages.patch
patching file src/gpm-cell-array.c
Hunk #1 succeeded at 270 with fuzz 2 (offset 90 lines).

I have rebuilt gpm 2.24.0 without this patch, and can confirm this fixes both issues:
- charge percentages shown in mouse-over and left-click are now equal
- battery voltage in power history is now constant, as expected (bug 275845)

Revision history for this message
GodzillaNL (godzillanl) wrote :

Can you please attach a deb file? I will try the patch on my laptop and post the results.

Revision history for this message
Ted Gould (ted) wrote :

Created a package gnome-power-manager_2.24.0-0ubuntu3 that removes this patch. It should have been dropped earlier. It's in my PPA:

http://launchpad.net/~ted-gould/+archive

Changed in gnome-power-manager:
status: Confirmed → Fix Committed
Revision history for this message
Ted Gould (ted) wrote :
Revision history for this message
Vincenzo Ciancia (vincenzo-ml) wrote :

Ted: I installed the package from your ppa and yes, the time goes down in the applet. However, there is something unbelievably different between the tooltip and the left-click. There is a drift between the two reported times - at least, after suspend.

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 274681] Re: g-p-m is reporting 2 separate voltage/power levels

On Mon, 2008-09-29 at 20:03 +0000, Vincenzo Ciancia wrote:
> Ted: I installed the package from your ppa and yes, the time goes down
> in the applet. However, there is something unbelievably different
> between the tooltip and the left-click. There is a drift between the two
> reported times - at least, after suspend.
>

Hi Vicenzo,

I noticed this while testing as well. I delved in to the code to
investigate.

What is happening is that the left-click menu is showing the percentage
reported by the battery via hal. The tooltip is showing a value that is
averaged, somehow based on the past performance of the battery. The two
values converged for me after a few minutes.

I agree that it's confusing, but it seems to be intentional behaviour,
and not critical for the release. Discussing the issue with upstream
is probably a better way to deal with this.

Thanks,

James

Revision history for this message
Vincenzo Ciancia (vincenzo-ml) wrote :

Hmm, agreed. Perhaps this has always been the case and I never noticed that.

Revision history for this message
Daniel T Chen (crimsun) wrote :

I confirm that the latest upload (2.24.0-0ubuntu3) resolves this issue on four different laptop (manufacturers/) models. (Hooray- I can finally remove my xmonad keybinding to restart g-p-m!)

Revision history for this message
Colin Watson (cjwatson) wrote :

This has been fixed, but didn't get closed automatically because the changelog syntax was incorrect. (For future reference - either by Ted or his sponsor - you need to use LP: #nnn rather than LP #nnn.)

gnome-power-manager (2.24.0-0ubuntu3) intrepid; urgency=low

  * Removed 19_fix_critical_message.patch which was applied upstream
    but was still getting applied in other areas of gpm-cell-array.c.
    (LP #274681)

 -- Ted Gould <email address hidden> Mon, 29 Sep 2008 13:26:44 -0500

Changed in gnome-power-manager:
status: Fix Committed → Fix Released
Changed in gnome-power:
importance: Unknown → High
Changed in gnome-power:
status: New → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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