How to set default scaling governor?

Okay so i uncommented it in the file? Is that what I’m supposed to do?

[ricklinux@eos-plasma ~]$ cpupower frequency-info
analyzing CPU 0:
  driver: amd-pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 20.0 us
  hardware limits: 550 MHz - 4.56 GHz
  available cpufreq governors: conservative ondemand userspace powersave performance schedutil
  current policy: frequency should be within 550 MHz and 4.56 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 630 MHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.56 GHz.
    AMD PSTATE Nominal Performance: 142. Nominal Frequency: 3.90 GHz.
    AMD PSTATE Lowest Non-linear Performance: 64. Lowest Non-linear Frequency: 1.76 GHz.
    AMD PSTATE Lowest Performance: 21. Lowest Frequency: 550 MHz.
[ricklinux@eos-plasma ~]$ 

I also notice this. So should i be setting my UEFI Bios to use all cores? Not sure what it’s called?

CPUs which run at the same hardware frequency: 0

You could set:

governor=

in /etc/default/cpupower to any of the governors available that you want to be used at boot.

You could set:

governor=

in /etc/default/cpupower to any of the governors available that you want to be used at boot.

I HIGHLY suggest not to choose “powersave” as your governor. It will cause all cores to run at only the LOWEST frequency, and it won’t allow them to scale up under load…

1 Like

My UEFI settings are ALL Core not per CCX

Edit: Thanks for the insight Btw!

1 Like

So, setting the governor through cpupower does have it’s disadvantages. It seems it sets it quite early, and something else sets it back, so when the desktop loads it’s running powersave governor again, and have to do a systemctl restart cpupower to get it applied (easily) again. This happens about 90% of the time, the other 1/10 boots it applies late enough that it’s running schedutil. Odd. Almost definitely a regression on something, as I have 2 other Endeavour laptops both with Ryzen chips, both using amd-pstate, neither of which I had to install cpupower to force it to use schedutil.

How do i check this? Is it only on laptops?

Edit: I guess I’m getting confused with the terms. You mean that the settings changes from ondemand or whatever you set it at to powersave?

Mine is staying set to ondemand.

[ricklinux@eos-plasma ~]$ sudo cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
[sudo] password for ricklinux: 
ondemand
ondemand
ondemand
ondemand
ondemand
ondemand
ondemand
ondemand
ondemand
ondemand
ondemand
ondemand
ondemand
ondemand
ondemand
ondemand
[ricklinux@eos-plasma ~]$ 

Yeah, I have it set to use the “scedutil” governor in cpupower. And it DOES get set during boot, but AFTER it gets set, something ELSE apparently resets it to “powersave”, which on this machine (ThinkPad T14 G2 (AMD)) is what it wants to default to for some reason. Yeah, my other 2 laptops with Endeavour (Inspiron 7415 2-in-1 and HP Probook 445 G8) staying on schedutil without issues. I didn’t even have to install cpupower to set schedutil, it just defaulted to that.

My SWAG is that for some reason on this hardware amd-pstate wants to use powersave so is overriding the cpupower default when the user gets logged in. But again, that’s just a swag.

Is this just a typo? “schedutil”

Edit: You do have this enabled?

[ricklinux@eos-plasma ~]$ systemctl status cpupower.service
● cpupower.service - Apply cpupower configuration
     Loaded: loaded (/usr/lib/systemd/system/cpupower.service; enabled; preset: disabled)
     Active: active (exited) since Mon 2023-02-20 08:33:28 EST; 2h 30min ago
    Process: 687 ExecStart=/usr/lib/systemd/scripts/cpupower (code=exited, status=0/SUCCESS)
   Main PID: 687 (code=exited, status=0/SUCCESS)
        CPU: 5ms

Feb 20 08:33:28 eos-plasma systemd[1]: Starting Apply cpupower configuration...
Feb 20 08:33:28 eos-plasma systemd[1]: Finished Apply cpupower configuration.
[ricklinux@eos-plasma ~]$ 

no, not a typo, I use schedutil as my governor:

[tim@righttorule ~]$ cpupower frequency-info
analyzing CPU 0:
driver: amd-pstate
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 20.0 us
hardware limits: 400 MHz - 4.51 GHz
available cpufreq governors: conservative ondemand userspace powersave performance schedutil
current policy: frequency should be within 400 MHz and 4.51 GHz.
The governor “schedutil” may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 400 MHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: yes
AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.51 GHz.
AMD PSTATE Nominal Performance: 70. Nominal Frequency: 1.90 GHz.
AMD PSTATE Lowest Non-linear Performance: 41. Lowest Non-linear Frequency: 1.11 GHz.
AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.

Yes, cpupower service is enabled, and it runs. Simply there’s something on my system that AFTER it runs, it putting it BACK to use powersave instead of schedutil. If you look at the journal logs, cpupower successfully started, and successfully set the system to use the schedutil governor. So it’s working. I just have something somewhere that’s then running AFTER it that then undoes it.

I meant the line in your text you spelled it “scedutil” :wink:

OH, didn’t even see that the h was missing in how I typed it. :smiley:

1 Like

What is in your grub command line? Post the url

cat /etc/default/grub | eos-sendlog

I don’t have any of the eos apps installed, I uncheck that entire section when installing. So I’ll just pastebin it.

You got nothing much. I thought maybe you had a string of entries that maybe one would be casuing a problem. But notta!

Yeah, just added the amd-pstate and set my boot theme, other than that it’s totally defaults.

This is gen2 amd? What processor is it? I haven’t been able to make pstate work on my HP with Ryzen 4700U.

T14 Gen2 (AMD), 5850U zen3. And everything used to work, but I’d been experimenting with some things recently. Inevitably one of those probably caused it. However, therein lies the problem. I didn’t follow scientific method and change 1 thing and observe. I changed…a lot. And didn’t observe until after I realized it wasn’t using amd-pstate anymore.

1 Like

Not sure what else you would have changed?

I actually found it. I had ALSO installed cpupower-gui. So it turns out that on this hardware, that doesn’t have the option of using anything but powersave or performance as a default. So it defaults to powersave. And it sets it somehow when you log in as a user. I never actually configured it to control anything at boot, I just used it as a convenient way to view all the cores at once without typing in that whole long string.
So case closed. Don’t install cpupower-gui on a T14 Gen2 (AMD) unless you’re ok with having all your cores run at 400 MHz.

1 Like