Version: (using KDE Devel) Installed from: Compiled sources Compiler: gcc 4.1.2 OS: Linux I have a Dell Latitude D820, with two battery bays. Only one battery is present. Solid detects everything : laurens@latitude ~ $ solidshell hardware list details | grep -i bat udi = '/org/freedesktop/Hal/devices/acpi_BAT0' product = 'Battery Bay' (string) Battery.plugged = true (bool) Battery.type = 'PdaBattery|UpsBattery|PrimaryBattery' (0x3) (enum) Battery.chargePercent = 100 (0x64) (int) Battery.rechargeable = true (bool) Battery.chargeState = 'NoCharge' (0x0) (enum) udi = '/org/freedesktop/Hal/devices/acpi_BAT1' product = 'Battery Bay' (string) Battery.plugged = false (bool) Battery.type = 'PdaBattery|UpsBattery|PrimaryBattery' (0x3) (enum) Battery.chargePercent = 0 (0x0) (int) Battery.rechargeable = false (bool) Battery.chargeState = 'NoCharge' (0x0) (enum) But the plasma battery applet shows two batteries, the real one, and a second one that is always 0% (but in fact this is just an empty bay, or an unplugged battery as solid calls it). I believe it would be better to hide empty bays. I've taken a look at the sources, and it seems that the powermanager datasource can handle unplugged batteries, but that the battery applet isn't using this information. The patch at http://bugs.kde.org/show_bug.cgi?id=153398 may have something to do with this.
Some more details : I'm using the trunk svn of today (2008/01/07). The "show the state for each battery present" option is on, when it's off, the applet indicates a 50% charge (which is false, the single battery is full).
I would like to see this changed too. When removing a battery from a bay, the slot for this battery should be removed from the applet instead of showing a battery at 0%.
*** Bug 156597 has been marked as a duplicate of this bug. ***
Maybe there is a possibility of automatic checking if second battery slot is used at all? I have compaq nx6310, adding second battery is optional and most nx6310 users have only one battery. I don't consider buying another one, and as a result if I check "Show the state for each battery present" I will get one useless battery icon. If I don't check this option I have only one icon but state is marked as 50% which is technically correct but it is not correct from user perspective. In Bug #156597, someone stated that "I'd like two have a list where I can select which battery I want to see and include into the summary.". It is not the best way to fix this. I could live with this and configure it for me, but much better way of fixing this is to remove useless icon from applet instead of showing a battery at 0%. (as stated in comment #2)
The powermanagement dataengine offers the bool value "Plugged in" for the battery. The applet should only display the battery if this value is true.
Piotr: the computer can't know that you never plan to use that slot. I agree that having an empty bay bring the total down to 50% is wrong. I'm not sure if I agree with completely hiding empty bays. I was thinking that I'd want to see whether the laptop was plugged in even if no batteries were in... and then realised just how little sense that makes. :) ok, maybe ignoring empty bays isn't such a bad idea. I think it would also be nice to have the option to show one specific battery - that would allow you to put your batteries in different places on your desktop if you liked, too. but this would be a separate feature request. :)
there we go. people interested in showing individual batteries can vote for bug 156652
Fixed in SVN commit 766875 by sebas: Store data from pm-engine in a QHash. We also want to know if the battery is plugged in. Also, display "No Battery" if it's not plugged in -- and if wanted, per bay.
Thanks for the fix! Will take a look at the result tomorrow.