2

Machine with AMD Epyc CPU, kernel 4.19.71 (also tried 5.4.0), attempting to set CPU performance governor fails:

# cpupower frequency-set -g performance
Setting cpu: 0
Error setting new values. Common errors:
- Do you have proper administration rights? (super-user?)
- Is the governor you requested available and modprobed?
- Trying to set an invalid policy?
- Trying to set a specific frequency, but userspace governor is not available,
   for example because of hardware which cannot be set to a specific frequency
   or because the userspace governor isn't loaded?
#

So I begin troubleshooting:

# cpupower frequency-info
analyzing CPU 0:
  no or unknown cpufreq driver is active on this CPU
  CPUs which run at the same hardware frequency: Not Available
  CPUs which need to have their frequency coordinated by software: Not Available
  maximum transition latency:  Cannot determine or is not supported.
Not Available
  available cpufreq governors: Not Available
  Unable to determine current policy
  current CPU frequency: Unable to call hardware
  current CPU frequency:  Unable to call to kernel
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  2000MHz
    Pstate-P1:  1800MHz
    Pstate-P2:  1500MHz
#
# ls /sys/devices/system/cpu/cpufreq/
<Empty>
#
#

Kernel .config has the following options:

CONFIG_CPU_FREQ=y
CONFIG_X86_ACPI_CPUFREQ=y
CONFIG_X86_ACPI_CPUFREQ_CPB=y
CONFIG_X86_INTEL_PSTATE=y
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y

So, I took some time to debug the drivers behaviour -- drivers/cpufreq/cpufreq.c and drivers/cpufreq/acpi-cpufreq.c and found that acpi-cpufreq actually fails with message:

ACPI-based processor performance control unavailable

Call chain is as follows:

cpufreq_add_dev()
  -> cpufreq_online(cpu)
        -> cpufreq_driver->init()  [*]

[*]
acpi_cpufreq_cpu_init()
   -> acpi_processor_register_performance()
         -> acpi_processor_get_performance_info()
             <return -EIO>

As far as I understand, in acpi_processor_get_performance_info() the driver attempts to read _PCT object from ACPI table and fails, because can't find it.

Does this mean that the BIOS has no full support of ACPI, or CPU microcode needs to be updated, or the kernel is missing something?

I would be happy for any advice.

Mark
  • 6,052
  • 8
  • 61
  • 129
  • 1
    [so] is for programming questions, not questions about using or configuring Unix and its utilities. [unix.se] or [su] would be better places for questions like this. – Barmar Jan 12 '21 at 17:17
  • @Barmar, I updated my question with more kernel-specific details, as I tried to debug the issue, and hope someone might shed some light on it. – Mark Jan 29 '21 at 02:05
  • Unless you're a kernel programmer trying to figure out how to fix this problem, it's still not a programming question. – Barmar Jan 29 '21 at 16:42
  • @Mark is there a chance in the BIOS the default setting is CPU for power setting instead of `Os`? I had similar issue at my end for dell server with EPYC – Vipin Varghese Feb 03 '22 at 16:06

0 Answers0