First off, here’s a copy paste from when someone DM’ed me a similar question:
Good question. The answer has changed with time, but some of that is recorded on this thread I started here: Minimum Power Draw Competition
The first thing I’ll say is that it strongly depends on what you’re using the laptop for while on battery. When I’m on battery, I’m almost always doing incredibly light-weight work, such as editing a local text document with a barebones editor (not a fancy one like Word), or browsing lightweight websites (text only/no videos playing).
I’m on Linux, not Windows. I’ve ran Arch, Fedora, and Gentoo (currently) on this system, all with similar results. As much as I like to hate on Windows, some of the “high scores” or, low-scores rather, on that power draw competition came from windows machines. If you’re looking for Windows tricks, perhaps some of them have been recorded in that thread.
In order to get 12 hours of battery life, your average power draw needs to hit 7W, this is quite difficult to maintain to be honest, it’s much easier to hit ~10W and get ~8.5hrs, but it is possible.
Here’s the things I do:
- Use power-profiles-daemon to put the device in battery-saver mode. If you see a widget in Ubuntu that lets you switch between battery saver, balanced, and performance… that’s power-profiles-daemon.
- I like to use a tool called
btopto keep an eye on the batteries power draw.powertopis another good choice, but it only reports the power every ~30 seconds whilebtopupdates every second or two. Note though: if the dGPU is on when btop starts, it will keep the dGPU on and prevent it from sleeping.- Powertop has an
--autotunefeature that puts things into a sleep state with the intent of more aggressively saving power. I don’t use this anymore, it’s got too many draw backs… such as needing to wake the keyboard up before typing.
- Powertop has an
- Make sure the dGPU is off. Here’s a simple script that I use to check it
#! /bin/sh
cat /sys/class/drm/card0/device/power_state
cat /sys/class/drm/card1/device/power_state
cat /sys/class/drm/card2/device/power_state
At least 1 of those devices should report D3cold (the RX 7700s), one should say D0 (that’s the iGPU), and one should say there’s no such file or directory (because there’s only 2 GPU’s but different versions of linux give them different gpu numbers). If it says D0 twice, the dGPU is on and that’s going to slaughter your battery life faster than anything else. Keeping that off is the #1 priority for maintaining battery.
- I set the display to 60hz instead of 165hz, this saves about 1W power draw. This isn’t realistic to do manually, so I have this automated. When the system is unplugged, I used KDE Plasma to autorun a script that turned the display down to 60hz, and back to 165hz when plugged in. Technically, I now have an RGB Macropad that has those scripts bound to it, but the effect is basically the same.
- This is the line for going to 60hz mode:
kscreen-doctor output.1.mode.2
- This is the line for going to 60hz mode:
- I’ll run the minimum brightness I can get away with. Unsurprisingly, the brightness has a large impact on power draw.
- In a light weight workload, the CPU usage should be practically 0% and the fans should not be running. If either of those are false, I don’t consider it “light weight”.
I think that’s about it. When I say I get 12 hours, it’s not the whole truth, just a simplification for the sake of brevity. In practice I usually get between 6-15 hours depending on the factors above and what I’m doing. I don’t think I’ve ever actually gotten 15 in the real world, but it is the theoretical maximum I could get based on the minimum power draw I’ve achieved myself. Random background processes will kick in every so often and spike the CPU for a moment and that messes with the power draw… but when the system is so tightly optimized those situtations become obvious and you’re now in the territory of making intentional decisions about whether a single program/process is worth the power cost or not as opposed to just taking whatever you can get. Once you get to about 7-8W draw, you start fighting for every 0.1W decrease in power consumption, but the lower your consumption goes the more valuable every decrease becomes. Going from 8W → 7W is ~12.5% increase in battery life, but 20W → 19W (probably close to where you’re at if the dGPU is on) is only a 5% increase in battery life.
That said, what do you have running on the device? Those 10W and below figures are for devices near idle conditions running light work like web browsing, text editing, and etc.