You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
The text was updated successfully, but these errors were encountered:
im sorry; i only have a w520 and i dont see those codes.
yea, bat=0 behaves inconsistently for me.
if you work out what to do, please post back and ill test it with mine immediately and merge it in. good luck!
as a workaround, if inhibitCharge works, you could write a script that wakes up every 5 minutes and inhibitsCharge for 5 minutes if the battery life is over a given threshold.
rem=`cat /proc/acpi/battery/BAT0/state | grep remaining | grep -o '[0-9]*'`
full=`cat /proc/acpi/battery/BAT0/info | grep last | grep -o '[0-9]*'`
thresh=80
if [ `echo "$rem/$full*100 > $thresh" | bc -l` == 1 ]; then tpacpi-bat inhibitCharge 0 5; fi
I mean, how did you figure out this black magic? I want to work further on this direction, only if I know the right method. My code reading stopped here:
I tested
tpacpi-bat
with my S420 (~=E420s). It has only one battery. All calls only work with battery1
not0
, exceptinhibitCharge
. ButinhibitCharge 1 0
will cause hard freeze, so I have to useinhibitCharge 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:
And
startChargeThreshold
call 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.dsl
of mine and the ACPI spec to hack this.The text was updated successfully, but these errors were encountered: