Bug 1874538 - missing sysfs cpufreq entries
Summary: missing sysfs cpufreq entries
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 33
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-01 14:51 UTC by Milan Votava
Modified: 2021-01-14 14:10 UTC (History)
21 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-11-24 08:54:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
kernel log (125.02 KB, text/plain)
2020-09-01 14:51 UTC, Milan Votava
no flags Details

Description Milan Votava 2020-09-01 14:51:31 UTC
Created attachment 1713325 [details]
kernel log

Created attachment 1713325 [details]
kernel log

1. Please describe the problem:

On my PC with AMD Ryzen 9 3950X CPU with 16 cores/32 threads,  /sys/devices/system/cpu/cpu*/cpufreq/ entries exist only for cpu0-23, cpu24-cpu31 entries are missing


2. What is the Version-Release number of the kernel:

Linux apex15 5.8.4-200.fc32.x86_64 #1 SMP Wed Aug 26 22:28:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux


3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :

not available


4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:

boot the system, check /sys/devices/system/cpu/* sysfs


5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:

not tried


6. Are you running any modules that not shipped with directly Fedora's kernel?:

no

7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.

Comment 1 Milan Votava 2020-11-03 08:24:34 UTC
the same problem in:

Linux apex15 5.8.17-300.fc33.x86_64 #1 SMP Thu Oct 29 15:55:40 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

$ nproc
32


$ find /sys/devices/system/cpu/cpu*/cpufreq
/sys/devices/system/cpu/cpu0/cpufreq
/sys/devices/system/cpu/cpu10/cpufreq
/sys/devices/system/cpu/cpu11/cpufreq
/sys/devices/system/cpu/cpu12/cpufreq
/sys/devices/system/cpu/cpu13/cpufreq
/sys/devices/system/cpu/cpu14/cpufreq
/sys/devices/system/cpu/cpu15/cpufreq
/sys/devices/system/cpu/cpu16/cpufreq
/sys/devices/system/cpu/cpu17/cpufreq
/sys/devices/system/cpu/cpu18/cpufreq
/sys/devices/system/cpu/cpu19/cpufreq
/sys/devices/system/cpu/cpu1/cpufreq
/sys/devices/system/cpu/cpu20/cpufreq
/sys/devices/system/cpu/cpu21/cpufreq
/sys/devices/system/cpu/cpu22/cpufreq
/sys/devices/system/cpu/cpu23/cpufreq
/sys/devices/system/cpu/cpu2/cpufreq
/sys/devices/system/cpu/cpu3/cpufreq
/sys/devices/system/cpu/cpu4/cpufreq
/sys/devices/system/cpu/cpu5/cpufreq
/sys/devices/system/cpu/cpu6/cpufreq
/sys/devices/system/cpu/cpu7/cpufreq
/sys/devices/system/cpu/cpu8/cpufreq
/sys/devices/system/cpu/cpu9/cpufreq

Comment 2 Werner Sembach 2020-11-19 11:21:00 UTC
Hello,
Werner from TUXEDO Computers here. We ran into the same issue on the Clevo NH5xAx Barebone. The cause is a wrongly configured acpi table.
We reached out to Clevo and are waiting for a fixed UEFI. Maybe you can contact your vendor too and ask if he could also reach out to Clevo for an UEFI update.

Some more in depth information:
We extracted the acpi tables using acpidump and disassembled them using iasl. We found the root of the ACPI Errors in the boot log in ssdt2 and ssdt6: ssdt2 has a list of cpu cores which ends with core 24 (C017 <- hex starting with index 0) while ssdt6 correctly counts up to core 32 (C01F). We believe that this discrepancy causes acpi calls on cores 25-31 and therefore cpufreq on this cores to fail.

Comment 3 Werner Sembach 2020-11-19 11:57:42 UTC
Small addition: It is definitely the broken ssdt2 table causing the issue:
I fixed the issue by fixing and recompiling ssdt2 using iasl and overloading the broken table during boot using grubs acpi command (http://www.gnu.org/software/grub/manual/grub/html_node/acpi.html).

Comment 4 Milan Votava 2020-11-24 08:54:26 UTC
Thank you for the report. I have the same barebone (XMG Apex 15 in my case) so the root cause of the problem should be the same. I will contact XMG and ask them to push Clevo to issue a fixed BIOS :-) I'm closing the issue.

Comment 5 Milan Votava 2020-12-29 09:47:14 UTC
a followup,

Based on your feedback, I decompiled, fixed (added missing CPU entries) and recompiled the "bad" table (ssdt7 in my case). Now I have all the Ryzen 3950x cpufreq entries visible in sysfs. But as a side effect I found a (probably) real bug, this time in grub. When I loaded the fixed table using grub's acpi command, cpufreq entries were fixed, but I lost the possibility to control display backlight from keyboard and I found the kernel is having problem to find some acpi nvidia devices. Later I found the reason. The grub acpi command not only loaded the fixed acpi table but also REVERSED the order of other acpi tables (when copying the list of acpi tables from ROM to RAM). I solved the problem temporarily by calling the grub acpi command twice to fix the order :-)

acpi
acpi /ssdt7.aml

Comment 6 Werner Sembach 2021-01-14 14:10:20 UTC
Good to see that you fixed it.

Our fix is now online too: https://github.com/tuxedocomputers/tuxedo-corefix-clevo-nh5xax

It loads the acpi table during early boot from the initramfs image.

It has a script for initramfs-tools und dracut to place the fix there and is only tested on Ubuntu and OpenSUSE respectively.

I don't know which tool the RedHat distro family is using, but I think it should be easily adopable if it is none of the two.


Note You need to log in before you can comment on or make changes to this bug.