gnome-power-manager adds battery to indicator twice when battery hot-unplugged and plugged back in

Bug #675108 reported by Chow Loong Jin on 2010-11-14
290
This bug affects 81 people
Affects Status Importance Assigned to Milestone
gnome-power
New
Medium
gnome-power-manager (Ubuntu)
Medium
Phillip Susi
Declined for Oneiric by Stéphane Graber
Natty
Undecided
Unassigned

Bug Description

Binary package hint: gnome-power-manager

TEST CASE:
1. Start gnome-power-manager, and check that only one battery is listed in the gnome-power-manager indicator menu.
2. Unplug the battery.
3. Wait until gnome-power-manager's icon changes from a battery with the power icon to just the power icon.
4. Plug the battery back in.
5. Wait until gnome-power-manager's icon changes back into a battery icon.
6. Click on the gnome-power-manager indicator, and notice duplicate entries of the same battery listed.

In addition to this, removing the battery again causes gnome-power-manager to leave one entry behind with the status as "Estimating..."

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: gnome-power-manager 2.32.0-0ubuntu1
Uname: Linux 2.6.37-rc1-hyper1 x86_64
Architecture: amd64
Date: Sun Nov 14 15:07:12 2010
GnomeSessionIdleInhibited: No
GnomeSessionInhibitors: None
GnomeSessionSuspendInhibited: No
MachineType: LENOVO LENOVO3000 Y410
ProcCmdLine: BOOT_IMAGE=/vmlinuz-2.6.37-rc1-hyper1 root=/dev/cryptostuff/root ro splash
ProcEnviron:
 LANGUAGE=en_SG:en
 PATH=(custom, user)
 LANG=en_SG.utf8
 SHELL=/bin/zsh
SourcePackage: gnome-power-manager
dmi.bios.date: 06/17/2008
dmi.bios.vendor: LENOVO
dmi.bios.version: 05CN71WW(V3.09)
dmi.board.name: IGT30
dmi.board.vendor: LENOVO
dmi.board.version: REFERENCE
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: No Enclosure
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnLENOVO:bvr05CN71WW(V3.09):bd06/17/2008:svnLENOVO:pnLENOVO3000Y410:pvr:rvnLENOVO:rnIGT30:rvrREFERENCE:cvnNoEnclosure:ct10:cvrN/A:
dmi.product.name: LENOVO3000 Y410
dmi.sys.vendor: LENOVO

Related branches

lp:~psusi/ubuntu/natty/gnome-power-manager/fix-duplicate-battery
Marc Deslauriers: Approve on 2011-07-29
Michele Damiano Torelli (community): Approve on 2011-07-12
Luke Yelavich: Pending requested 2011-07-10
Ubuntu branches: Pending requested 2011-07-10
Chow Loong Jin (hyperair) wrote :
Hernando Torque (htorque) wrote :

I can confirm this with up-to-date Natty. You might not want to remove the battery when running a 2.6.37-rc6 based kernel, as this can cause a system crash/oops: https://lkml.org/lkml/2010/12/19/90

To reproduce, I simply boot without the battery attached and then attach it while running.

Changed in gnome-power-manager (Ubuntu):
status: New → Confirmed
Changed in gnome-power:
importance: Unknown → Medium
status: Unknown → New
00oo00 (austinloveit) wrote :

More detal info of my battery ATTACHED.

00oo00 (austinloveit) wrote :

bump

Maxim Levitsky (maximlevitsky) wrote :

I posted a patch that fixes that issue, but instead of reviewing it, bugreport was just marked as duplicate of this bug.

The patch is here:
https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/616443/+attachment/2083829/+files/debdiff.diff

