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 89681 - Battery applet doesn't work with two batteries
Battery applet doesn't work with two batteries
Status: RESOLVED FIXED
Product: gnome-applets
Classification: Other
Component: battery
2.0.x
Other Linux
: High normal
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
: 84847 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-08-02 07:30 UTC by Hanno Böck
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for battstat_applet to support two batteries. (2.70 KB, patch)
2002-09-29 17:50 UTC, Hanno Böck
none Details | Review
battstat_two_batteries_v2.diff (4.20 KB, patch)
2002-10-06 16:55 UTC, Hanno Böck
none Details | Review
battstat_two_batteries_v3.diff (4.24 KB, patch)
2002-10-15 12:35 UTC, Hanno Böck
none Details | Review

Description Hanno Böck 2002-08-02 07:30:16 UTC
The GNOME2 Battery Applet is not able to handle my laptop with two
batteries correct.
If one battery is empty and the other one is full, I get a warning about
low battery. I assume it only checks for BAT1.
On my System, I have
/proc/acpi/battery/BAT1
/proc/acpi/battery/BAT2

(I have a Sony Vaio PCG-GR114MK and I use kernel 2.4.18 with the newest
acpi-patch from www.sf.net/projects/acpi/).

If you need any further information, contact me.
Comment 1 Hanno Böck 2002-09-29 17:50:37 UTC
Created attachment 11305 [details] [review]
patch for battstat_applet to support two batteries.
Comment 2 Hanno Böck 2002-09-29 17:52:48 UTC
Patch attached which makes it possible for battstat to work correct
with two batteries.
It does not check if there are more than two batteries. I don't know
if there are laptops that can have more than two batteries at the same
time. If yes, then we should enhance it even more.
Comment 3 Hanno Böck 2002-10-06 16:55:14 UTC
Created attachment 11422 [details] [review]
battstat_two_batteries_v2.diff
Comment 4 Hanno Böck 2002-10-06 16:57:18 UTC
New patch added. It now scans /proc/acpi/battery/ and
/proc/acpi/ac_adapter, because I got reports that some people have a
BAT0 or have an ac_adapter AC and not ACDC.
Comment 5 Hanno Böck 2002-10-15 12:35:44 UTC
Created attachment 11556 [details] [review]
battstat_two_batteries_v3.diff
Comment 6 Hanno Böck 2002-10-15 12:36:43 UTC
Again an update for the patch, as v2 was quite unstable (forgot to
close directories).

Is anyone reading this bug? I posted it two months ago, made a fix and
simply got no reply.
Comment 7 Kevin Vandersloot 2002-10-15 16:36:03 UTC
Hi Hanno. I'm the maintainer of gnome-applets. I'm sorry that noone
has looked at your patch. The problem with me is that I don't have a
laptop to test with so i'm hesitant to apply the patch. Maybe you
could ask on desktop-devel-list to see if anyone understands the
battery code and can review it?
Comment 8 Hanno Böck 2002-10-15 16:45:59 UTC
I already posted to desktop-devel-list, but got no replys.
I also sent the patch to acpi-devel and got positive feedback from
some people.
Well, the patch is quite trivial. Only thing is that it does no longer
use hardcoded battery- and ac-information, but scans the /proc-dirs
for them.
v3 should be quite stable now.
Comment 9 Hanno Böck 2002-10-22 09:54:13 UTC
To Kevin: It seems that you need someone who is responsible for the
battery-applet.
I could do some work on it. If you need my help, contact me. I have
been working on these acpi-issues for some time.
bug #88553 seems to address similar issues.
Comment 10 Kevin Vandersloot 2002-10-25 22:13:45 UTC
*** Bug 84847 has been marked as a duplicate of this bug. ***
Comment 11 Kevin Vandersloot 2002-11-22 22:15:36 UTC
Patch has been applied.

Hanno: Does your patch really fix the problem? - that is, if battery 1
is empty will battstat now skip battery 1 and check battery 2? If so
then you can close this bug.