What config do you use to reduce battery usage on your laptop. I’m currently using HP 845 G10 with Ryzen 7840 HS cpu but I can’t get the battery in idle mode under 4.5W. I see some benchmark that the similar system can get below 2W on idle.
I’d take a look around the nixos-hardware repo. Some previous versions of your laptop have existing configs, and the general laptop modules should be helpful too: https://github.com/NixOS/nixos-hardware/tree/master/hp/elitebook/845
I’ve already included that in the config.
First things first:
- Check out the arch documentations on that; usually that is the best place to start.
- Powertop can give you some ideea who the culprits are.
- If no immediate culprits, are you running the latest kernel?
boot.kernelPackages = pkgs.linuxPackages_latest;
- Are there any udev rules you’ll want to apply manually? (check WriteShellScriptBin system path in udev rule)
There are some options for controllong cpu power consumption
- I have tlp installed so almost powertop tunes are good already.
- The kernel is already latest
- I have a look on the Archwiki, the only suspicious things that I detected is when I running this command to check whether ASPM enabled (Power management - ArchWiki), many of them are disabled:
➜ sudo lspci -vv | grep 'ASPM.*abled;'
LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk-
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk-
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
pcilib: Error reading /sys/bus/pci/devices/0000:00:08.3/label: Operation not permitted
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
- Here is output on my machine when running: Power management - ArchWiki, is there any thing that I could improve?
I have never done this, but for AMD CPUs after Zen 1 there is a different CPU frequency scaling driver called amd-pstate
that you could try. In theory is might give you better powersaving features.
First you can check if you aren’t already running it by doing a
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
If you are running the generic acpi-cpufreq
you might want to look at this writeup. Even though it says Linux 5.17 this is still not enabled by default:
I’ve already done that also, I’m using kernel 6.6 so amd_pstate active mode is already enabled by default. I also having these config in tlp:
CPU_DRIVER_OPMODE_ON_AC = "active";
CPU_DRIVER_OPMODE_ON_BAT = "active";
CPU_SCALING_GOVERNOR_ON_AC = "powersave";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_AC = "power";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
These do not “control cpu power consumption”. They slow down frequency scaling which, IME, more often than not leads to serious performance issues and at best mildly lower power usage peaks. You do not want the powersave
governor, not even on a laptop.
What you actually need to do in order to limit power usage is to, well, place power limits. For Intel there is undervolt
which can adjust PL1/PL2 but I don’t know the best option for AMD CPUs. Googling reveals that there should be some options available and the Steam Deck is obviously capable of doing that too.
thanks for clarifying
This is true, but for the cases of modern laptops; For example my T14s gen 3, which has more than enough cores … it is noticeably jankier on some ocasions, but not janky enough for it to annoy me. I would say that for any modern laptop that is properly speced, the powersave governor is ok. I get between 4-5W on idle, 7-9W when doing docker and compiling, battery lasts almost a full day of actual work.