Fedora Ryzen 1700 CPUgovernor settings

Recently I have noticed the kernel is adjusting the speed of my CPU. I would be fine with it but I can’t seem to get it too play nice for gaming. The CPU governor does not seem to know that a game needs a few threads only and should lock the CPU to max speed. It works for CPU benchmarks etc where loads are heavy and I am not seeing a lot of info on tuning it that works.

I have used the gnome addon and command line. Some examples below. Can you easily disable it without a kernel compile ?

[[email protected] ~]$ cpupower frequency-info
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: Cannot determine or is not supported.
hardware limits: 1.55 GHz - 3.85 GHz
available frequency steps: 3.85 GHz, 1.55 GHz
available cpufreq governors: conservative userspace powersave ondemand performance schedutil
current policy: frequency should be within 3.85 GHz and 3.85 GHz.
The governor “ondemand” may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 3.12 GHz (asserted by call to kernel)
boost state support:
Supported: no
Active: no

sudo cpupower frequency-set -g performance --min 3.85G --max 3.85G
[sudo] password for marten:
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
Setting cpu: 8
Setting cpu: 9
Setting cpu: 10
Setting cpu: 11
Setting cpu: 12
Setting cpu: 13
Setting cpu: 14
Setting cpu: 15

[[email protected] ~]$ grep MHz /proc/cpuinfo | sort
cpu MHz : 3077.308
cpu MHz : 3160.642
cpu MHz : 3193.962
cpu MHz : 3225.420
cpu MHz : 3259.536
cpu MHz : 3272.870
cpu MHz : 3279.759
cpu MHz : 3284.110
cpu MHz : 3293.850
cpu MHz : 3350.050
cpu MHz : 3360.063
cpu MHz : 3435.833
cpu MHz : 3440.138
cpu MHz : 3508.953
cpu MHz : 3658.407
cpu MHz : 3820.655

I saw an ubuntu post about ondemand being tuned by /etc/sysfs.conf with these settings. File did not exist and when I made it with the setting. No effect.

#ondemand’ CPU governor, switch up at 50% load and stay up 10x longer
devices/system/cpu/cpufreq/ondemand/up_threshold = 10
devices/system/cpu/cpufreq/ondemand/sampling_down_factor = 10
devices/system/cpu/cpufreq/ondemand/ignore_nice_load = 1

I know this post is old, and perhaps you’ve already tried this, but you can try manipulating the p-states.