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.
I tested
tpacpi-batwith my S420 (~=E420s). It has only one battery. All calls only work with battery1not0, exceptinhibitCharge. ButinhibitCharge 1 0will cause hard freeze, so I have to useinhibitCharge 0 0to 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:
And
startChargeThresholdcall has the same effect asstopChargeThreshold. Okay, is it that Lenovo thinks we only needstopChargeThreshold? But at least one should work.Any suggestion on what I can do or test now? I have enough time to read the
DSDT.dslof mine and the ACPI spec to hack this.