powertop is a cool tool that can analyze your machine and provide a list of suggested power optimizations
Linux
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
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
Power..top.. of course
Fancy. TIL, thanks!
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.
Ok mandalorian
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.
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?
AMD has been far more efficient at load for years
Lowering screen brightness, turn off keyboard back lighting.
But thing is, on some devices, certain power states just may not work.
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.
undervolting can also improve performance, depending on boost behaviour. it feels like you got a better binned chip.
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.
Turn off radios (Bluetooth, wifi bands) that you aren't using.
Also GPUs, if you have more than one.
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.
I use KDE only. I'll surely give this a try thank you.
Disable Javascript and images in your browser.
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.
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.
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.
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.
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…
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
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.
Slimbook Battery app
Just checked out its github page. seems very interesting
terminal is your friend
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.