What is not working is when I try to use KDE power management to set to cpu governor to Performance. From a cold boot, it sets it at powersave. Find with that. When I want to game, I try to set it at Performance but no dice.
I have to set it manually… Find with that…
sudo cpupower frequency-set -g performance
You guys have any idea what is happening ? Your help is much appreciated…
active pstate ( amd-pstate-epp) does not really need performance. All it needs is telling it which configuration it should use:
cat /sys/devices/system/cpu/cpufreq/policy0/energy_performance_available_preferences
default performance balance_performance balance_power power %
Where power means the more powersaving configuration and performance is self explanatory and the balanced options are balanced with a tendency towards either of those.
I am setting it with the following script at boot with a systemd service (manually run it needs sudo):
#!/bin/bash
sleep 2
# Configurable value
CONFIG_VALUE='balance_power'
# Get the number of CPU threads
NUM_THREADS=$(grep -c ^processor /proc/cpuinfo)
# Loop through each CPU thread and apply the configurable value
for ((i=0; i<NUM_THREADS; i++))
do
THREAD_PATH="/sys/devices/system/cpu/cpufreq/policy$i/energy_performance_preference"
# Check if the energy_performance_preference file exists
if [ -f "$THREAD_PATH" ]; then
echo "$CONFIG_VALUE" > "$THREAD_PATH" 2>/dev/null
fi
done
Personally, my experience is that amd-pstate-epp is good enough that switching for gaming is not necessary any more. It just burns more energy but does not produce noticeably more FPS.
KDE Power Management most likely is not yet compatible with AMD Pstate - never tried to use it although I also use KDE.
edit: to check which configuration is currently active: cat /sys/devices/system/cpu/cpufreq/policy0/energy_performance_preference
Thanks guys for your reply.
If I am understanding correctly, when amd_pstate is activated. I should not worry about modifying the power management in KDE and put it in performance ? It might not even be compatible with amd_pstate ?
To recap the different mode
amd_pstate=passive
When you set amd_pstate=passive, the processor aims for a certain performance level relative to its maximum capacity. Below a specific point, the performance is average, while above it, the performance remains at its best.
amd_pstate=active
Setting amd_pstate=active gives low-level control to the processor’s firmware. It can prioritize either performance or energy efficiency based on software hints AND the amd_pstate_epp driver. The amd_pstate_epp (Energy Performance Preference) driver provides the firmware with a hint. On my rig when I set it amd_pstate to ‘active’ I am only getting ‘Performance’ ‘Powersave’. If we assume that amd_pstate is capable of handling the cpu governor by itself, I would infer that those have no meaning. Would that be correct ?
amd_pstate=guided
Choosing amd_pstate=guided lets the platform automatically select a suitable performance level within a given range based on the workload.
Never tried that one. WIll give it a try.
To recap, I would set the amd_pstate to a desire state as per above and let it organize itself and I would not worry about the cpu governor anymore. Is that correct ?
Just discovered that if I do not add any kernel parameters for amd_pstate, I am still running with amd_pstate-epp. I am trying to understand the function of amd_pstate-epp vs amd_pstate.
The hint to the hardware about the desired tradeoff between energy efficiency and performance is provided by the amd_pstate-epp driver, but the actual changing of the CPU governor in the active mode is handled by the amd_pstate driver.
The amd_pstate_epp driver introduces the “Energy Performance Preference” (EPP) hint, which can be adjusted through the sysfs filesystem. This hint provides a way to bias the hardware towards either performance or energy efficiency.
/sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference and /sys/devices/system/cpu/cpu*/cpufreq/energy_performance_available_preferences, are used to control and view the EPP hint.
with amd_pstate-epp I am running on balance_performance. I will leave it at that. In any case, it seems a very good compromise between performance and powersave when on battery. my rig is a MSI Delta 15 AMD Advantage.
It seems very probable that kDE power management has not caught up with this new approach to power management.
The big question left: Is upower/power-profile-daemon the cause of potential conflicts/bug with amd_pstate (and epp) running ?
I tried all 3, active was the best in my opinion but trying does not hurt.
Exactly, since one of the recent major Kernel releases, active is the default on all compatible CPU’s.
that’s also a good default that can be kept.
I have absolutely no experience with gaming notebooks. My notebook is a Lenovo Thinkpad with a non-Pstate compatible AMD APU, but I would expect that EPP also works great on notebooks (after all, AMD made it the default for a reason at the time it had a good development state)