After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 338634 - system batteries are listed in the reverse order
system batteries are listed in the reverse order
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: general
2.15.x
Other All
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-04-15 17:47 UTC by Paul Ionescu
Modified: 2006-04-15 22:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
here is a screenshot that shows the described behaviour (45.25 KB, image/jpeg)
2006-04-15 18:37 UTC, Paul Ionescu
Details
lshal output with the extra battery removed (96.70 KB, text/plain)
2006-04-15 21:00 UTC, Paul Ionescu
Details

Description Paul Ionescu 2006-04-15 17:47:37 UTC
I have 2 batteries in my laptop, the usual one, and one extra battery that fits in the DVD bay.
The acpi and HAL correctly place the batteries in the normal order (first the regular/system battery in /proc/acpi/battery/BAT0, then the extra battery in /proc/acpi/battery/BAT1 ).
The gpm displays the battery info in the reverse order, first the extra battery, then the regualar one.
It should be the other way around.
Comment 1 Paul Ionescu 2006-04-15 18:37:18 UTC
Created attachment 63599 [details]
here is a screenshot that shows the described behaviour
Comment 2 Richard Hughes 2006-04-15 18:59:37 UTC
Hmm. We get the order from the capability request, so I'm lost why HAL would re-arrange the order. Can you attach a lshal please.

Thanks.
Comment 3 Paul Ionescu 2006-04-15 21:00:43 UTC
Created attachment 63607 [details]
lshal output with the extra battery removed
Comment 4 Richard Hughes 2006-04-15 21:10:50 UTC
2006-04-15  Richard Hughes  <richard@hughsie.com>
 * src/gpm-power.c (battery_kind_cache_add_device): Make sure we add the new device to the *end*, not the *start* of the device list. Should fix #338634, where the batteries are listed in the reverse order to what ACPI and HAL reports.

Please can you confirm that this does indeed fix the problem. Thanks Paul,

Richard.
Comment 5 Paul Ionescu 2006-04-15 22:35:51 UTC
Hi Richard,

I confirm that it fix the problem.

Thx,
Paul