TheTumultuousUnicornOfDarkness / CPU-X

CPU-X is a Free software that gathers information on CPU, motherboard and more
https://thetumultuousunicornofdarkness.github.io/CPU-X
GNU General Public License v3.0
2.05k stars 134 forks source link

Wrong core count and cache info on Ryzen 3 2200g #86

Closed ocerman closed 6 years ago

ocerman commented 6 years ago

Describe the bug/Expected behavior CPU-X reports 2 cores / 4 threads, however this chip has 4 cores / 4 threads. Also CPU-X reports different cache sizes than CPU-Z / hardinfo.

2200g-cpux-cpu

2200g-cpuz 2200g-hardinfo

Additional information

CPU-X dump

ondrej@ryzen3:~/Dokumenty$ sudo ./CPU-X_v3.2.3_portable.linux64 --issue-fmt
CPU-X 3.2.3 
Copyright © 2014-2018 Xorg

This is free software: you are free to change and redistribute it.
This program comes with ABSOLUTELY NO WARRANTY
See the GNU GPL v3 license: <https://www.gnu.org/licenses/gpl.txt>

Built on Jul  1 2018, 19:45:18 (with GNU 8.1.1 20180531 on linux64).
-- GTK       version: 3.22.30
-- NCURSES   version: 6.1.20180127
-- LIBCURL   version: 7.58.0
-- LIBCPUID  version: 0.4.0
-- LIBPCI    version: 3.5.6
-- LIBPROCPS version: 3.3.14
-- DMIDECODE version: 3.1.20180620
-- BANDWIDTH version: 1.5.1
Setting label names
Calling libcpuid for retrieving static data
Finding CPU technology
version=0.4.0
basic_cpuid[0]=0000000d 68747541 444d4163 69746e65
basic_cpuid[1]=00810f10 02040800 7ed8320b 178bfbff
basic_cpuid[2]=00000000 00000000 00000000 00000000
basic_cpuid[3]=00000000 00000000 00000000 00000000
basic_cpuid[4]=00000000 00000000 00000000 00000000
basic_cpuid[5]=00000040 00000040 00000003 00000011
basic_cpuid[6]=00000004 00000000 00000001 00000000
basic_cpuid[7]=00000000 209c01a9 00000000 00000000
basic_cpuid[8]=00000000 00000000 00000000 00000000
basic_cpuid[9]=00000000 00000000 00000000 00000000
basic_cpuid[10]=00000000 00000000 00000000 00000000
basic_cpuid[11]=00000000 00000000 00000000 00000000
basic_cpuid[12]=00000000 00000000 00000000 00000000
basic_cpuid[13]=00000007 00000340 00000340 00000000
basic_cpuid[14]=00000000 00000000 00000000 00000000
basic_cpuid[15]=00000000 00000000 00000000 00000000
basic_cpuid[16]=00000000 00000000 00000000 00000000
basic_cpuid[17]=00000000 00000000 00000000 00000000
basic_cpuid[18]=00000000 00000000 00000000 00000000
basic_cpuid[19]=00000000 00000000 00000000 00000000
basic_cpuid[20]=00000000 00000000 00000000 00000000
basic_cpuid[21]=00000000 00000000 00000000 00000000
basic_cpuid[22]=00000000 00000000 00000000 00000000
basic_cpuid[23]=00000000 00000000 00000000 00000000
basic_cpuid[24]=00000000 00000000 00000000 00000000
basic_cpuid[25]=00000000 00000000 00000000 00000000
basic_cpuid[26]=00000000 00000000 00000000 00000000
basic_cpuid[27]=00000000 00000000 00000000 00000000
basic_cpuid[28]=00000000 00000000 00000000 00000000
basic_cpuid[29]=00000000 00000000 00000000 00000000
basic_cpuid[30]=00000000 00000000 00000000 00000000
basic_cpuid[31]=00000000 00000000 00000000 00000000
ext_cpuid[0]=8000001f 68747541 444d4163 69746e65
ext_cpuid[1]=00810f10 20000000 35c233ff 2fd3fbff
ext_cpuid[2]=20444d41 657a7952 2033206e 30303232
ext_cpuid[3]=69772047 52206874 6f656461 6556206e
ext_cpuid[4]=47206167 68706172 20736369 00202020
ext_cpuid[5]=ff40ff40 ff40ff40 20080140 40040140
ext_cpuid[6]=26006400 66006400 02006140 00208140
ext_cpuid[7]=00000000 0000001b 00000000 00006599
ext_cpuid[8]=00003030 00001007 00004003 00000000
ext_cpuid[9]=00000000 00000000 00000000 00000000
ext_cpuid[10]=00000001 00008000 00000000 0001bcff
ext_cpuid[11]=00000000 00000000 00000000 00000000
ext_cpuid[12]=00000000 00000000 00000000 00000000
ext_cpuid[13]=00000000 00000000 00000000 00000000
ext_cpuid[14]=00000000 00000000 00000000 00000000
ext_cpuid[15]=00000000 00000000 00000000 00000000
ext_cpuid[16]=00000000 00000000 00000000 00000000
ext_cpuid[17]=00000000 00000000 00000000 00000000
ext_cpuid[18]=00000000 00000000 00000000 00000000
ext_cpuid[19]=00000000 00000000 00000000 00000000
ext_cpuid[20]=00000000 00000000 00000000 00000000
ext_cpuid[21]=00000000 00000000 00000000 00000000
ext_cpuid[22]=00000000 00000000 00000000 00000000
ext_cpuid[23]=00000000 00000000 00000000 00000000
ext_cpuid[24]=00000000 00000000 00000000 00000000
ext_cpuid[25]=f040f040 00000000 00000000 00000000
ext_cpuid[26]=00000003 00000000 00000000 00000000
ext_cpuid[27]=000003ff 00000000 00000000 00000000
ext_cpuid[28]=00000000 00000000 00000000 00000000
ext_cpuid[29]=00000121 01c0003f 0000003f 00000000
ext_cpuid[30]=00000002 00000002 00000000 00000000
ext_cpuid[31]=0000000f 0000016f 0000000f 00000000
intel_fn4[0]=00000000 00000000 00000000 00000000
intel_fn4[1]=00000000 00000000 00000000 00000000
intel_fn4[2]=00000000 00000000 00000000 00000000
intel_fn4[3]=00000000 00000000 00000000 00000000
intel_fn4[4]=00000000 00000000 00000000 00000000
intel_fn4[5]=00000000 00000000 00000000 00000000
intel_fn4[6]=00000000 00000000 00000000 00000000
intel_fn4[7]=00000000 00000000 00000000 00000000
intel_fn11[0]=00000000 00000000 00000000 00000000
intel_fn11[1]=00000000 00000000 00000000 00000000
intel_fn11[2]=00000000 00000000 00000000 00000000
intel_fn11[3]=00000000 00000000 00000000 00000000
intel_fn12h[0]=00000000 00000000 00000000 00000000
intel_fn12h[1]=00000000 00000000 00000000 00000000
intel_fn12h[2]=00000000 00000000 00000000 00000000
intel_fn12h[3]=00000000 00000000 00000000 00000000
intel_fn14h[0]=00000000 00000000 00000000 00000000
intel_fn14h[1]=00000000 00000000 00000000 00000000
intel_fn14h[2]=00000000 00000000 00000000 00000000
intel_fn14h[3]=00000000 00000000 00000000 00000000
Calling libcpuid for retrieving CPU MSR static values
CPU is AuthenticAMD AMD Ryzen 3 2200G with Radeon Vega Graphics    , stock clock is 3494MHz.
msr[0xc0010061]=00 00 00 00 00 00 00 20 
msr[0xc0010063]=00 00 00 00 00 00 00 02 
msr[0xc0010064]=80 00 00 00 48 c6 08 8c 
msr[0xc0010065]=80 00 00 00 45 d7 0c 8a 
msr[0xc0010066]=80 00 00 00 44 1b 10 80 
msr[0xc0010067]=00 00 00 00 40 16 00 00 
msr[0xc0010068]=00 00 00 00 40 16 00 00 
msr[0xc0010069]=00 00 00 00 40 16 00 00 
msr[0xc001006a]=00 00 00 00 40 16 00 00 
msr[0xc001006b]=00 00 00 00 40 16 00 00 
Calling dmidecode
Finding devices
Finding graphic card driver
Identifying running system
Retrieving motherboard informations in fallback mode
Calling libcpuid for retrieving dynamic data
Calling libcpuid for retrieving CPU MSR dynamic values
Calculating CPU usage
Retrieving CPU temperature in fallback mode
Calculating CPU multipliers
Calling bandwidth
Calling libprocps
Retrieving GPU temperature
Retrieving GPU clocks
CPU-X:util.c:212: an error occurred while running command 'awk '/GPU Load/ { print $3 }' /sys/kernel/debug/dri/0/amdgpu_pm_info' (fgets)
awk: line 1: regular expression compile failed (missing operand)
*
CPU-X:util.c:212: an error occurred while running command 'awk -v FS='(: |Mhz)' '/*/ { print $2 }' /sys/bus/pci/devices/0000:38:00.0/drm/card0/pp_dpm_sclk' (fgets)
awk: line 1: regular expression compile failed (missing operand)
*
CPU-X:util.c:212: an error occurred while running command 'awk -v FS='(: |Mhz)' '/*/ { print $2 }' /sys/bus/pci/devices/0000:38:00.0/drm/card0/pp_dpm_mclk' (fgets)
CPU-X:core.c:954: failed to retrieve GPU clocks
Updating benchmark status
Dumping data...
  >>>>>>>>>> CPU <<<<<<<<<<

    ***** Processor *****
          Vendor: AMD
       Code Name: Ryzen 3 (Raven Ridge)
         Package: AM4
      Technology: 14 nm
         Voltage: 0.870 V
   Specification: AMD Ryzen 3 2200G with Radeon Vega Graphics 
          Family: 0XF
     Ext. Family: 0X17
           Model: 0X1
      Ext. Model: 0X11
           Temp.: 28.62°C
        Stepping: 0
    Instructions: HT, MMX(+), SSE(1, 2, 3, 3S, 4.1, 4.2, 4A), AVX(1, 2), FMA(3), AES, CLMUL, RdRand, AMD-V, x86-64

    ***** Clocks *****
      Core Speed: 1475 MHz
      Multiplier: x14.4 (16-34)
       Bus Speed: 102.76 MHz
           Usage:   4.73 %

    ***** Cache *****
         L1 Data: 2 x 32 KB, 8-way
        L1 Inst.: 2 x 64 KB, 8-way
         Level 2: 2 x 512 KB, 8-way
         Level 3: 4 MB, 16-way

    ***** * *****
       Socket(s): 1
         Core(s): 2
       Thread(s): 4

  >>>>>>>>>> Caches <<<<<<<<<<

    ***** L1 Cache *****
            Size: 2 x 64 KB, 8-way associative, 64-byte line size
           Speed: 106182.30 MB/s

    ***** L2 Cache *****
            Size: 2 x 512 KB, 8-way associative, 64-byte line size
           Speed: 102969.40 MB/s

    ***** L3 Cache *****
            Size: 4 MB, 16-way associative, 64-byte line size
           Speed: 61789.80 MB/s

  >>>>>>>>>> Motherboard <<<<<<<<<<

    ***** Motherboard *****
    Manufacturer: ASRock
           Model: AB350 Pro4
        Revision: 

    ***** BIOS *****
           Brand: American Megatrends Inc.
         Version: P4.70
            Date: 02/12/2018
        ROM Size: 64 kB / 16 MB

    ***** Chipset *****
          Vendor: Advanced Micro Devices, Inc. [AMD]
           Model: FCH LPC Bridge

  >>>>>>>>>> Memory <<<<<<<<<<

    ***** Bank 0 *****
       Reference: Unknown Unknown, Empty @ (Unknown Unknown)

    ***** Bank 1 *****
       Reference: Unknown 3000 C16 Series, 4096 MB @ 3066MHz (DIMM DDR4)

    ***** Bank 2 *****
       Reference: Unknown Unknown, Empty @ (Unknown Unknown)

    ***** Bank 3 *****
       Reference: Unknown 3000 C16 Series, 4096 MB @ 3066MHz (DIMM DDR4)

  >>>>>>>>>> System <<<<<<<<<<

    ***** Operating System *****
          Kernel: Linux 4.18.0-10-generic
    Distribution: Ubuntu 18.10
        Hostname: ryzen3
          Uptime: 0 days, 0 hours, 23 minutes, 19 seconds
        Compiler: 

    ***** Memory *****
            Used:  1094 MB /  7125 MB
         Buffers:    62 MB /  7125 MB
          Cached:  1039 MB /  7125 MB
            Free:  4928 MB /  7125 MB
            Swap:     0 MB /  2097 MB

  >>>>>>>>>> Graphics <<<<<<<<<<

    ***** Card 0 *****
          Vendor: AMD (amdgpu driver)
           Model: Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series]
     Temperature: 37.00°C
           Usage: 
       GPU clock: 
    Memory clock: 

Freeing memory
TheTumultuousUnicornOfDarkness commented 6 years ago

Thank you for your report.

CPU-X reports 2 cores / 4 threads, however this chip has 4 cores / 4 threads.

Ok. The patch is ready, I will open a PR on libcpuid repo.

Also CPU-X reports different cache sizes than CPU-Z / hardinfo.

It's related to wrong cores count. Otherwise, the L1 Inst cache is 8-way instead of 4-way. In fact, this information is not exposed by libcpuid, and another patch is required to fix it.