Linux laptop battery life guide
Table of Contents
Linux and Windows laptops got a problem.
Hello, ladies and gentlemen. Today we are going to tackle some issue that have been around since the literal start of pushing laptops to be movable desktops. These powerful laptops, cpu's and gpu's, and lightning effects (some call them RGB or Aura) come with a really bad side effect: they make your laptop a desktop. No, I mean that literally. For example, I own a Rog Strix Scar g18 2023 4090, which was a mistake to buy instead of a MacBook, I know. But one day ago, I couldn't unplug it from it's charging brick and go to a cafe to do some light work, not like I go to outside much but you got the point.
So today I will go over the things that I've done for myself if I want to distro-hop again and you guys.
Basic OS settings
You can lower some settings which might result in significant power savings. These include:
- Turning down screen brightness
- Turning down screen refresh rate
- Lowering your keyboard or other lights
- Closing devices that you don't use such as ethernet, bluetooth, etc.
- Remember that if you are an advanced Linux user, and know how to do it, you might as well disable the eth0/wlan0 cards through ifconfig or rfkill interfaces. This should result in ~1W. I don't recommend disabling such features like Bluetooth or eth if you are dependent on them, but if you just don't use them, you can disable them entirely. If you use them time-to-time, you can disable most of them (like Bluetooth) from settings GUI of your DE.
- If your device has integrated and dedicated GPU, disable the dGPU and use Integrated. Since I have an ASUS laptop (I'll be damned if I buy one again), I am using supergfxctl.
We also have a lot of configuration to do but we can do them via some applications. Here is a list of commands I ran on my laptop, note that, the first command is to check the starting Watt usage:
sudo powertop
sudo powertop --calibrate
sudo powertop --auto-tune
sudo thermald
Then, we can also install laptop-mode-tools and tlp (I actually don't know if they intervene with each other) and note that, to install tlp, you need to use your own distribution's package manager.
cd /tmp
git clone https://github.com/rickysarraf/laptop-mode-tools.git
cd laptop-mode-tools
./install.sh
sudo dnf install tlp
sudo tlp start
Some BIOS settings
If the settings we've done above is enough for you, you can stop at here because this is going to the details of it. But in this section we will:
- Disable CPU cores
- Undervolt CPU cores
Now, to be open about this, not every model is the same and nor they will go through the same process to do these things. So at this point, you need to do your own research. But as an ASUS ROG user, and I believe for TUF laptops it should be the same too, I can find both of these settings in my BIOS.
Be absolutely careful about how much you undervolt. First start with -5mV, never go over -80mV because it will destabilize your system and make it vulnerable to attacks. I am using a -18mV and I am seeing minimal effects such as 1W, which I am okay with it.
Change your apps
This is also a crucial key. Obviously, GNOME would consume more power than i3. So if you are a person who generally uses their laptop unplugged, you may want to rethink your DE or WM choices.
That being said, apps are also a huge part of power consumption. Use battery-saving modes of programs if they have one (for example Yandex browser) and for many browsers, there is a suspending option for inactive tabs.
Some downsides of these optimizations
While it may seem great, these will cost you time when you want to go back to full power, for example, you need to change CPU cores from BIOS again and dGPU and all of those stuff again, except undervolt though, I think you should be fine with not changing it.
Distro selection
From some Redditors' and my own experiences, some distros work better with batteries and laptops overall. These distros include:
- OpenSUSE
- Fedora
- Slackware
- Alpine (of course)
- Debian
Notice how Arch and Ubuntu aren't on the list? Lol.
Conclusion and closing
I know this isn't a regular post but it's more of a note and a guide for myself because this is a problem that I encounter in my daily life regularly. But if you somehow didn't need this and still read through it I would like to thank you and formerly apologize for stealing your time that you could utilize in Instagram. As always, see you soon!
I am also incredibly sorry for the Guestbook, it turns out that I had enabled the check-before-making-it-public mode or something like that, but I don't remember my username nor my password for that site. Yes, I forgor.