You are not logged in.

#1 2024-04-28 15:01:13

longshot
Member
Registered: 2023-03-31
Posts: 26

[Solved] How to switch performance modes on the IdeaPad L3 15IML05

Scaling driver: intel_pstate
Scaling available governors: performance powersave
Energy performance available preferences: \
default
performance
balance_performance
balance_power
power

When i use performance scaling governer

/sys/devices/system/cpu/cpu0/cpufreq λ  cat energy_performance_preference
performance

Which is guess is normal

But, when i use powersave scaling governer

/sys/devices/system/cpu/cpu0/cpufreq λ  cat energy_performance_preference
balance_performance

which I expect it to be power instead of balance_performance

is There a way to change that? XD Thanks alot.

Last edited by longshot (2024-04-30 12:16:39)


~ A penguin geek who wants to know every file in sysfs

Offline

#2 2024-04-30 07:05:49

yataro
Member
Registered: 2024-03-09
Posts: 93

Re: [Solved] How to switch performance modes on the IdeaPad L3 15IML05

I don't know is there a way to configure this properly, but udev rule should work:

# /etc/udev/rules.d/80-cpu-performance.rules

KERNEL=="cpu[0-9]*", SUBSYSTEM=="cpu", ATTR{cpufreq/scaling_governor}=="powersave", ATTR{cpufreq/energy_performance_preference}="power"

You may want to trigger udev to apply this right away.

Offline

#3 2024-04-30 12:16:14

longshot
Member
Registered: 2023-03-31
Posts: 26

Re: [Solved] How to switch performance modes on the IdeaPad L3 15IML05

yataro wrote:

I don't know is there a way to configure this properly, but udev rule should work:

# /etc/udev/rules.d/80-cpu-performance.rules

KERNEL=="cpu[0-9]*", SUBSYSTEM=="cpu", ATTR{cpufreq/scaling_governor}=="powersave", ATTR{cpufreq/energy_performance_preference}="power"

You may want to trigger udev to apply this right away.

Thanks alot, that acually worked when i trigger udev.

But now I can only switch Performance and Power, and I can't do balance_performance or balance_power options.
I have read some docs on intel_pstate, and I have come up with this script.

#!/bin/sh

cpupower frequency-info -p | grep -q powersave && state=performance || state=powersave

preference=$(echo -e "performance\npower\nbalance_performance\nbalance_power" | dmenu -i -l 5 -p "Using $state governer. Choose an energy preference >> " ) 

if [ "$preference" = performance ]
then
	cpupower frequency-set -g performance
elif [ -n "$preference" ]
then
	cpupower frequency-set -g powersave
	echo setting preference to $preference
	echo -n "$preference" | tee /sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference
fi

# docs.kernel.org:
# The powersave P-state selection algorithm provided by intel_pstate is not a
# counterpart of the generic powersave governor (roughly, it corresponds to the
# schedutil and ondemand governors).

# https://docs.kernel.org/admin-guide/pm/intel_pstate.html?highlight=intel_pstate#active-mode-with-hwp

and that solved the Problem.
Thanks for the influence bro @yataro

Last edited by longshot (2024-04-30 16:42:34)


~ A penguin geek who wants to know every file in sysfs

Offline

Board footer

Powered by FluxBB