Echoes Corsac.net - Echoes camshot
dimanche 06 avril 2008 (2 posts)

Using Xfce on your laptop running Debian? The battery plugin is unusable? Don't panic, we're aware of this.

Basically, the situation is a mess, for some reasons:

  • upstream plugin only supports reading in /proc/acpi and /proc/apm
  • /proc/acpi now only exists if CONFIG_ACPI_PROCFS_POWER=y in the current kernel config
  • CONFIG_ACPI_PROCFS_POWER is deprecated and may be dropped in 2.6.26
  • there's no warranty CONFIG_ACPI_PROCFS_POWER will be set for kernel shipped in Lenny

There is an open bug in Debian and in Xfce where we track the situation. Somebody proposed on the Xfce bug a patch to enable sysfs support on the battery plugin, and we integrated this patch on Debian (starting 0.5.0-3), but the patch is not really good, as it hardcodes too many things, and especially the directory names (it uses AC and BAT* while some people are know to have ACAD). So with the sysfs patch included, the plugin doesn't work at all on some users's config.

The next plan is to remove this sysfs patch and revert to procfs, until we know better how everything will be in Lenny.

In the meantime, Nick Schermer is hacking on a hal based branch of the battery plugin. I'm currently running it daily, and it works fine. Nearly all the low-level work is let to hal, and the battery plugin only takes care of the display, in Xfce panel. This is nice, but add a dependency on hald for the battery plugin, wich is something some user may not want. At first, I thought it would be better to release Lenny with 0.5.0 battery plugin and only after switch to the hal based one, and add the hald dep, especially since the plugin is still kind of experimental. But seeing the mess it is currently, we may have to switch before, and sooner than we thought.

[EDIT]: xfce4-battery-plugin_0.5.0-6 was just ACCEPTED. It contains a fixed sysfs patch which fixes the “hardcode” problem. Thanks to Daniel Gibson!

Yves-Alexis Perez@01:21:50 (Debian)

Images
Stats
  • 1526 posts
  • 7981 jours
  • 0.19 posts/jour
  • IRC
  • Last.fm
Stuff
Tech
Weblogs
Desktop