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') native-path: BAT0 vendor: LGC model: 01AV457 serial: 969 power supply: yes updated: Wed 07 Aug 2019 01:56:41 PM ADT (40 seconds ago) has history: yes has statistics: yes battery present: yes rechargeable: yes state: discharging warning-level: none 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 percentage: 72% capacity: 70.8929% technology: lithium-polymer icon-name: 'battery-full-symbolic' History (charge): 1565197001 72.000 discharging History (rate): 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.
And from https://forums.lenovo.com/t5/Lenovo-IdeaPad-1xx-3xx-5xx-7xx/maintaining-battery-capacity-on-ideapad-530s-laptop/td-p/4282652:
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.sudo add-apt-repository ppa:linrunner/tlp sudo apt-get update sudo apt-get install tlp tlp-rdw sudo 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!
4 thoughts on “Keeping my Thinkpad battery ship-shape on Ubuntu (19.10)”
This was really really useful. Thank you very much. My notebook is only 18 months old and its battery is already at 76% capacity. It’s sad but at least now I’ve learned and implemented charging thresholds and hopefully the degradation will slow down. Thanks again!
Glad to hear it!
(sorry about the late reply, I didn’t realize migrating to lightsail servers caused my wordpress notification emails to stop sending)
Edit: Fixed by following https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-enabling-email-on-wordpress , though I guess any SMTP server would have worked with the `wp plugin install wp-mail-smtp` plugin
Once a year is good to run:
sudo tlp recalibrate BAT0
And also for BAT1….
Oh neat, thanks for the tip!