! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Battery plugin doesn't support PMU
Status:
RESOLVED: WONTFIX
Severity:
enhancement
Product:
Xfce4-battery-plugin
Component:
General

Comments

Description Yves-Alexis Perez editbugs 2007-08-18 18:55:29 CEST
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
Comment 1 Yves-Alexis Perez editbugs 2007-08-18 18:59:16 CEST
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
Comment 2 Yves-Alexis Perez editbugs 2010-01-11 22:12:45 CET
*** Bug 6145 has been marked as a duplicate of this bug. ***
Comment 3 Enric Morales 2010-01-12 09:05:17 CET
I second this enhancement request. Supporting PMU would be more than useful on my iBook G4 as well.
Comment 4 Yves-Alexis Perez editbugs 2010-01-12 09:23:58 CET
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.

Bug #3476

Reported by:
Yves-Alexis Perez
Reported on: 2007-08-18
Last modified on: 2020-05-21
Duplicates (1):
  • 6145 Battery Charge Incorrect on iBook G4

People

Assignee:
Xfce-Goodies Maintainers
CC List:
2 users

Version

Version:
0.5.1 or older

Attachments

Additional information