Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zen CPU Not Detected #40

Open
gauravkuppa opened this issue Jan 21, 2024 · 4 comments
Open

Zen CPU Not Detected #40

gauravkuppa opened this issue Jan 21, 2024 · 4 comments

Comments

@gauravkuppa
Copy link

I am trying to use zenpower. When I install it, and use sensors or psensor, I do not get any data about the CPU temperature. In my attempts to use zenmonitor, I get an error saying Zen CPU Not Detected.

This is the output of lscpu, indicating that the CPU is recongized by my system.

gauravkuppa24@gauravkuppa24:~/Documents/zenmonitor$ lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         48 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  32
  On-line CPU(s) list:   0-31
Vendor ID:               AuthenticAMD
  Model name:            AMD Ryzen 9 7950X 16-Core Processor
    CPU family:          25
    Model:               97
    Thread(s) per core:  2
    Core(s) per socket:  16
    Socket(s):           1
    Stepping:            2
    Frequency boost:     enabled
    CPU max MHz:         4500.0000
    CPU min MHz:         3000.0000
    BogoMIPS:            8982.94
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mc
                         a cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall n
                         x mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_go
                         od nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl p
                         ni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe
                          popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy sv
                         m extapic cr8_legacy abm sse4a misalignsse 3dnowprefetc
                         h osvw ibs skinit wdt tce topoext perfctr_core perfctr_
                         nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate
                          ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 sm
                         ep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed 
                         adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx
                         512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc c
                         qm_occup_llc cqm_mbm_total cqm_mbm_local avx512_bf16 cl
                         zero irperf xsaveerptr rdpru wbnoinvd cppc arat npt lbr
                         v svm_lock nrip_save tsc_scale vmcb_clean flushbyasid d
                         ecodeassists pausefilter pfthreshold avic v_vmsave_vmlo
                         ad vgif v_spec_ctrl avx512vbmi umip pku ospke avx512_vb
                         mi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx5
                         12_vpopcntdq rdpid overflow_recov succor smca fsrm flus
                         h_l1d
Virtualization features: 
  Virtualization:        AMD-V
Caches (sum of all):     
  L1d:                   512 KiB (16 instances)
  L1i:                   512 KiB (16 instances)
  L2:                    16 MiB (16 instances)
  L3:                    64 MiB (2 instances)
NUMA:                    
  NUMA node(s):          1
  NUMA node0 CPU(s):     0-31
Vulnerabilities:         
  Gather data sampling:  Not affected
  Itlb multihit:         Not affected
  L1tf:                  Not affected
  Mds:                   Not affected
  Meltdown:              Not affected
  Mmio stale data:       Not affected
  Retbleed:              Not affected
  Spec rstack overflow:  Mitigation; safe RET
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl
                          and seccomp
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer
                          sanitization
  Spectre v2:            Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIB
                         P always-on, RSB filling, PBRSB-eIBRS Not affected
  Srbds:                 Not affected
  Tsx async abort:       Not affected

This is my output from tail cpufreq.

~/Documents/zenmonitor$ tail /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
==> /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq <==
480790

==> /sys/devices/system/cpu/cpu10/cpufreq/scaling_cur_freq <==
480424

==> /sys/devices/system/cpu/cpu11/cpufreq/scaling_cur_freq <==
480592

==> /sys/devices/system/cpu/cpu12/cpufreq/scaling_cur_freq <==
479488

==> /sys/devices/system/cpu/cpu13/cpufreq/scaling_cur_freq <==
480138

==> /sys/devices/system/cpu/cpu14/cpufreq/scaling_cur_freq <==
479694

==> /sys/devices/system/cpu/cpu15/cpufreq/scaling_cur_freq <==
480187

==> /sys/devices/system/cpu/cpu16/cpufreq/scaling_cur_freq <==
480717

==> /sys/devices/system/cpu/cpu17/cpufreq/scaling_cur_freq <==
480156

==> /sys/devices/system/cpu/cpu18/cpufreq/scaling_cur_freq <==
482757

