teleshoes/tpbattstat-applet — Issue #8: tpacpi-bat: charge thresholds not honored
Author: xlz
Created: 2012-01-27 22:12:18+00:00
State: open

I tested `tpacpi-bat` with my S420 (~=E420s). It has only one battery. All calls only work with battery `1` not `0`, except `inhibitCharge`. But `inhibitCharge 1 0` will cause hard freeze, so I have to use `inhibitCharge 0 0` to turn it off.

The primary goal is to set charge threshold, but it seems not honored. The battery keeps charging after its remaining capacity is higher than the set threshold. The return codes also seem changed:

root@laptop:# ./tpacpi-bat -v stopChargeThreshold 1 99; ./tpacpi-bat -v stopChargeThreshold 1; ./tpacpi-bat -v startChargeThreshold 1
Call : \_SB.PCI0.LPCB.EC0.HKEY.BCSS 0x163
Response: 0x0
Call : \_SB.PCI0.LPCB.EC0.HKEY.BCSG 0x1
Response: 0x3e3
227
Call : \_SB.PCI0.LPCB.EC0.HKEY.BCTG 0x1
Response: 0x3e3
227
root@laptop:# ./tpacpi-bat -v stopChargeThreshold 1 0; ./tpacpi-bat -v stopChargeThreshold 1; ./tpacpi-bat -v startChargeThreshold 1
Call : \_SB.PCI0.LPCB.EC0.HKEY.BCSS 0x100
Response: 0x0
Call : \_SB.PCI0.LPCB.EC0.HKEY.BCSG 0x1
Response: 0x380
128
Call : \_SB.PCI0.LPCB.EC0.HKEY.BCTG 0x1
Response: 0x380
128

And `startChargeThreshold` call has the same effect as `stopChargeThreshold`. Okay, is it that Lenovo thinks we only need `stopChargeThreshold`? But at least one should work.

Any suggestion on what I can do or test now? I have enough time to read the `DSDT.dsl` of mine and the ACPI spec to hack this.