Kernel Errors in latest core update

After applying the latest update I am now getting a kernel error. If anyone knows what I need to do to correct these errors then please let me know.

Kernel and Firewall:

WARNING: Kernel Errors Present
amd_pstate_ut: amd_pstate_ut_check_perf read CPPC_CAP1 ret=-5 error! …: 1 Time(s)
amd_pstate_ut: amd_pstate_ut_pstate_enable rdmsrl_safe MSR_AMD_CPPC_ENABLE ret=-5 error! …: 1 Time(s)

Thank you in advance for any help offered.

amd pstate is the AMD driver for the cpu frequency control mechanism.

Although there was no message indicating that a reboot was required, did you do a reboot or not.
If not maybe a reboot would be useful. Not sure but it shouldn’t hurt.

Do you have the cpufrequtils addon installed.,

If yes then maybe uninstalling the addon and then re-installing it might help to get aligned.

Just to confirm, when you say latest core update, you do mean from CU179 to CU180. If yes, then I am not sure why the problem should occur now as there was no kernel update in CU180 and also the cpufrequtils addon hasn’t had an update.

Doing an internet search for those specific errors doesn’t come up with anything just links to the amd pstate info generally.

I can confirm the presence of logs

17:14:03 kernel:  amd_pstate_ut: 4 amd_pstate_ut_check_freq^I fail!
17:14:03 kernel:  amd_pstate_ut: amd_pstate_ut_check_freq cpu0 max=1146803520 >= nominal=114933928 0 > lowest_nonlinear=-23502 > min=-23502 > 0, the formula is incorrect!
17:14:03 kernel:  amd_pstate_ut: 3 amd_pstate_ut_check_perf^I fail!
17:14:03 kernel:  amd_pstate_ut: amd_pstate_ut_check_perf read CPPC_CAP1 ret=-5 error!
17:14:03 kernel:  amd_pstate_ut: get_shared_mem unable to open /sys/module/amd_pstate/parameters/s hared_mem file!
17:14:03 kernel:  amd_pstate_ut: 2 amd_pstate_ut_check_enabled^I fail!
17:14:03 kernel:  amd_pstate_ut: amd_pstate_ut_pstate_enable rdmsrl_safe MSR_AMD_CPPC_ENABLE ret=- 5 error!
17:14:03 kernel:  amd_pstate_ut: get_shared_mem unable to open /sys/module/amd_pstate/parameters/s hared_mem file!
17:14:03 kernel:  amd_pstate_ut: 1 amd_pstate_ut_acpi_cpc_valid^I fail!
17:14:03 kernel:  amd_pstate_ut: amd_pstate_ut_acpi_cpc_valid the _CPC object is not present in SB IOS!

After uninstalling cpufrequtil and restarting IPFire, amd_pstate_ut errors disappear.
After reinstalling cpufrequtils and restarting IPFire, the errors are visible.

However, amd_pstate_ut: errors are visible before upgrading to CU180.

e.g.

Oct 10 04:00:07  kernel: amd_pstate_ut: amd_pstate_ut_acpi_cpc_valid the _CPC object is not present in SBIOS!
Oct 10 04:00:07  kernel: amd_pstate_ut: 1    amd_pstate_ut_acpi_cpc_valid^I fail!
Oct 10 04:00:07  kernel: amd_pstate_ut: get_shared_mem unable to open /sys/module/amd_pstate/parameters/shared_mem file!
Oct 10 04:00:07  kernel: amd_pstate_ut: amd_pstate_ut_pstate_enable rdmsrl_safe MSR_AMD_CPPC_ENABLE ret=-5 error!
Oct 10 04:00:07  kernel: amd_pstate_ut: 2    amd_pstate_ut_check_enabled^I fail!
Oct 10 04:00:07  kernel: amd_pstate_ut: get_shared_mem unable to open /sys/module/amd_pstate/parameters/shared_mem file!
Oct 10 04:00:07  kernel: amd_pstate_ut: amd_pstate_ut_check_perf read CPPC_CAP1 ret=-5 error!
Oct 10 04:00:07  kernel: amd_pstate_ut: 3    amd_pstate_ut_check_perf^I fail!
Oct 10 04:00:07  kernel: amd_pstate_ut: amd_pstate_ut_check_freq cpu0 max=73704592 >= nominal=73704336 > lowest_nonlinear=-24169 > min=-24169 > 0, the formula is incorrect!
Oct 10 04:00:07  kernel: amd_pstate_ut: 4    amd_pstate_ut_check_freq^I fail!

BR

edit:

Processor
Intel(R) Celeron(R) J4105 CPU @ 1.50GHz x4
64 bit AES-NI NX PAE RDRAND VT-x/AMD-V 

https://fireinfo.ipfire.org/profile/e8af17aa07b62a277979e02531ed944f7fc6a97e

Smells like a small bug.

Could this be a BIOS/UEFI fault ?

I am using an AMD APU, with cpufrequtils installed and get no errors in system log, after just upgrading to CU 180 stable. What do the many users on APU4 machines find ?