tags: added: patch
Phillip Susi (psusi) on 2011-06-13
Changed in gnome-power-manager (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
Phillip Susi (psusi) wrote :

Thanks for the patch Maxim. I have cleaned it up and placed it in a bzr branch so a dev can merge it. I also tested it and verified that it fixed the issue on Natty. I will need to do the same for Oneiric tonight before proposing both branches for merging.

Changed in gnome-power-manager (Ubuntu):
assignee: nobody → Phillip Susi (psusi)
status: Triaged → In Progress
Dmitry Shachnev (mitya57) wrote :

Any progress on this?

Luke Yelavich (themuso) wrote :

Hi Phillip. I'd go ahead and merge the natty branch, but there are a couple of things that need to be done first:

1. I don't see this fix mentioned in any changelog for the oneiric package, and there has not been any new upstream upload for a couple of months for gpm now.
2. SRU paperwork will be needed to get this into natty. Plesae follow the procedure at https://wiki.ubuntu.com/StableReleaseUpdates.

Unsubscribing ubuntu-sponsors for now.

Phillip Susi (psusi) wrote :

This patch fixes a highly visible regression in Natty. I recognize that normally SRU policy requires that bugs be fixed in the development release first, but it appears that Oneiric has some serious changes to g-p-m, and the battery indicator does not even show up at all there now, so I can not even confirm that it suffers from the same issue. It sounds like the problem was caused by changes to different components in natty being out of sync, so it is entirely likely that the oneiric updates render this fix obsolete there. I therefore think that an exception should be granted and this patch should be released as an SRU now.

Stéphane Graber (stgraber) wrote :

Per comment above, accepting Natty task as it's a regression fix and should go as an SRU.
Rejecting the Oneiric task as g-p-m seems to be quite/completely different in Oneiric and we're not even sure if the issue is also there and if it'd be the same fix to resolve it (currently g-p-m doesn't show any applet in Oneiric and will be replaced by an indicator).

Chris Coulson (chrisccoulson) wrote :

This is invalid in oneiric, as the tray icon / indicator code was removed from g-p-m, with the remaining parts being moved to gnome-settings-daemon

Changed in gnome-power-manager (Ubuntu):
status: In Progress → Invalid
Changed in gnome-power-manager (Ubuntu Natty):
status: New → Confirmed
David Gomes (davidgomes) wrote :

I never removed the battery, i only unplugged and replugged the AC Power Cable, and I get duplicate battery status, on Ubuntu 11.04 64bits.

Marc Deslauriers (mdeslaur) wrote :

SRU request:

Impact: Users running natty get a duplicate battery in the power icon when unplugging and replugging either a battery, or the AC power cable. This is a regression from previous releases.

Problem has been addressed with a minimal patch, and update has been uploaded to natty-proposed.

Thanks.

Zach (dexter20082001) wrote :

This bug affects me as well on a Toshiba Satellite L505D-S5983. As soon as I unplug my ac adapter I get 2 batteries showing and continue showinf once ac power is plugged back. Its quite the annoyance. I hope the fix gets added soon.

Changed in gnome-power-manager (Ubuntu):
status: Invalid → Confirmed
description: updated

Hello Chow, or anyone else affected,

Accepted gnome-power-manager into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in gnome-power-manager (Ubuntu Natty):
status: Confirmed → Fix Committed
tags: added: verification-needed
isotope (vadim-ryazanov) wrote :

I'm having no duplicates after installing proposed update.

Martin Pitt (pitti) on 2011-08-14
tags: added: verification-done
removed: verification-needed
Rogutės (rogutes) wrote :

The update fixed it. Nice work!

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-power-manager - 2.32.0-2ubuntu2.1

---------------
gnome-power-manager (2.32.0-2ubuntu2.1) natty-proposed; urgency=low

  * 16-fix-duplicate-battery.patch: Don't add hot-added battery to device
    list, because libupower-glib already does that (LP: #675108)
    [ Maxim Levitsky <email address hidden> ]
 -- Phillip Susi <email address hidden> Mon, 13 Jun 2011 14:04:01 -0400

Changed in gnome-power-manager (Ubuntu Natty):
status: Fix Committed → Fix Released

This has fixed the duplicate problem. I still see the "(estimating...)" instead of a battery time remaining when I click on the battery icon in the panel. I am waiting to see if that resolves itself after the g-p-m collects more data or if this issue still remains.

the same problem in Natty 64-bit on Acer Travelmate with all the latest updates...
when does the fix will be released?

Dmitry Shachnev (mitya57) wrote :

@Richard, Jan:
See bug 629258 about that.

micred (tict) wrote :

Hi guys, I've found a regression on my laptop (Dell Latitude E6500).

Stutus before upgrading to 2.32.0-2ubuntu2.1:
Duplicate entries of the same battery listed but no "estimating" bug.

Status after upgrading to 2.32.0-2ubuntu2.1:
Clicking on g-p-m icon show up two lines: one for my actual battery and one is now an empty string.
If I click on it gnome-power-statistics crashes:

/usr/bin/gnome-power-statistics --device /org/freedesktop/UPower/devices/battery_BAT1
**
ERROR:gpm-upower.c:688:gpm_device_state_to_localised_string: code should not be reached
Annullato

Sideffect: If I unplug AC ubuntu shutdowns because of critical battery (even if the actual battery is full!)

tags: added: testcase
Alexander Hall (compuguy1088) wrote :

I can confirm the regression that post #23 is having (Dell Latitude D620).

michaelcochez (michaelcochez) wrote :

Same problem as post #23 on Dell Latitude 6500
When clicking on the non-existing battery in the power statistics window, the window closes.
I do not have the mentioned side effect though.

Alexander Hall (compuguy1088) wrote :

For people (like me) that are still having this issue, a fix posted on the redhat bugzilla works on ubuntu: https://bugzilla.redhat.com/show_bug.cgi?id=704110#c12

Phillip Susi (psusi) on 2011-10-05
Changed in gnome-power-manager (Ubuntu):
status: Confirmed → Invalid
Michel (michel-crondor) wrote :

Fix as linked in #26 fixes the problem here as well, on a Dell E6400.

Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu laptop testing tracker.

A list of all reports related to this bug can be found here:
http://laptop.qa.ubuntu.com/qatracker/reports/bugs/675108

tags: added: laptop-testing
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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