! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
battery plugin does not account for second battery
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Xfce4-battery-plugin
Component:
General

Comments

Description Douglas Breault Jr. 2004-11-07 16:28:14 CET
My dvd drive bay is hotswappable and I can put a secondary battery in there. I
know this is a common feature among many newer laptops, especially the dells.

Currently the battery monitor estimates time only for the second battery if both
are plugged in and when it is dry it doesn't even switch to the first unless I
remove the second.

It would be nice if it would recognize there are two batteries and estimate time
remaining and the power remaining based on both batteries combined.
Comment 1 Aaron Stone 2005-03-02 20:29:07 CET
I have looked at the source code to battery plugin 0.2.0, and it *should*
account for the second battery in my Thinkpad, but it's only showing the
external battery, which is in /proc/acpi/battery/BAT2. If the external battery
isn't plugged in, then it shows BAT0.

I wonder if there's simply a need for code that checks the other battery if the
current battery runs out? I think a good way to handle this would be to start
checking other batteries once the current battery goes below threshold. A highly
useful message might be:

"The current battery (BAT2) has reached 10%. Don't worry, because another
battery (BAT0) has power. Your system will switch over automatically."

Followed a few hours later by:

"The current battery (BAT0) has reached 10%. Time to panic, because no other
batteries have power, either. Go find an outlet!"

Naturally, we'll have to write some more "friendly, yet firm" language ;-)
Comment 2 Chris Lauretano 2005-05-09 13:45:10 CEST
I am experiencing the same with my Thinkpad T42. The battery monitor in Gnome
does this properly (the way it is done in windows) by treating the two batteries
as one larger battery. Dividing total current capacity by total maximum capacity
gives a battery capacity percentage that is linear with respect to time. If
multiple entries lie in the battery folder, add them together, otherwise just
repond the only one that is there.
Comment 3 Mats Lundqvist 2006-07-28 10:31:53 CEST
I've got the same problem as Aaron does. The plugin only accounts for one battery on my Thinkpad X40. The main battery is BAT0 and the external is BAT2. The applet only indicates the level for BAT2 when BAT0 is present.
Comment 4 Julien Devemy 2006-08-13 19:19:58 CEST
In my Dell D600 LapTop, I've also 2 batteries (the extra one is in the media bay), and I use the xfce-genmon-plugin to monitor the 2 batteries.

For more infos, see the screenshot in: http://goodies.xfce.org/projects/panel-plugins/xfce4-genmon-plugin

The source archive includes an "example" script to monitor 2 batteries, if you know a bit of shell scripting, you can easily fit it to your needs.
(Personnaly, I use "zenity" to display an alert box when the batteries reach a very low level.)

But it's a bit more complicated than just using a dedicated plugin...

Juju
Comment 5 deniska 2006-09-08 16:13:50 CEST
 Ppl we are working on this bug. The goal is total fix for multi-battery systems. Will be ready in ~1 month from today.
Comment 6 Nick Schermer editbugs 2006-09-08 16:23:17 CEST
Fine by me, but I've almost finished a hal-based multi battery compatible plugin. Anyway, when the your patch is ready (and it looks ok) I'll apply it.
Comment 7 Harold Aling 2007-02-15 20:15:36 CET
(In reply to comment #5)
>  Ppl we are working on this bug. The goal is total fix for multi-battery
> systems. Will be ready in ~1 month from today.
> 

Is it fixed yet?
Comment 8 Nick Schermer editbugs 2007-02-15 20:52:55 CET
Yep, there is a patch in the latest version which should support multiple batteries.
Comment 9 Yves-Alexis Perez editbugs 2007-11-05 12:23:54 CET
(and is there any news of that hal-based plugin?)

--
Yves-Alexis Perez
Comment 10 Nick Schermer editbugs 2007-11-05 12:42:28 CET
Brian started working on a more advanced power manager which probably also includes a battery kinda plugin. So it better to help Brian here then work alone on something less powerfull.

http://svn.xfce.org/index.cgi/kelnos/browse/xfce-power-manager

Bug #477

Reported by:
Douglas Breault Jr.
Reported on: 2004-11-07
Last modified on: 2010-12-24

People

Assignee:
Xfce-Goodies Maintainers
CC List:
5 users

Version

Version:
0.5.1 or older
Target Milestone:
0.5.1 or older

Attachments

Additional information