Page 1 of 1

T420s Linux force discharge on battery (two battery use)

Posted: Tue Aug 05, 2014 11:58 am
by bluesceada
Hi,

I am trying to get battery wear leveling (or also called battery balancing) working on a T420s. I know that tp-smapi doesn't support the function force_discharge anymore, so I am trying to use tpacpi-bat [1] together with an adapted balancing script found at [2]. However, the basic problem already starts earlier. Funny enough I can control which battery to forcefully discharge when on AC power, but on battery this seems to get ignored.

Trying to discharge the 1st battery and not the ultrabay battery:

Code: Select all

# /usr/lib/tlp-pm/tpacpi-bat -s FD 1 1
# /usr/lib/tlp-pm/tpacpi-bat -g FD 1
no
# cat /sys/devices/platform/smapi/BAT0/power_now
0
# cat /sys/devices/platform/smapi/BAT0/remaining_running_time_now
not_discharging
# cat /sys/devices/platform/smapi/BAT1/power_now
-9422
# cat /sys/devices/platform/smapi/BAT1/remaining_running_time_now
75
I also tried the other way around and with other numbers, in case the ultrabay battery would be battery 1 from the view of tpaci-bat, but that didn't help... (tpacpi-bat uses battery 1 and 2 and not 0 and 1 like smapi)

Somebody had this problem as well, or should this normally work for the T420s? Any known solutions?

Is Lenovo specifically disabling this on battery, so ultrabay batteries will be aged faster and people have to buy new ones earlier?

Thanks for any information!

[1] https://github.com/teleshoes/tpacpi-bat
[2] http://www.thinkwiki.org/wiki/Tp_smapi# ... l_features

Re: T420s Linux force discharge on battery (two battery use)

Posted: Wed Aug 20, 2014 11:07 am
by larso
You can't choose what battery to discharge or discharge thresholds on t420s or newer versions, only on t410s and older (with linux scripts). You're probably right about lenovo wanting to sell more batteries. :evil:
But fortunately the lithium-polymer battery will last longer compared to a lithium-ion battery abused similarly.