How to make Arch more energy efficient / less power hungry / reduce energy consumption
What could I do to save some energy on my workstation?
So far, I did the following:
- Set my AMD Ryzen 3950X to eco-mode in the BIOS
- I turn off my screen as soon as I lock my session (I'm using Hyprland)
- I turn off Bluetooth on startup via
systemctl enable rfkill-block@bluetooth.service - I applied the things from the wiki on power management that applied to me
-
audio power save
-
/etc/modprobe.d/audio_powersave.conf options snd_hda_intel power_save=1
-
-
Wi-Fi power save
-
/etc/udev/rules.d/81-wifi-powersave.rules ACTION=="add", SUBSYSTEM=="net", KERNEL=="wl*", RUN+="/usr/bin/iw dev $name set power_save on"
-
/etc/modprobe.d/iwlwifi.conf options iwlmvm power_scheme=3
-
-
Disabling NMI Watchdog
-
/etc/sysctl.d/disable_watchdog.conf kernel.nmi_watchdog = 0
-
-
- Set the
amd_pstate=guidedkernel option
Did I miss something that potentially wastes energy?
About this post
- Posted
- Archived
- Removed on
- Score
- 72 · 93% up
- Kind
- Text
- ID
- 14wtss7
56 comments
I've mostly relied on TLP.
It is possible to disable it as needed, e.g. when one requires some more cpu-hungry tasks?
You may want to look into AMD feral gamemode, or just set the governor to ondemand.
tlp almost doubled on hours on battery for my thinkpad! came here to recommend tlp as well
You forgot to use Wayland over X. I think Phoronix did a benchmark comparison that showed Wayland to be more power efficient.
Good to know. I'm using wayland already :)
That’s an interesting fact I didn’t know! If you are free and can still find the video I’d love to see the video!
Here you go. https://www.phoronix.com/news/KDE-Plasma-Wayland-Power
i've always been a noob at understanding Wayland vs X. are there any downsides to being on Wayland? is it that it's newer and therefore less stable than X? if it's easy to switch over, I may do it. I just don't know what comes with that switch, benefits and downsides
It's easy to switch between X and Wayland sessions. Every display manager should give you the option to pick before starting the desktop.
Benefits & downside will vary based on individual. In my case I've used Wayland, relatively pain-free, for years but your experience may be different.
Feel free to switch to Wayland. You may need to check per application how to force-activate use of Wayland over Xorg, but it is feature complete by now on most applications.
I dont know how well it actually works but I use this: https://github.com/AdnanHodzic/auto-cpufreq
I use auto-cpufreq on laptops it should work fine on a desktop. I also use powertop to optimize power utilization at boot.
Are you running powertop's auto suggestions?
Up vote for
powertop!I used for a long time.
No, I haven't installed powertop. Does it 'find' more than just the things mentioned in the arch wiki page I mentioned?
Yes, it will suggest a bunch of things (I'm not sure the entire list because it only displays the things it should change, not the things that are already working!)
How do you set and check the polling rates?
You can also reduce your mouse polling rate (I always use 125hz on desktop)
Is amd_pstate=guided any better than amd_pstate=active?
asking myself the same question. To be honest I don't understand the difference between the two options.
You can also set the CPU governor to powersave
Remindme! 1 day
I will be messaging you in 1 day on 2023-07-12 15:22:28 UTC to remind you of this link
CLICK THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
Try intel-undervolt or amdctl
Thank you. I think it'd be more comfortable with doing undervolting through the BIOS. But it's great that it's possible through the OS!
I found that I got similar battery performance by using powertop --auto-tune and auto-cpufreq. I also found that since I am only using auto-cpufreq as the more active power manager I get better performance in terms of gaming.
are you measuring consumption from the wall? eco-mode won't help much with idle
Yes, from the wall, as I offset the annual energy consumption (or rather the CO2 equivalent of the country-specific energy mix).
As I understand it, eco mode limits the energy the CPU can maximally draw, so that is only relevant under load.
But I'm honestly wondering if it is actually beneficial to do that, as it might just take longer to complete a task, when eco mode is active, which would offset the savings.
do you have actual total system numbers? because you should be in the 80 - 100w range at idle. the 3000 series ryzens have the 12nm i/o chiplet which can consume like 20w so they all idle high, plus the x570 chipset is another ~7w.
Eco mode is AFAIK almost only lowered PPT.
But yes it makes a difference outside of constant load, at least in short multi core loads. Because, your cores become less efficient the faster they run, and the CPU tends to boost high for any task regardless of whether it is urgent and long or not. At high clocks, basically imagine +20% speed for x200% power consumption, although it really depends on workload.
Are you aware of throttlectl?
I stripped everything from TLP that wasn't Thinkpad specific, and everything checked by powertop (exceeding some of its recommendations about disk io), and a couple of other things to make a very handy, very thorough command-line utility to manage power settings.
Also included in the package, but not installed, are a set of udev rules that enable maximum power saving for nearly everything on boot.
Note that, if you have some older--particularly USB--hardware attached, setting it to powrsave may prevent it from being revived: this is more of an issue between the hardware and the kernel that whatever requests the settings.
Throttlectl seems to be mainly for manual intervention, but it's good to know that it exists. :) Thank you for mentioning it!
Use power-profiles daemon. In their words it's the smartest way of saving energy without being too restrictive on the cpu frequency
I like that they have a section where they compare their daemon to others like TLP and auto-cpufreq! https://gitlab.freedesktop.org/hadess/power-profiles-daemon#why-not
kernel params that should help
amd_pstate=active
workqueue.power_efficient=1
processor.max_cstate=9
The second one looks promising, I'll give it a try! Thanks for mentioning those.
Cpu governor
Paru -S slimbookbattery Or Yay -S slimbookbattery
Try using corectrl to set the CPU governor to `powersave`? Not sure how much that might save. You can also directly write the value as such:
sudo shutdown -hP now
Saves alotta power
!Remindme 1 day
Managed to get 10W idle and 20W Minecraft on a 5600g desktop.
If you get below 50-30W Idle which on new desktops is easy, you are likely to hit your ATX PSU's baseline power consumption, and ATX 80+ standards do not specify any power efficiency guarantees in low loads.
It depends on your computer, but on relatively idle states you either have a significant amount of power consumption from mobo components, hard drives or case fans. Turning off fans can really save power although look out for PCB temps. My b550 chipset pretty sure consumes like 5W, and my ram appears to be on a voltage converter that just releases the rest of the energy to heat so ram voltage has absolutely no impact for me.
Some Ryzen CPU's stop suspending their infinity fabric to lower clock to save power at a certain memory clock, which is more important on chiplset cpu's.
Sometimes dGPU can be fully powered off off in prime even on a desktop, even with nvidia.
Powertop has a bunch of adjustment suggestions for Linux, I can safely turn all of them on except for my mouse.
Pretty sure there's separate bios and linux settings for pcie sleep states.
Lots of hard drive spin ups/downs are not good, however if you access less often it certainly saves power.
If you are on an SSD, it could be (maybe?) be useful to set Linux to write less often, there are lots of settings to change so idk, to maximize the amount that your root drive can spend in sleep.
Ryzenadj can lower your PPT on the fly. I do not need over 15W PPT like 90% of the time.
There are standards to connect/control desktop monitors like DDCI or DPMS, with that you make your monitor adjust brightness to time of day, or make it automatically suspend after a few minutes.
And lastly, and most importantly, measure instead of assuming. A Kill-A-Watt or many similar devices that measure AC power are 10 dollars or less, and you may find other old expensive power suckers at home.
powertop
Deleted before we saved it.
Remindme! 2 day
All that for what? Disabling bluetooth and wifi? Your CPU is consuming 30W at idle just to feed the IO die and infinity fabric. Audio power save? To save a quarter of a watt? Just a bit silly