Best Distro For Battery Life?

So I have recently purchased a new laptop and I have tried installing a few distributions on it for a test run. I have noticed that I get wildly varying battery life among them. Of the 3 that I have tried (Manjaro, Fedora, Pop!_OS) I have found that Pop!_OS is by far the best, with the dedicated graphics turned off. This makes me wonder, if anyone would have any other recommendations, in regards to battery life. The longer I can run my laptop away from the wall the better.

Battery life is nothing I think of very often, as I don’t have laptops. Fedora KDE spin worked for me. Arch with KWin+LXQt also worked. So did Fedora with Sway. Had no complaints. Used a Dell Latitude E5580, Toshiba Kira and lastly a Dell Latitude E5440. All lasted me around 4 hours, with the camera on in a Goolag Meet meeting. The camera was by far the thing that drained my laptops the fastest. None of those laptops had dGPUs.

I wouldn’t recommend Arch though. And Manjaro is even worse. Given the luck you had with Pop!_OS, you may want to change your desktop environment, as GNOME Shell is a resource hog. Plasma could work, maybe XFCE or LXQt too if you don’t mind concentrating more on your programs than your desktop and its features.

Hello hulxmash,

I know it’s been a few months and I’m not sure if you’re still looking into improving your battery life, but in case you are:

Wayland

Pop!_OS has optimizations by default (system76-power https://github.com/pop-os/system76-power) so I’m not surprised by your experience. Although by now these results are a bit older by now, these articles on Phoronix imply that using Wayland instead of X11 can improve battery life:

https://www.phoronix.com/news/GNOME-Wayland-Better-Battery
https://www.phoronix.com/news/KDE-Plasma-Wayland-Power

By default Pop!_OS comes with Wayland disabled. If you want you may enable Wayland with these instructions: https://unix.stackexchange.com/questions/700938/enable-wayland-in-popos-22-04. Some people do have reasons to stick with X11 and there are still a few issues with Wayland in both Gnome and KDE Plasma. But you can always try and switch back.


Lighter DE?

Also there is a lot of hearsay on the internet about lighter DE’s such as XFCE or LXQT having better battery life. While this seems logical, I have yet to find any evidence or facts to back this up. My laptop does not have the required sensors and I cannot afford power meters that would produce meaningful results, so I can’t check this myself. But here is an older article :

https://www.forbes.com/sites/jasonevangelho/2019/05/06/benchmarked-the-most-power-efficient-ubuntu-19-04-flavor-will-surprise-you/

Note that Ubuntu Mate ships with power saving tools by default, which other flavors didn’t have at the time. Subjectively, I feel that Ubuntu 22.04 and the latest Fedora with Gnome offer me better battery-life than Mint Mate or Cinnamon, which are considered to be ‘lighter’.

These days both Ubuntu and Kubuntu also ship power-profiles-daemon, a power saving tools somewhat similar to what System76 provides (but I suppose more generic). (Plus they offer Wayland as mentioned, which also is more optimized). Also since then a lot of work has gone into both Gnome and KDE Plasma. It’s where the money is. Corporate backed distributions focus on Gnome and manufacturers such as Kubuntu Focus, Tuxedo and Valve ship KDE Plasma by default. KDE has started the KDE Eco project.


Power-saving tools

Lastly, there are of course plenty of recommendations floating around the internet for TLP, PowerTop, auto-CPUfreq, thermald, Slimbookbattery, etc. They may work for you, or they may not. Plenty of people also claim these tools actually decrease battery life or give other problems. They make sense in theory, but there isn’t any up-to-date data to support their effectiveness. All of these adjust hardware performance, they’re not making your software more efficient. When it comes to software, this research paper: https://www.researchgate.net/publication/320436353_Energy_efficiency_across_programming_languages_how_do_energy_time_and_memory_relate indicates that (assuming equal code quality and functionality) programs codes in C, Rust and C++ are most efficient, while Ruby, Python and Perl require more energy. Gnome uses mostly C, KDE Plasma C++, XFCE uses C.


Maybe if @jay ever runs out of stuff to cover and feels like tinkering he could look into power-efficiency/battery life improvements for laptops? :D. He did produce videos on low power servers in 2020:
https://www.learnlinux.tv/building-a-low-energy-storage-server-for-your-office-homelab/
https://www.learnlinux.tv/building-a-low-energy-virtualization-server-for-your-office-homelab-with-proxmox/

If I ever manage to get my hands on the tools and time required, I’ll do some benchmarks myself and share them.

PS: Sorry for all the ‘code snippet’ links. I actually had many more and signed up to share this information, but it turned out I can’t add more than 2 links as a new user.

1 Like

Welcome to the community! And thanks for all the great information. I have stuck with Pop!_OS and stock settings, besides turning off the discrete GPU. I can get about 10 hours or so on a charge. I might try experimenting with some of the things you mention here, to see if I get any significant improvement.

Personally, I don’t see a big difference between lightweight desktop environments and something like GNOME. The difference used to matter a great deal when we ran Pentium IV’s, but this is 2023. But there is something that’s related that could be helping to perpetuate this mindset:

Indexing.

Not everyone has a ton of files, while others seem to be trying to download the entirety of the Internet. Lightweight desktop environments are far less likely to ship with a file-indexing service built-in. Desktop environments such as GNOME? Absolutely. And if you have a sizeable amount of files, your desktop performance is going to lag so bad you’d swear your CPU suddenly aged five years. Depending on the rate of change, this could go on so long I think someone would just bail on the desktop.

Personally, I had this happen until I realized that Tracker in GNOME was attempting to scan the entirety of my TrueNAS server each and every day, over and over, because I had a persistent mount to it. I disabled Tracker’s ability to scan network shares, and problem solved!

And I would imagine this would impact battery life quite a bit too, but I haven’t tested that.

2 Likes

So how do you change tracker’s ability to scan network shares? I cannot find anything for tracker in /etc or any gnome related settings to change it. It’s not really an issue in my case. I don’t think it takes a lot of battery to index both network files. But it would be nice to know how to change this?

I have only started to drink my morning coffee and I haven’t warmed up for google-fu yet, but i’ll see what I can find.

There’s multiple ways of doing that, but since GNOME actually requires Tracker for some functionality, I think the best method is to disable it for individual folders.

If you create an empty file named .nomedia and create that at the root of any directory, then the result should be that Tracker will ignore that directory and everything underneath it.

There are some hidden settings that I don’t think are exposed in the UI, but creating the .nomedia file is probably the fastest and simplest.

2 Likes

Thanks. I’ve learned something new today.

Well, that’s my job. Literally. :grinning:

1 Like

The best results I’ve had with battery on laptops has been to use the utility auto-cpufreq by Adnan Hodzic. I have it installed as a systemd service that starts at boot. Has helped a lot. If you have an nvidia optimus laptop like I do, you can use either envycontrol or some distro’s (Pop!_OS, Linux Mint) have their own utilitys to disable the Nvidia card and use the integrated intel GPU to decrease battery usage.