this post was submitted on 28 Mar 2024
58 points (100.0% liked)

Linux

1259 readers
71 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I've installed TLP on my Lenovo ThinkBook laptop and was wondering if there are additional steps I can take to extend the battery life when using the laptop unplugged.

Could you please share more tips and tricks for maximizing battery life on Linux laptops?

top 28 comments
sorted by: hot top controversial new old
[–] mlfh@lemmy.ml 26 points 7 months ago (3 children)

powertop is a cool tool that can analyze your machine and provide a list of suggested power optimizations

[–] ryannathans@aussie.zone 5 points 7 months ago

Power..top.. of course

[–] Goun@lemmy.ml 4 points 7 months ago

Fancy. TIL, thanks!

[–] Atemu@lemmy.ml 3 points 7 months ago (1 children)

This is the way. You need to check whether CPU and package are mostly in the highest C-states they can be. If not, you've got a task or IO device causing a lot of wasted power.

[–] LemmyHead@lemmy.ml 1 points 7 months ago

Ok mandalorian

[–] fuckwit_mcbumcrumble@lemmy.dbzer0.com 9 points 7 months ago (1 children)

On modern CPUs they’re designed to “race to idle”. Consequently when they’re not idle they’re not very efficient. The biggest change that improves my battery life is adjusting how I do certain things. Instead of trying to slow things down even more to save power I just try to get them to finish quicker so my CPU can get back to idle (and efficient) faster.

Intel is really awful with this. AMD is better but slowly getting to Intel levels. E cores might change things up a bit, but I don’t have experience with them yet.

[–] Goun@lemmy.ml 2 points 7 months ago (1 children)

Intel is really awful with this. AMD is better but slowly getting to Intel levels.

I don't follow, I thought AMD was less efficient. You say it's the other way around but it's getting worse? Or I'm reading it wrong?

[–] ryannathans@aussie.zone 4 points 7 months ago

AMD has been far more efficient at load for years

[–] terminhell@lemmy.dbzer0.com 8 points 7 months ago

Lowering screen brightness, turn off keyboard back lighting.

But thing is, on some devices, certain power states just may not work.

[–] cmnybo@discuss.tchncs.de 8 points 7 months ago (2 children)

For more power savings, you can undervolt your CPU if it supports it. On some CPUs, it can result in significant power savings.

Undervolting requires a lot of testing to make sure each core is stable under all conditions. There is no guarantee that a CPU will undervolt well though. Two identical CPUs can have significantly different results.

[–] umbrella@lemmy.ml 2 points 7 months ago

undervolting can also improve performance, depending on boost behaviour. it feels like you got a better binned chip.

[–] Atemu@lemmy.ml 1 points 7 months ago

I don't see how undervolting would result in power savings on modern CPUs if you're not up against clock limits as the CPU would simply boost higher.

[–] catloaf@lemm.ee 6 points 7 months ago* (last edited 7 months ago)

Turn off radios (Bluetooth, wifi bands) that you aren't using.

Also GPUs, if you have more than one.

[–] Sina 4 points 7 months ago* (last edited 7 months ago) (1 children)

if battery is the priority the single biggest gain I can recommend is to use xorg with compositing off. (Gnome cannot do this, KDE can, if you use a WM then don't use Picom etc)

If you can tolerate screen tearing you can save a significant amount of power while web browsing.

[–] mfat@lemdro.id 1 points 7 months ago

I use KDE only. I'll surely give this a try thank you.

[–] rimu@piefed.social 4 points 7 months ago* (last edited 7 months ago) (1 children)

Disable Javascript and images in your browser.

[–] yo_scottie_oh@lemmy.ml 2 points 7 months ago* (last edited 7 months ago)

Jury’s out on disabling Javascript unless you only visit the same sites again and again. Since installing NoScript, I have to load and reload every site multiple times while I guess which domains to allow in order for the site to actually work. I’ve white listed the bare minimum on web sites I use frequently, but it’s still a daily occurrence that I visit a site I haven’t been to before.

[–] vbatts@lemmy.ml 4 points 7 months ago (1 children)

In the bios of many thinkpads there are options about powering USB ports while the machine is suspended or powered off. I disable that, because I want battery life even when suspended. Also an option about some windows suspend or S3 suspend, I chose S3 suspend, but don't have clear evidence this choice makes a difference.

[–] rotopenguin@infosec.pub 2 points 7 months ago* (last edited 7 months ago) (1 children)

I don't think that you're losing any power with the "usb ports powered" option on. It's just there if you want to use your (sleeping) laptop as a $1000 power bank to charge your phone.

Personally, I turn it off just because I would rather use a $20 battery pack instead of wearing out my laptop.

[–] vbatts@lemmy.ml 1 points 7 months ago (1 children)

yeah, ok. So I just went back to test the S3 Sleep power state option, and switched it to the Windows'y one, which the BIOS says Linux supports and it does, but now the machine seems to still burn battery when it's suspended ... So, I have found the larger culprit.

[–] rotopenguin@infosec.pub 1 points 7 months ago

We are well into the age of "OEMs dgaf if S3 works". Windows has not used it since sometime around 7, so it's been bitrotting in every vendor's firmware. With some models, you may have S3 working on day one, but a firmware update kills it and that's too bad.

S0ix idle is actually quite nice when you get it working, but when it is not the tools to diagnose it are terrible. The terminology around sleep states are also terrible, (what's a package or core or platform C state? Could one of them find a different letter?). I have gone over the arch wiki, and DELETED Intel documents so many times…

[–] Tschuuuls@feddit.de 3 points 7 months ago (1 children)

The new meta is Power Profiles Deamon: https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/blob/main/README.md
Otherwise you should see if power management is enabled for all your pcie and input devices (using powertop for example). If you run a nvme ssd, make sure it is allowed to use all power states (bit more involved topic).
Good luck :D

[–] d3Xt3r@lemmy.nz 4 points 7 months ago* (last edited 7 months ago)

Actually, the new new meta is TuneD, apparently you get better better battery life compared to PPD.

Fedora is considering switching to it, and some distros like Bazzite have already made the switch.

I use Auto CPU Freq on my T480 and am satisfied so far.

[–] kzhe@lemmy.zip 3 points 7 months ago (1 children)
[–] mfat@lemdro.id 1 points 7 months ago* (last edited 7 months ago)

Just checked out its github page. seems very interesting

[–] leanleft@lemmy.ml 2 points 7 months ago

terminal is your friend

[–] delirious_owl@discuss.online 1 points 7 months ago

I have a laptop with USB-C charging and stash chargers all around the house so I am always plugged-in.

Works great, the battery life is infinite.