You are not logged in.

#1 2022-10-26 13:20:14

haigioli
Member
Registered: 2018-09-06
Posts: 69

[SOLVED] amd_pstate kernel module won't load

I've got a Ryzen 9 5900X on an Asus TUF X570-Pro WiFi motherboard.  I'm trying to replace the standard acpi_pstate kernel module with the more effective amd_pstate module. 

When I run lscpu | grep cppc, I get nothing, prompting me to believe that the line I need to put in grub is amd_pstate.shared_mem=1.  When I restart my machine and run cpupower frequency-info | grep driver, I see that acpi_pstate has loaded once again.

When I add initcall_blacklist=acpi_cpufreq_init to the grub kernel line, i get a message to the effect of either an unknown or no driver is loaded for pstates.

This prompts me to ask what motherboard settings should I be looking at and what's the clear and proper way of loading the amd_pstate kernel module with and without shared mem?  There aren't any really clear answers out there that I can see that are producing any results other than what I've just described.

My current kernel is 6.0.2-arch1-1.

Last edited by haigioli (2022-10-27 03:45:36)

Offline

#2 2022-10-26 13:38:46

agapito
Member
From: Who cares.
Registered: 2008-11-13
Posts: 678

Re: [SOLVED] amd_pstate kernel module won't load


Excuse my poor English.

Offline

#3 2022-10-26 13:55:50

haigioli
Member
Registered: 2018-09-06
Posts: 69

Re: [SOLVED] amd_pstate kernel module won't load

@agapito I read the entire post.  Impressed you got it to work.  I've never compiled my own kernel on Arch before.  I'd like to do what you did, so how do I go about compiling the kernel to get amd_pstate to work?

I find it frustrating that my CPU can boost up to 4.95 GHz and I can only take it to 3.7 GHz with acpi_pstate.

Offline

#4 2022-10-26 14:10:14

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 22,677

Re: [SOLVED] amd_pstate kernel module won't load

How are you testing your boost? Boosts will only work for single/few threaded burst workloads, if you use e.g. stress and hammer all your cpu's you'll never see any boost on any driver.

Offline

#5 2022-10-26 14:23:10

haigioli
Member
Registered: 2018-09-06
Posts: 69

Re: [SOLVED] amd_pstate kernel module won't load

I just successfully loaded the kernel module without compiling a new kernel.  Let me share with you and then I have a question:

In grub, I added:

initcall_blacklist=acpi_cpufreq_init amd_pstate.shared_mem=1

Nothing new here.  I did this before, both together and in steps.  This alone did not load the kernel module.  So, once booted, I ran the following:

modprobe amd-pstate

No errors; so I ran:

cpupower frequency-info | grep driver

driver: amd-pstate

After that, I was able to run different governors and get the results I'd wanted all this time.

And now, the question:  how do I make this permanent so that the module loads on every boot?

Offline

#6 2022-10-26 14:50:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 22,677

Re: [SOLVED] amd_pstate kernel module won't load

Add amd-pstate to a .conf file in /etc/modules.load.d - https://wiki.archlinux.org/title/Kernel … le_loading

Offline

#7 2022-10-27 03:44:27

haigioli
Member
Registered: 2018-09-06
Posts: 69

Re: [SOLVED] amd_pstate kernel module won't load

Thanks @V1del.

Okay, for those who want a one-shot solution to the same sort of problem as I was facing, here are the instructions

1)  Add the following to your kernel options:

initcall_blacklist=acpi_cpufreq_init amd_pstate.shared_mem=1

2) Then run:

grub-mkconfig -o /location/of/grub.cfg

mkinitcpio -P

3) Create/edit /etc/modules.load.d/amd-pstate-enable.conf and add the following into it:

#Load amd-pstate module on boot

amd-pstate

4) Edit /etc/default/cpupower by uncommenting governor='ondemand' and replacing it with whatever governor you want tuned in by default on boot:

# Define CPUs governor
# valid governors: ondemand, performance, powersave, conservative, userspace.
governor='performance'
.
.
.

5) Restart your system and run cpupower frequency-info to see if all the changes took:

pupower 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: 131 us
  hardware limits: 550 MHz - 4.95 GHz
  available cpufreq governors: conservative ondemand userspace powersave performance schedutil
  current policy: frequency should be within 550 MHz and 4.95 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 4.95 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.95 GHz.
    AMD PSTATE Nominal Performance: 124. Nominal Frequency: 3.70 GHz.
    AMD PSTATE Lowest Non-linear Performance: 58. Lowest Non-linear Frequency: 1.73 GHz.
    AMD PSTATE Lowest Performance: 19. Lowest Frequency: 550 MHz.

If you see something like the above, then SUCCESS!

Last edited by haigioli (2022-10-27 03:45:01)

Offline

Board footer

Powered by FluxBB