Hi, the battery plugin currently doesn't handle battery status trough PMU. It works using apm_pmu module, but it's deprecated in Linux kernel, so it'd be nice to have pmu support native in battery plugin. I know ppc hardware (and especially laptops) will be deprecated at some time, but as they won't run recent osx, maybe some people will want to install Linux on them, so having software support would be nice. Anyway, if you need informations about pmu and how to access battery informations, please ask. Three examples: 1) Battery charged, plugged on AC corsac@hidalgo: cat /proc/pmu/battery_0 flags : 00000011 charge : 3269 max_charge : 3427 current : 0 voltage : 12359 time rem. : 0 2) Battery discharging corsac@hidalgo: cat /proc/pmu/battery_0 flags : 00000011 charge : 3272 max_charge : 3440 current : -1365 voltage : 12105 time rem. : 8629 3) Battery charging corsac@hidalgo: cat /proc/pmu/battery_0 flags : 00000013 charge : 3251 max_charge : 3440 current : 1276 voltage : 12513 time rem. : 533 (times are seconds, I'd say) Please ask if you need more informations. Regards, -- Yves-Alexis Perez
Other informations available in /proc: corsac@hidalgo: ls /proc/pmu total 0 -r--r--r-- 1 root root 0 2007-08-18 20:58 battery_0 -r--r--r-- 1 root root 0 2007-08-18 20:58 info -r--r--r-- 1 root root 0 2007-08-18 20:58 interrupts -rw------- 1 root root 0 2007-08-18 20:58 options corsac@hidalgo: cat /proc/pmu/info PMU driver version : 2 PMU firmware version : 0c AC Power : 1 Battery count : 1 corsac@hidalgo: cat /proc/pmu/interrupts 0: 0 (Total CB1 triggered events) 1: 173762 (Total GPIO1 triggered events) 2: 0 (PC-Card eject button) 3: 0 (Sound/Brightness button) 4: 0 (ADB message) 5: 0 (Battery state change) 6: 173760 (Environment interrupt) 7: 0 (Tick timer) 8: 0 (Ghost interrupt (zero len)) 9: 4 (Empty interrupt (empty mask)) 10: 1 (Max irqs in a row) corsac@hidalgo: sudo cat /proc/pmu/options lid_wakeup=1 server_mode=0 Regards, -- Yves-Alexis Perez
*** Bug 6145 has been marked as a duplicate of this bug. ***
I second this enhancement request. Supporting PMU would be more than useful on my iBook G4 as well.
It won't be done (no need to reinvent the wheel once again, especially since PMU is just dead) (I know it's sad, and I do have a ppc mac, but still, this is just the truth). What will be done at some point is that Ali (xfpm developer) has plans to take over battery plugin and use it as a frontend for hal/devicekit-power/upower/whatever. So it'll work (it already works in git afair) for people not wanting to use xfpm, *as long as* the backend supports PMU (and I think hal does). The thing is, there'll be no release until the situation is settled down wrt. the backend. It's a huge mess atm (hal/devicekit-power/upower/whatever) so you'll have to wait a bit more.