How to charge the battery till 60-80% only?

I just got my laptop's battery replaced and read a bit about how to prolong it's life. Most people say that the best choice is not to charge it will 100%, but rather to 60-80%. My battery is quite powerful (8 hours declared), so it's okay for me to charge it like this, and I mainly work plugged in.

In Windows which ships with the laptop I can see the way to set the threshold, and there is even the auto mode, where system decides itself how much to charge. Is there something like this in Ubuntu?


Solution 1:

For IBM Thinkpads there exist a module tp_smapi to control charge thresholds. It you fix the start charge threshold at 60% and stop at 95%, the battery will charge upto 95% and stop charging (It will not discharge either). Once the AC power goes off the laptop will discharge but will not start recharging, even if plugged into AC, till the battery has discharged below 60%. Its useful feature to increase battery life as Li-ion batteries are best stored at 40%. If you don't often go off AC power the battery will remain at 40-60% as per threshold set by you and hence last for a long time. I'm not aware if the same module would work for other laptops as well. Sam - IBM Thinkpad - R52/R60.

Solution 2:

You can install Dells Airplane manager(Download) when you battery is 80% charged open it and enable airplane mode so now the laptop will not charge and run off ac power.