==> /sys/devices/system/cpu/cpu19/cpufreq/scaling_cur_freq <==
480047

==> /sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq <==
480301

==> /sys/devices/system/cpu/cpu20/cpufreq/scaling_cur_freq <==
479914

==> /sys/devices/system/cpu/cpu21/cpufreq/scaling_cur_freq <==
480383

==> /sys/devices/system/cpu/cpu22/cpufreq/scaling_cur_freq <==
480626

==> /sys/devices/system/cpu/cpu23/cpufreq/scaling_cur_freq <==
480811

==> /sys/devices/system/cpu/cpu24/cpufreq/scaling_cur_freq <==
480071

==> /sys/devices/system/cpu/cpu25/cpufreq/scaling_cur_freq <==
480010

==> /sys/devices/system/cpu/cpu26/cpufreq/scaling_cur_freq <==
479467

==> /sys/devices/system/cpu/cpu27/cpufreq/scaling_cur_freq <==
479175

==> /sys/devices/system/cpu/cpu28/cpufreq/scaling_cur_freq <==
477933

==> /sys/devices/system/cpu/cpu29/cpufreq/scaling_cur_freq <==
477640

==> /sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq <==
480696

==> /sys/devices/system/cpu/cpu30/cpufreq/scaling_cur_freq <==
480489

==> /sys/devices/system/cpu/cpu31/cpufreq/scaling_cur_freq <==
480233

==> /sys/devices/system/cpu/cpu3/cpufreq/scaling_cur_freq <==
484662

==> /sys/devices/system/cpu/cpu4/cpufreq/scaling_cur_freq <==
481174

==> /sys/devices/system/cpu/cpu5/cpufreq/scaling_cur_freq <==
480169

==> /sys/devices/system/cpu/cpu6/cpufreq/scaling_cur_freq <==
479938

==> /sys/devices/system/cpu/cpu7/cpufreq/scaling_cur_freq <==
479892

==> /sys/devices/system/cpu/cpu8/cpufreq/scaling_cur_freq <==
480541

==> /sys/devices/system/cpu/cpu9/cpufreq/scaling_cur_freq <==
479482
@KebabLord
Copy link

KebabLord commented Mar 27, 2024

@gauravkuppa was living the same issue, applying the patch specified in #39 #36 get it working back, it should work with ryzen9 too.

@Heatsreef
Copy link

@gauravkuppa was living the same issue, applying the patch specified in #39 get it working back, it should work with ryzen9 too.

I think you have linked the wrong issue, you probably meant #36

@KebabLord
Copy link

@gauravkuppa was living the same issue, applying the patch specified in #39 get it working back, it should work with ryzen9 too.

I think you have linked the wrong issue, you probably meant #36

yeah, my bad

@KeithMyers
Copy link

KeithMyers commented Dec 4, 2024

Zenmonitor works on Zen 3 and Zen 4 with the patch in https://github.com/ocerman/zenmonitor/issues/36
since both generations belong to Family 0x19.

IF YOU USE THE FORKED ZENMONITOR3 CODEBASES

But the app won't recognize Zen 5 cpus since they belong to Family 0x1A

The app will just print out "No Zen cpu detected"

But I discovered that if you just replace the #define ZEN3_FAMILY 0x19 statement in the /src/zenmonitor-lib.c file with
#define ZEN3_FAMILY 0x1A
and build the app again, the app detects the Zen 5 cpus like my 9950X's. The underlying zenpower is still not working with Zen 4 or Zen 5, so no voltages or temps but you have other sources for that information.

What it can do is still access the core clocks and core and package powers since those come from the MSR registers.

Doesn't print out the correct "effective frequencies" for the cores since the undocumented MSR registers for FID and FDID have a different range of bits apparently for Zen 5. Effective frequencies in root mode print out nonsense frequencies like 600 Mhz and 16.666 Ghz for cores 0-7 and 8-15.

But the base app in non-root mode does display the core clocks correctly. Main gain is you finally can get what the core and package power consumptions are in idle and max compute loads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants