Battery monitor on PPC

James Tappin james at tappin.me.uk
Tue Feb 1 20:33:47 CET 2005


The battery plugin doesn't work on PPC machines. I posted this to the user
list a few days back to see if any one knew anything about it, and getting
no replies did a bit of further nosing around.

It appears that Macs (and other similar architectures) don't use either
APM or ACPI, but a protocol called PMU. The battery information is
contained in /proc/pmu/battery_0 (and potentially battery_1), and the
definitions are in /usr/include/linux/pmu.h (which is present on x86
architectures as well).

Typical state files are:
1) On Mains power
james at ephiny:~$ cat /proc/pmu/battery_0

flags      : 00000013
charge     : 4400
max_charge : 4400
current    : 223
voltage    : 12615
time rem.  : 0

2) On battery power
james at ephiny:~$ cat /proc/pmu/battery_0

flags      : 00000011
charge     : 4400
max_charge : 4400
current    : -1048
voltage    : 12419
time rem.  : 15114

Is this enough information to add PMU support to the plugin and if not
what else is needed?

Best regards,
	James


-- 
James Tappin,             O__      "I forget the punishment for using
james at tappin.me.uk       --  \/`    Microsoft --- Something lingering
http://www.tappin.me.uk/            with data loss in it I fancy"  



More information about the Xfce4-dev mailing list