Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 385529 - gnome-extra/gnome-power-manager-2.32* lists duplicate batteries after suspend/resume
Summary: gnome-extra/gnome-power-manager-2.32* lists duplicate batteries after suspend...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://bugzilla.gnome.org/show_bug.c...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-03 17:58 UTC by Charles G Waldman
Modified: 2012-01-31 08:36 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for duplicate battery bug (gnome-power-manager-2.32.0-fix-duplicate-battery.patch,410 bytes, patch)
2011-10-03 17:59 UTC, Charles G Waldman
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Charles G Waldman 2011-10-03 17:58:47 UTC
gnome-power-manager-2.32.0-r2 shows duplicate battery entries after a suspend/resume cycle

Reproducible: Always

Steps to Reproduce:
1. suspend
2. resume
3. open gnome-power-manager
Actual Results:  
duplicated batteries listed

Expected Results:  
one list entry per physical battery

This patch fixes the problem

gnome-power-manager-2.32.0-fix-duplicate-battery.patch

Source: 
https://code.launchpad.net/~psusi/ubuntu/natty/gnome-power-manager/fix-duplicate-battery




--- src/gpm-engine.c-orig	2011-09-27 06:56:28.947037886 -0500
+++ src/gpm-engine.c	2011-09-27 06:56:43.907038004 -0500
@@ -883,8 +883,6 @@
 static void
 gpm_engine_device_added_cb (UpClient *client, UpDevice *device, GpmEngine *engine)
 {
-	/* add to list */
-	g_ptr_array_add (engine->priv->array, g_object_ref (device));
 	gpm_engine_check_recall (engine, device);
 
 	gpm_engine_recalculate_state (engine);
Comment 1 Charles G Waldman 2011-10-03 17:59:48 UTC
Created attachment 288703 [details, diff]
patch for duplicate battery bug

patch copied from:  https://code.launchpad.net/~psusi/ubuntu/natty/gnome-power-manager/fix-duplicate-battery
Comment 3 Jacek 2011-10-11 09:10:27 UTC
> 
> :-(

I don't agree. This patch works excellent on my x201. Of course you need new kernel or one with patch http://ns.spinics.net/lists/linux-acpi/msg32437.html

regards
Comment 4 Pacho Ramos gentoo-dev 2012-01-31 08:36:19 UTC
+*gnome-power-manager-2.32.0-r3 (31 Jan 2012)
+
+  31 Jan 2012; Pacho Ramos <pacho@gentoo.org>
+  +files/gnome-power-manager-2.32.0-duplicated-battery.patch,
+  +gnome-power-manager-2.32.0-r3.ebuild, -gnome-power-manager-2.32.0-r1.ebuild,
+  -gnome-power-manager-2.32.0.ebuild:
+  Apply ubuntu patch to fix duplicated batteries (bug #385529 by Charles G
+  Waldman and Jacek) as I neither suffer any regression with kernel 3.0.x. Drop
+  old.
+