Contributed by
marco
on
from the ACPI-starts-spilling-beans dept.
More ACPI news. Jordan did a bunch of work and now we can actually read values out of batteries and stuff with AML. This makes the code almost useful! So for debugging purposes I rigged the acpibat and acpiac devices to export some useful data through the sensors framework. Word of warning here, this is for debug only! Pretty cool to see the battery charge/discharge and other status percolate to userspace. And in good debug fashion I found out that we are leaking some memory somewhere which causes the updates to seize after a while. Jordan is plugging memory leaks as we speak. Anyway Jordan is making solid progress and I am just simply using it in the little device drivers. What is important here is that we already have received some reports from the field that it works. We have also received some pretty useful bug reports which are being fixed as soon as we get to it. More later.
Here is some output:
hw.sensors.0=acpiac0, power supply, indicator, On
hw.sensors.1=acpibat0, last full capacity, percent, 76.00%
hw.sensors.2=acpibat0, warning capacity, percent, 10.00%
hw.sensors.3=acpibat0, low capacity, percent, 10.00%
hw.sensors.4=acpibat0, voltage, OK, volts_dc, 11.10 V
hw.sensors.5=acpibat0, battery charging, OK, raw, 0
hw.sensors.6=acpibat0, rate, raw, 1
hw.sensors.7=acpibat0, remaining capacity, percent, 100.00%
hw.sensors.8=acpibat0, current voltage, OK, volts_dc, 12.54 V
Fun statistic is the "last full capacity". In my case you can see that my battery has lost 24% of capacity since I got it. I guess this is the statistic no one wants to advertise :-)
(Comments are closed)
Comments
By
Simon (84.57.78.203)
on
Nice to hear that there's so much progress on the ACPI field.
Looking forward to use/test it.
By
Anonymous Coward (217.31.185.139)
on
It would be nice to have some discharge limiting when on battery... Thinkpads are supposed to turn off when there's 4% left in the battery, or else the lifetime of the battery gets shortened (according to IBM FYI).
Otherwise, nice work on acpi!
Comments
By
Marco Peereboom (67.64.89.177)
on
That's the "low capacity" entry. I wear through batteries like no one else so I am not surprised its this far down since i got it (less than a year ago). I ordered some more :-)
By
Anonymous Coward (68.125.87.215)
on
"hw.sensors.1=acpibat0, last full capacity, percent, 76.00%"
By Simon (84.57.78.203) on
Looking forward to use/test it.
By Anonymous Coward (217.31.185.139) on
Otherwise, nice work on acpi!
Comments
By Marco Peereboom (67.64.89.177) on
By Anonymous Coward (68.125.87.215) on
Very nice function.