Skip to content

tpacpi-bat: charge thresholds not honored #8

@xlz

Description

@xlz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions