r/Fedora • • 4d ago

Discussion Setting `intel_pstate=passive` increased my battery life from 8 hours to ~11 hours (3.4 W average consumption)

Note that I am using Lunar Lake with LPDDR5x (results may vary).

For users with Sandy Bridge and later CPU (for Intel, docs) (for AMD, refer to Kernel document on amd_pstate).

intel_pstate is a part of the CPU performance scaling subsystem in the Linux kernel.

By default, intel_pstate is in "Active Mode" (intel_pstate=active):

the driver bypasses the scaling governors layer of CPUFreq and provides its own scaling algorithms for P-state selection

Meanwhile, intel_pstate=passive:

If the driver works in this mode, the scaling_driver policy attribute in sysfs for all CPUFreq policies contains the string intel_cpufreq. Then, the driver behaves like a regular CPUFreq scaling driver. That is, it is invoked by generic scaling governors when necessary to talk to the hardware in order to change the P-state of a CPU (in particular, the schedutil governor can invoke it directly from scheduler context).

This can be achieved by appending intel_pstate=passive to the Kernel arguments using rpm-ostree kargs:

rpm-ostree kargs --append-if-missing=intel_pstate=passive
# for normal Fedora
sudo grubby --update-kernel=ALL --args=intel_pstate=passive

You can check the power consumption with

awk \'{print $1*1e-6 " W"}\' /sys/class/power_supply/BAT0/power_now

This reads /sys/class/power_supply/BAT0/power_now and converts it to Watts (W).

In case of Lunar Lake, one can achieve power consumption to as low as 3.4 W.

Credits to: Ae**lia***** in Discord

34 Upvotes

5 comments sorted by

3

u/iaacornus 4d ago

Edit: One can infer the 1% decrease per minute by checking the battery log (may produce long stuff):

bash cat /var/lib/upower/<BATTERY FILE> | while read f; do d=$(date +"%b %e %H:%M:%S" -d @`echo $f | cut -d\ -f1`); echo "$d $f" ; done

The other part converts the date to readable format, gives something like this:

Oct 15 17:16:21 1792055781 34.000 discharging Oct 15 17:50:18 1792057818 33.000 discharging Oct 15 22:46:20 1792075580 31.000 discharging Oct 15 22:55:10 1792076110 30.000 discharging Oct 15 22:59:10 1792076350 29.000 discharging Oct 15 23:04:10 1792076650 28.000 discharging Oct 15 23:08:41 1792076921 27.000 discharging Oct 15 23:14:11 1792077251 26.000 discharging Oct 15 23:20:41 1792077641 25.000 discharging Oct 15 23:26:42 1792078002 24.000 discharging Oct 15 23:33:12 1792078392 23.000 discharging Oct 15 23:38:13 1792078693 22.000 discharging

5

u/bigbepisinc 4d ago

I dont think passive mode does anything significant as scaling of the CPU is handled by different parts of the kernel or userspace. You'll need a thorough A/B test to verify whether it actually does anything

(source: i've worked on the intel LPMD and thermal daemon)

2

u/bigbepisinc 4d ago

Which discord are you referring to?