HAL-0.5.10 and 0.5.11rc2 both show the battery of my iBook G4 twice in kpowersave. I compiled HAL with PMU support and disabled all APM stuff (emulation) in the kernel (2.6.24). I also installed the latest version of hal-info, but that didn't change it either. Here is the output of "lshal | grep battery": udi = '/org/freedesktop/Hal/devices/pmu_battery_0_0' battery.charge_level.current = 1938 (0x792) (int) battery.charge_level.design = 4316 (0x10dc) (int) battery.charge_level.last_full = 4316 (0x10dc) (int) battery.charge_level.percentage = 44 (0x2c) (int) battery.charge_level.rate = 1980 (0x7bc) (int) battery.is_rechargeable = true (bool) battery.present = true (bool) battery.rechargeable.is_charging = true (bool) battery.rechargeable.is_discharging = false (bool) battery.remaining_time = 4323 (0x10e3) (int) battery.technology = 'unknown' (string) battery.type = 'primary' (string) info.capabilities = {'battery'} (string list) info.category = 'battery' (string) info.udi = '/org/freedesktop/Hal/devices/pmu_battery_0_0' (string) linux.pmu_path = '/proc/pmu/battery_0' (string) linux.sysfs_path = '/sys/devices/platform/pmu-battery.0/power_supply/pmu-ac' (string) udi = '/org/freedesktop/Hal/devices/computer_power_supply_battery_PMU_battery_0' battery.charge_level.current = 1930 (0x78a) (int) battery.charge_level.design = 0 (0x0) (int) battery.charge_level.last_full = 4316 (0x10dc) (int) battery.charge_level.percentage = 44 (0x2c) (int) battery.charge_level.rate = 1980 (0x7bc) (int) battery.is_rechargeable = true (bool) battery.model = 'Smart' (string) battery.present = true (bool) battery.rechargeable.is_charging = true (bool) battery.rechargeable.is_discharging = false (bool) battery.remaining_time = 4338 (0x10f2) (int) battery.reporting.current = 1930 (0x78a) (int) battery.reporting.last_full = 4316 (0x10dc) (int) battery.reporting.rate = 1980 (0x7bc) (int) battery.reporting.unit = 'mWh' (string) battery.technology = 'unknown' (string) battery.type = 'primary' (string) battery.voltage.current = 11791 (0x2e0f) (int) info.capabilities = {'battery'} (string list) info.category = 'battery' (string) info.udi = '/org/freedesktop/Hal/devices/computer_power_supply_battery_PMU_battery_0' (string) linux.sysfs_path = '/sys/devices/platform/pmu-battery.0/power_supply/PMU battery 0' (string) udi = '/org/freedesktop/Hal/devices/platform_pmu_battery_0' info.product = 'Platform Device (pmu-battery.0)' (string) info.udi = '/org/freedesktop/Hal/devices/platform_pmu_battery_0' (string) linux.sysfs_path = '/sys/devices/platform/pmu-battery.0' (string) platform.id = 'pmu-battery.0' (string)
Please attach the full output of lshal
Created attachment 15906 [details] output of lshal on my PPC machine
Created attachment 15907 [details] [review] Patch to add proc PMU-battery only if not available via sysfs (power_supply) Please try this patch agains git/0.5.11-RC2
Created attachment 15908 [details] output after applying the patch
So, just for the sake of completeness and as information for everybody: The problem of the battery shown twice is caused by the sysfs power_supply option in the kernel. Disabling it makes everything work as expected immediately. The sysfs device is not yet aware of the AC events. So until this gets fixed, we need to go with the /proc approach. The kernel guys know of it and will probably do something about it...
Commited fix to git.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.