[TRACKING] Linux battery life tuning

After installing TLP, I run
systemctl start tlp.service
systemctl enable tlp.service

and then
systemctl status tlp.service
shows that its enabled and running…

reboot

tlp-stat -s still shows output, but

systemctl status tlp.service
shows inactive.

Am I missing something, or is this how TLP functions?? Is this thing on??? :stuck_out_tongue:

Thanks, all.

pAULIE42o
. . . . . . . . .
/s

I’m showing the same results using Manjaro with Gnome 41. I’ve seen several notes about conflicts between tlp and the power-profiles-daemon service. See Questions regarding the new gnome 41 power controls - GNOME - Manjaro Linux Forum

I dunno if anyone else has mentioned this, but I noticed the display backlight was the highest consumer of battery.
Adding this to my GRUB_CMDLINE_LINUX_DEFAULT seems to greatly reduce power use:

edit: removed the command since it doesn’t work

1 Like

@cameron_lambert I tested with and without the video.use_native_backlight=1 option and couldn’t see any difference. Under identical circumstances, powertop showed 6-7W either way.

However, my network interface usually uses significantly more power than my backlight, as I keep my brightness moderately low.

I was actually imagining it, probably from the difference in brightness settings between tests. And looking at dmesg shows “unknown parameter… ignored”.

I’m also testing:
acpi_backlight=native

But it’s too early to tell how much it’s changed anything

Just to confirm, this is supposed to be set to true, right?

Just read something interesting: apparently, using wayland instead of Xorg can save around 3W of power usage, both in GNOME and KDE Plasma.

This may explain why e.g. @Chiraag_Nataraj (he uses sway) seems to get ok battery life while others don’t quite get there. Apologies if this is common knowledge, after all it seems intuitive that eliminating the middleman (X-server) saves power.

EDIT: the test was conducted on a Thinkpad T14s with Ryzen 5850U, so it might not be exactly comparable. But even 1W would be great savings imo.

From my own month ish of testing, I would say it’s not quite as simple as Phoronix is laying it out to be. Yes Wayland does seem to be a bit more efficient at doing the “basics”, i.e. simple desktop, few programs, only one monitor, etc. Difference in efficiency is probably more than .5W, close to 1W, but probably less than 1.5W in my estimation, but definitely not anywhere close to 3W.

Add two monitors, eGPU, badly behaved programs ( wine, Steam, many browsers with their own window toolkits and not well hardware rendering optimized stacks), certain games, etc, and that general rule goes out the window very quickly.

I’ve found certain use cases where Wayland is consuming way more idle and heavy load power than X11, on both KDE and GNOME.

Bottom line is, the only way you’ll know is with your own testing, and re-do the testing after major updates to any component in your kernel, driver, DE, app, etc. stack. Powertop, htop, etc are your friends in this “Endeavour”!

2 Likes

Thank you who ever started this thread, I will hold on my purchase because I don´t want to lose my battery life with linux but again it seems the linux support doesn’t include the actual power & battery handling.

I will return when these issues are solved with proptiery firmware software or self build kernel or something.

If there’s a specific use case scenario you need a battery life test or target for, let me know.

I have gotten idle at graphic desktop power down to as low as 2.2W, or 24+ hours longevity.

Typical light web browsing workload I am routinely over 8 hours estimated longevity.

Playing video is more like 6 hours.

Unfortunately some badly behaved apps like zoom can bring that to under 3 hours.

But all in all I would say the battery life is very competitive with other offerings in this price class / and use category. NotebookCheck seems to agree with that assessment as well.

1 Like

My typical work on this machine would be editing pdf files and editing schematics with kicad and viewing 3D CAD models on the job site without power sockets, so I would need 10-12 hours minimum and if +16 hours is possible then it would last even the longest work days. Company provides BricsCAD or AutoCAD.

For free time I planning to use eGPU to handle my gaming & 3D modeling / editing needs.

Edit: The problem what I have with powertop and all other ´scripts´ is that when I need the power from CPU I won´t get it without going to CLI and killing battery saver scripts and tune ups. End user shouldn´t have to manually tell the computer I need power now and I don´t need the power now. Other thing is when you go low power mode it usually has meant on laptops that you´re not anymore that snappy, browsing web pages becomes slow.

Hey man @D.H how did you get that kind of battery life? Was wondering what should I do in order to increase mine.

Heres the list of factors that made a difference in getting to ~2.2W idle draw, in roughly the order of effectiveness from high to low…

  1. Brightness manually set to 1 (this is the single biggest factor I have found)
  2. Airplane mode (ax210 is pretty power hungry even when doing nothing)
  3. TLP bat mode sets all the rest of the important power saving and tunables automatically
  4. PSR turned on allowing for C10 idle state (no issues with this observed in kernel 5.15.x for me).
  5. Arch Linux + Plasma + Wayland (there may be even lighter DEs out there that I haven’t tried, though)
  6. Hynix P31 SSD (noatime, and VM.swappiness=1 to avoid writes)
  7. Hynix RAM (I run 2x8GB, but single stick of 8GB might be even more miserly)
  8. All expansion cards removed (ssd, SD, HDMI cards are all active and draw 1+W each according to others, but it looks to me like even the passive USB-A cards cause ~ .2W draw each somehow…)

Of course, I wouldn’t travel or use the computer in such low power limbo mode all the time, but it’s good to know what to trade in or out for each usability vs longevity scenario…

TLP mostly does this all on its own, but you could easily automate additional scripts modifying fan behavior, etc if you wanted more fine grained control over power usage. Powertop is just the measuring tool to see how effective your adjustments are. You could also watch cat /sys/class/power_supply/BAT1/current_now to get battery draw info, but then you have to do math to get it back to watts.

But yes you’re looking at pretty long longevity needs. Good news is the Framework will charge from decent usb-pd power bank sources, or blend in power from weak ones while running. I have an older 6000mah 18W usb-pd source that was good for 2-3 hours longevity boost to the F.w in normal web browsing use case. I’m guessing a good quality 30000mah one would likely get you to your time away from plug target. If you fly commercial airlines, though, check the current limitations on battery pack size in carry on luggage.

7 Likes

couldn’t one create a service or something that unmounts them when nothing is inserted or when the screen is locked and remounts them when that’s not the case anymore? I’m not that deep into linux yet but technically that should be possible right?

There may be a deeper USB power saving or (auto) suspend setting I have overlooked thus far. But simply putting in an empty USB-A expansion card (no flash drive or USB dongle connected to it) does make current_now go up slightly, and I am at a loss to explain how or why.

2 Likes

Yeah i just figured that mounting probably doesn’t affect power draw that much, but maybe one could dig deeper and unbind/rebind drivers?

How would I enable this on Arch? im on kernel 5.15.6 and with the cat command from above it does not seem enabled for me.

1 Like

It’s a cmdline option given to the kernel at boot time. i915.enable_psr=1

Enable via grub, rEFInd, etc config files

1 Like

I’m on the grub boot screen rn, can you elaborate on how I would enable it? I’m pretty new to linux.

1 Like

@Linen , these appear to be a decent set of instructions on the subject:

3 Likes