Thursday, January 31, 2008

HAL: sysfs ACPI batteries fixed

With the recently released linux kernel v2.6.24 and if configured with ACPI_PROCFS_POWER and ACPI_SYSFS_POWER, you get now two ACPI battery interfaces in the system. One, as before, under /proc/acpi/battery/ and a new in the power_supply subsystem in the sysfs under /sys/class/power_supply/ . HAL listed both batteries, which was fixed by show the proc batteries only if there is no power_supply battery in the system [1]. Unfortunatly the sysfs battery was never updated (except on add/remove events of the AC adapter). This could lead, besides missing information updates, to a system crash on empty batteries if the userspace tools as e.g. KPowersave trusted these information. They never reached critical battery levels in this case.

I have now fixed this problem in HAL git master with several patches (last one was this), which also fix the power_supply battery handling in general (since it were several bug in the code). HAL poll now the power_supply ACPI batteries every 30 seconds as HAL already does for proc batteries. The code should work basicly, but I assume there are some corner cases left. Need to check the existing ACPI code for the proc batteries to find and port them. Maybe it make sense to split up the ACPI sysfs battery part from the existing power_supply handling to merge it into the existing ACPI code ... we will see.

I have added an updated HAL version for openSUSE factory (and for openSUSE 10.3 as testing package) to my OSBS HAL project repo and to the next Alpha2 of openSUSE 11.0. Fell free to test and report problems.

Tech Tags:

Friday, January 11, 2008

Fixed KDBus

I commited today two fixes to the KDE SVN to make KDBus usable again on DBus method calls:

  • fixed show the input widgets for input/output method parameters, show in the 'Output:' section only the output and not again also the input parameter widgets [1]
  • fixed handling of boolean method parameters, now you should be able to call e.g.  SetPowerSave(bool) on the org.freedesktop.Hal.Device.SystemPowerManagement interface again without errors [2]

Updated RPM packages are already available for openSUSE 10.2 - openSUSE Factory and SUSE Linux Enterprise (Desktop) 10 as always in my openSUSE Build Service project.

Tech Tags: