Bug 373041 - HAL reports incorrectly two batteries in an HPDV4000 laptop
HAL reports incorrectly two batteries in an HPDV4000 laptop
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
i386 Linux
low Severity medium
: ---
: ---
Assigned To: David Zeuthen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-11-09 10:57 EST by Fabio Comolli
Modified: 2013-03-05 22:53 EST (History)
6 users (show)

See Also:
Fixed In Version: 8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-08-01 19:52:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Output of lshal (9.53 KB, application/x-gzip)
2007-11-09 10:57 EST, Fabio Comolli
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
FreeDesktop.org 13669 None None None Never

  None (edit)
Description Fabio Comolli 2007-11-09 10:57:02 EST
Description of problem:

kpowersave shows two batteries while my laptop has one only. The cause seems to
be that HAL reports two batteries present in my laptop even if there's only one.

Version-Release number of selected component (if applicable): hal-0.5.10-1.fc8

How reproducible: always

Steps to Reproduce:
1. start kpowersave
Actual results:
It reports two batteries

Expected results:
It should report only one battery

Additional info:

The output of lshal shows that there are two UDI's with info.capabilities = {
'battery' }:

udi = '/org/freedesktop/Hal/devices/acpi_BAT0'
udi = '/org/freedesktop/Hal/devices/computer_power_supply_0'

the first one is the correct one.

A temporary fix for the problem is to clear info.capabilities for the 2nd entry:

hal-set-property --udi '/org/freedesktop/Hal/devices/computer_power_supply_0'
--key info.capabilities  --strlist-rem 'battery'
Comment 1 Fabio Comolli 2007-11-09 10:57:02 EST
Created attachment 252951 [details]
Output of lshal
Comment 2 Orion Poplawski 2008-06-16 18:30:39 EDT
Any chance we can get this fixed?  This is basically happening on all laptops. 
Looks like a fix has been committed upstream.
Comment 3 W.C. Epperson 2008-07-09 21:42:33 EDT
Confirmed on Dell Latitude D600 (i386), showing 4 batteries with 2 installed. 
Severe impact is that the bogus entries (which do not show model or serial)
appear to report premature discharge, causing gnome-power-manager to fire
shutdown while actual batteries have plenty of charge left.  Forces use of
non-Linux OS for untethered operation.  The freedesktop.org external bug
referenced was closed as fixed in early March (and is for 

hal-0.5.10-3.fc8 just hit repos, does not fix.
hal-set-properties temporary fix noted in bug report does not fix.
Comment 4 Éric Brunet 2008-07-11 14:26:26 EDT
Same here with a Dell 630. The problem appeared with kernel 
which is the first with CONFIG_ACPI_SYSFS_POWER=y. The previous kernel,, has this option unset and works as expected.

I tried to recompile a hal with the patch found in 
and indeed there was only one battery visible in hal and kpowermanager. 
However, kpowermanager was still confused and it would only update the charge 
level of the battery when a plug or an unplug event occured, and it was unable 
to compute or display the time remaining.

To me, it looks like the simplest fix is to unset the option 
Comment 5 W.C. Epperson 2008-07-11 15:44:49 EDT
I suspect the core issue is the same as with Bug 454954, which also began
occurring with the first 2.6.25 kernel.
Comment 6 Kyle McMartin 2008-07-12 13:41:38 EDT
Please try the rpms I scratch built here with CONFIG_ACPI_SYSFS_POWER turned off
and let me know if it fixes the issues you've seen:

cheers, Kyle
Comment 7 Éric Brunet 2008-07-12 16:27:50 EDT
Yes, the kernel in kernel- does fix for me the issue 
with kpowermanager seeing two batteries; thanks for the rpm.

(Side note: I have fedora 8, your kernel is for fedora 9. While installing it, 
rpm complained about mkinitrd not recent enough. Installing with --nodeps, 
there was an error in the %posttrans scriplet. But it booted anyway and seems 
to be working very nicely.)
Comment 8 Kyle McMartin 2008-07-14 19:59:07 EDT
Ok, a F8 kernel is available here if that will help, but I guess it sorts out
your issue, and that the other bug might be unrelated.


cheers, Kyle
Comment 9 W.C. Epperson 2008-07-14 21:38:10 EDT
The build in task 714370 cures the two battery bug, and also breaks resume on
the Dell D6x0 due to inclusion of a 20-video-quirk-pm-dell.fdi with
<merge key="power_management.quirk.radeon_off" type="bool">true</merge>
missing under
<match key="system.hardware.product" contains_outof="D600;D610;D630">

This broken fdi began shipping with kernels at the same time that
CONFIG_ACPI_SYSFS_POWER was turned on.  Fortunately I'd already tracked it down
previously and knew how to fix it.  It's been reported to

This kernel unfortunately and surprisingly does not fix bug 454954, which also
began at the time CONFIG_ACPI_SYSFS_POWER was turned on.
Comment 10 Éric Brunet 2008-07-15 04:28:20 EDT

I am happy with the FC9 kernel, and I won't try your FC8 kernel unless you 
think it is necessary. Do you ?

Thanks for fixing this bug.
Comment 11 Jason Tibbitts 2008-08-01 17:23:09 EDT
I'm pretty sure that this has been fixed now.  After updating to
kernel- I found that the phantom battery has disappeared.
Comment 12 W.C. Epperson 2008-09-14 22:04:04 EDT
The problem is back in  This just bites.  Also see bug 452356.
Comment 13 Kyle McMartin 2008-09-14 22:21:38 EDT
Sorry, looks like the F9 kernel config got copied over the F8 one during an update, and this got turned back on. Fixed again. Really, should just fix Hal, but by the time that happens, F10 will be out and F8 will be gone.

regards, Kyle
Comment 14 W.C. Epperson 2008-09-15 11:20:29 EDT
And with any luck F10 won't have a broken network installer (preupgrade) and will have some of the missing stuff put back in (e.g. gdmsetup).  F9 has not been viable for us for those reasons.

By the time hal is fixed across the board, we'll have peace on earth.  I just had to patch my local 20-video quirk again.
Comment 15 W.C. Epperson 2008-10-02 18:49:03 EDT
And hooray, the fix finally made it to the F8 repo.
Fixed in

Note You need to log in before you can comment on or make changes to this bug.