How to increase battery life on Ubuntu 20.04 and what power saving software should I install, if any?
Matthew Martinez
I recently installed Ubuntu 20.04 LTS on my Lenovo Ideapad Flex 5 and realized that battery life in Ubuntu is not as good as Windows. The battery drains faster in Ubuntu. I have seen the questions in Ask Ubuntu about this, but I haven't found anything that regards Ubuntu 20.04 LTS. I've done some research and found out that the battery drain is because most vendors optimize their drivers for Windows and with Linux, you have to hope that the kernel drivers do the job (which they usually do). After that, I researched how to increase my battery life and almost all sources I found recommended installing tlp or powertop or something similar to these. But I have a few questions.
Does
tlp,powertop, and similar software actually affect battery life?If the answer to 1 is yes (in a positive way), what would you recommend I install (such as whether I should install
tlporpowertopby itself or in a combination)?Are there any other ways to increase battery life in Ubuntu 20.04?
Note: I am a beginner to Linux and Linux distros and do not want to mess with anything advanced that may negatively affect the system. I may not be able to immediately know how to tweak any of the aforementioned software, so please suggest any tweaks if they are needed to get results.
And if it helps to know, here are my system specs:
OS: Ubuntu 20.04.1 LTS x86_64
Host: 81X2 IdeaPad Flex 5 14ARE05
Kernel: 5.7.17-050717-generic
CPU: AMD Ryzen 7 4700U with Radeon Graphics (8) @ 2.000GHz
GPU: AMD ATI 04:00.0 Renoir
(These were given by neofetch)
P.S: If you need anything else, just ask.
Thanks in advance!
02 Answers
TLP works to save power and prevent overheating. It provides AMD Radeon GPU power management. It provides power management for CPU, GPU, WiFi, Bluetooth, HDD and more.
You can install TLP like so:
sudo apt install tlp tlp-rdwAfter installation run sudo tlp start and reboot.
You will see longer battery life and reduced CPU / GPU heating after installation and reboot. However, it may take a few days to get the full effect of TLP.
TLP runs as a service. It is started from the terminal and it has no GUI.
After you install TLP, you run it for the first time using this command in the terminal:
sudo tlp startThen you do not need to run it again. It will run automatically with each reboot.
You can check the status of the TLP service by running the following command in the terminal:
sudo systemctl status tlp.serviceYou will get an output like this:
● tlp.service - TLP system startup/shutdown Loaded: loaded (/lib/systemd/system/tlp.service; enabled; vendor preset: enabled) Active: active (exited) since Tue 2019-08-27 23:06:37 +03; 3 days ago Docs: Main PID: 2374 (code=exited, status=0) Tasks: 0 Memory: 0B CGroup: /
enabledmeans it will run automatically every time the system starts.To see TLP's extended status information, please run the following command in the terminal:
sudo tlp-statPlease read more about TLP here.
Other proven effecctive ways that could be done together with TLP are:
Disable the discrete GPU and use the onboard / integrated GPU. This might reduce the graphics performance but will save power. Please pay attention that if you decide to disable the discrete GPU, you might run into video drivers issues so be careful with this one.
Follow the Use less power and improve battery life in the official Ubuntu documentation.
Other ways in which you can improve your battery life:
Lower your screen refresh rate. If it comes with say, 165 Hz by default, lower it to 60Hz. Lowering refresh rate significantly improves the battery life. Use cvt and xrandr to create a custom refresh rate. STEPS:
- Run this command to check your screen's name:
xrandr. My results areeDP connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm. My display's name iseDP(name written before "connected") - Run cvt and write your resolution and refresh rate:
cvt 1920 1080 60(1920x1080 60Hz) - Create a newmode by copying the output of the above command:
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync - Add the mode created to your display:
xrandr --addmode eDP "1920x1080_60.00" - Run the newly created refresh rate:
xrandr --output eDP --mode 1920x1080_60.00 --rate 60 - To make it permanent, add commands in steps 3 and 4 to
sudo vim /etc/profile.d/custom_refresh_rate.sh
- Run this command to check your screen's name:
Switch to integrated graphics or turn the
hybrid modeon if your laptop has a MUX switch through BIOS. Also checkNvidia's X-Server settingsto switch to integrated GPU.Lower your screen brightness and turn off keyboard backlit when not necessary. Again, screen brightness consumes a lot of battery.
On lenovo laptops, Use
Quiet modein Vantage Software if your laptop supports it. Quiet mode draws less power from the CPU. This change made on Windows reflects in Linux as well if you're running dual boot."Battery saver mode" in Linux is basically
tlp, gives a good increase in battery life. Here's how to install it. Here's the usage.