Recently, I felt like my laptop battery (Lenovo Thinkpad) was draining a lot faster than before. I’m not sure if something triggered a particular spike, but I looked into it and found it’s really easy for me to adopt better battery practices on Ubuntu.
First, to find out just how sad my battery is, I used the command
upower -i $(upower -e | grep '/battery')
power supply: yes
updated: Wed 07 Aug 2019 01:56:41 PM ADT (40 seconds ago)
has history: yes
has statistics: yes
energy: 28.85 Wh
energy-empty: 0 Wh
energy-full: 40.02 Wh
energy-full-design: 56 Wh
energy-rate: 7.468 W
voltage: 15.958 V
time to empty: 3.9 hours
1565197001 72.000 discharging
1565197001 7.468 discharging
My full battery is 56 Wh, and now it’s only 40 Wh two years in! Nearly a (16/56) = 30% decrease!
Whew. That means if I had 6.5 hours of battery life before, now I have only 5 hours.
So, I looked up online. The key things to do are
1) Change the threshold for starting/stopping battery charging, to stop the battery from charging to 100%
2) Keep the laptop plugged in more, and
3) Keep the laptop cool
Guess I need to figure out a way to use my laptop in bed without setting it on the blankets. Or, get a proper desk and table.
Here’s the deets.
For maximum lifespan if you rarely use the battery, set Custom charge thresholds to start charging at 40% capacity and stop at 50%, and keep the ThinkPad cool. The thresholds can be adjusted in the Battery Maintenance settings of the Lenovo Power Manager.
If you do use your battery somewhat frequently, set the start threshold at say 85% and stop at 90%. This will still give a good lifespan benefit over keeping it charged to 100%.
The simplest way to optimize for battery lifespan is to select Automatic in the Power Manager Battery Maintenance settings, and let it manage your battery charge thresholds for you.
Note: TLP and ThinkPad-related packages below are available via the official Ubuntu repository. Nevertheless it is recommended to use the PPA to stay with the latest TLP version.
1234 sudo add-apt-repository ppa:linrunner/tlpsudo apt-get updatesudo apt-get install tlp tlp-rdwsudo apt-get install tp-smapi-dkms acpi-call-dkms
rui@chaiX1YG2:~$ sudo tlp setcharge 70 90 BAT0
Setting temporary charge thresholds for BAT0:
stop = 90
start = 70
rui@chaiX1YG2:~$ sudo tlp start
TLP started in battery mode
Or, for a permanent change, edit the file “
rui@chaiX1YG2:~$ sudo vi /etc/default/tlp
And uncomment the lines (around line 273)
setting the thresholds to whatever you think is best.
Shortly before I head out, I’ll probably run
sudo tlp setcharge 70 80 BAT0
since 3 to 4 hours of battery life is plenty for me. But I do want to be conservative since my power button no longer works, so if it completely dies then I have to unscrew the back cover and unplug the battery + CMOS battery briefly, then plug in/screw in/plug in power charger in order to start it again. I really only have myself to blame, not thinkpad — I’m sure it has something to do with shorting 24V / 3 amps through the USB port when I was working on motor controller things for my final project in underactuated robotics. Yea… that wasn’t great, and I’m really impressed the laptop survived and the USB port even still works!