The amd pstate CPU performance scaling driver is supported from Zen2 and newer processors so is not available for the processor used in the APU machines.

Thanks for that update.

Looks like the amd pstate CPU performance scaling driver is not needed anyway for APU. Mine typically reports CPU frequency in the range 600 to 700 MHz, although its nominal frequency is 1000 MHz.

Older amd processors use the ACPI driver for the frequency stuff.

I also have an APU4 and it has been going between 900 and 980 MHz.

Since the CU180 release it is going between 945 and 980 MHz but to be honest I rarely look at that graph and don’t get worried about it at all.

The frequency could have tightened up in range because of the various package updates and removing old cruft in the networking code, so the CPU is concentrating more on the core firewall activities but I don’t really know.

I’m using an I7 zeon CPU. The only AMD component is the video card.

I am not familiar with this CPU…

Interesting.

Let’s see what your system says for the scaling driver that is being used.

On the console run the command

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver

On my apu4 based system I get
acpi-cpufreq

On an amd system that is able to use the pstate it would be
amd-pstate

and for an intel system
intel_pstate

There are other possibilities it could be for older intel and amd processors.

Let us know what you find.

The result has my IPFire: intel_cpufreq

FWIW, on my Core Update 179Intel(R) Celeron(R) CPU 3867U @ 1.80GHz x2
I also see the amd_pstate_ut messages

[root@ipfire log]# grep amd_pstate messages
Oct  8 02:46:51 ipfire kernel: amd_pstate_ut: amd_pstate_ut_acpi_cpc_valid the _CPC object is not present in SBIOS!
Oct  8 02:46:51 ipfire kernel: amd_pstate_ut: 1    amd_pstate_ut_acpi_cpc_valid^I fail!
Oct  8 02:46:51 ipfire kernel: amd_pstate_ut: get_shared_mem unable to open /sys/module/amd_pstate/parameters/shared_mem file!
Oct  8 02:46:51 ipfire kernel: amd_pstate_ut: amd_pstate_ut_pstate_enable rdmsrl_safe MSR_AMD_CPPC_ENABLE ret=-5 error!
Oct  8 02:46:51 ipfire kernel: amd_pstate_ut: 2    amd_pstate_ut_check_enabled^I fail!
Oct  8 02:46:51 ipfire kernel: amd_pstate_ut: get_shared_mem unable to open /sys/module/amd_pstate/parameters/shared_mem file!
Oct  8 02:46:51 ipfire kernel: amd_pstate_ut: amd_pstate_ut_check_perf read CPPC_CAP1 ret=-5 error!
Oct  8 02:46:51 ipfire kernel: amd_pstate_ut: 3    amd_pstate_ut_check_perf^I fail!
Oct  8 02:46:51 ipfire kernel: RIP: 0010:amd_pstate_ut_check_freq+0x3d/0xfb [amd_pstate_ut]
Oct  8 02:46:51 ipfire kernel:  ? amd_pstate_ut_check_freq+0x3d/0xfb [amd_pstate_ut]
Oct  8 02:46:51 ipfire kernel:  amd_pstate_ut_init+0x1e/0x1000 [amd_pstate_ut]

[Edit] However this seems to have no negative impact on intel_pstate

cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 4294.55 ms.
  hardware limits: 400 MHz - 1.80 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 400 MHz and 1.80 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 900 MHz.
analyzing CPU 1:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 1
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 4294.55 ms.
  hardware limits: 400 MHz - 1.80 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 400 MHz and 1.80 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 900 MHz.

This was an interim option for processors that were not able to use the intel_pstate

Here is what the Arch Linux wiki page on cpu frequency scaling says about intel_cpufreq

Starting with kernel 5.7, the intel_pstate scaling driver selects “passive mode” aka intel_cpufreq for CPUs that do not support hardware-managed P-states (HWP), i.e. Intel Core i 5th generation or older. This driver acts similar to the ACPI driver on Intel CPUs, except that it does not have the 16-pstate limit of ACPI.

I would suspect that there is some bug in the kernel that is trying to use the amd_pstate driver when the processor is an intel cpu.

The last kernel update was in CU178 with a change to 6.1.45

CU181 will have an update to 6.1.57

1 Like

The output I received was “acpi-cpufreq”.

I removed the cpufrequtils package, but then:

  • cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver reported “file not found”
  • current freq went up about 150 MHz, for similar usage

Reinstalled cpufrequtils package & rebooted then:

  • cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver reported “acpi-cpufreq”
  • current freq soon returned to previous level

The reboot showed 4 CPU scaling drivers loading, including amd_pstate & acpi-cpufreq

I conclude that cpufrequtils is useful with AMD APU

1 Like

A post was split to a new topic: Pci error - AER: Multiple Corrected error received

this amd_pstate_ut problem was a bug in the cpufreq initskript.
It try to load the cpufreq driver modules. But amd_pstate_ut is no driver.
It is a utility module to test the bios parameters for amd pstate. It give a oops on intel systems and off course complain about missing bios parametes…

The fixed cpufrequtils is in testing and will go to stable with core184

2 Likes