CoreFreq icon indicating copy to clipboard operation
CoreFreq copied to clipboard

Incorrect temperature on 9950x

Open moetayuko opened this issue 6 months ago • 39 comments

❯ corefreq-cli -C 1
CPU Freq(MHz) VID  Vcore  TMP(C)    Accumulator       Energy(J)     Power(W)
000   45.69   144  0.9000   34  000000000000017680    0.269775391   0.269775391
001   72.80   144  0.9000   34  000000000000014518    0.221527100   0.221527100
002   55.16   144  0.9000   34  000000000000009318    0.142181396   0.142181396
003   38.04   144  0.9000   34  000000000000012885    0.196609497   0.196609497
004   33.44   144  0.9000   34  000000000000005478    0.083587646   0.083587646
005  111.49   144  0.9000   34  000000000000022974    0.350555420   0.350555420
006   11.37   144  0.9000   34  000000000000002650    0.040435791   0.040435791
007    6.79   144  0.9000   34  000000000000002502    0.038177490   0.038177490
008    1.45   144  0.9000   35  000000000000000955    0.014572144   0.014572144
009    1.72   144  0.9000   35  000000000000000926    0.014129639   0.014129639
010    0.82   144  0.9000   35  000000000000006141    0.093704224   0.093704224
011    1.25   144  0.9000   35  000000000000005767    0.087997437   0.087997437
012    1.00   144  0.9000   35  000000000000001133    0.017288208   0.017288208
013    2.71   144  0.9000   35  000000000000000746    0.011383057   0.011383057
014    1.80   144  0.9000   35  000000000000001279    0.019515991   0.019515991
015    1.16   144  0.9000   35  000000000000000735    0.011215210   0.011215210
016   13.98   144  0.9000   34  000000000000000000    0.000000000   0.000000000
017   18.64   144  0.9000   34  000000000000000000    0.000000000   0.000000000
018    6.12   144  0.9000   34  000000000000000000    0.000000000   0.000000000
019    6.35   144  0.9000   34  000000000000000000    0.000000000   0.000000000
020    4.55   144  0.9000   34  000000000000000000    0.000000000   0.000000000
021  100.82   144  0.9000   34  000000000000000000    0.000000000   0.000000000
022   11.95   144  0.9000   34  000000000000000000    0.000000000   0.000000000
023    5.20   144  0.9000   34  000000000000000000    0.000000000   0.000000000
024    1.03   144  0.9000   35  000000000000000000    0.000000000   0.000000000
025    0.97   144  0.9000   35  000000000000000000    0.000000000   0.000000000
026   84.94   144  0.9000   35  000000000000000000    0.000000000   0.000000000
027   35.21   144  0.9000   35  000000000000000000    0.000000000   0.000000000
028    3.04   144  0.9000   35  000000000000000000    0.000000000   0.000000000
029    2.03   144  0.9000   35  000000000000000000    0.000000000   0.000000000
030    2.54   144  0.9000   35  000000000000000000    0.000000000   0.000000000
031    1.04   144  0.9000   35  000000000000000000    0.000000000   0.000000000

             Package[0]    Cores         Uncore        Memory        Platform
Energy(J):  40.838531494   1.612655640   0.000000000   0.000000000   0.000000000
Power(W) :  40.838531494   1.612655640   0.000000000   0.000000000   0.000000000
❯ sensors k10temp-pci-00c3      
k10temp-pci-00c3
Adapter: PCI adapter
Tctl:         +52.1°C

The temperature reported by k10temp is correct.

Additionally, corefreq-cli -C 1 sometimes fails to respond, and I need to press Ctrl+C and rerun it multiple times to obtain the output.

System Information
❯ corefreq-cli -s                          
Processor                                  [AMD Ryzen 9 9950X 16-Core Processor]
|- Architecture                                             [Zen5/Granite Ridge]
|- Vendor ID                                                      [AuthenticAMD]
|- Microcode                                                        [0x0b404032]
|- Signature                                                           [  BF_44]
|- Stepping                                                            [      0]
|- Online CPU                                                          [ 32/ 32]
|- Base Clock                                                          [100.000]
|- Frequency            (MHz)                      Ratio                        
                 Min   3000.00                    <  30 >                       
                 Max   4299.99                    <  43 >                       
|- Factory                                                             [100.000]
                       4300                       [  43 ]                       
|- Performance                                                                  
                 TGT   4299.99                    <  43 >                       
   |- CPPC                                                                      
                 Min   3699.99                    <  37 >                       
                 Max    400.00                    <   4 >                       
                 TGT      AUTO                    <   0 >                       
   |- Boost                                                            [ UNLOCK]
                 XFR   5699.99                    [  57 ]                       
                 CPB   5699.99                    [  57 ]                       
   |- P-State                                                                   
                 P1    3000.00                    <  30 >                       
|- Uncore                                                              [   LOCK]
                 CLK   1600.00                    [  16 ]                       
                 MEM   3199.99                    [  32 ]                       
                                                                                
Instruction Set Extensions                                                      
|- 3DNow!/Ext [N/N]          ADX [Y]          AES [Y]  AVX/AVX2 [Y/Y] 
|- AVX512-F     [Y]    AVX512-DQ [Y]  AVX512-IFMA [Y]   AVX512-PF [N] 
|- AVX512-ER    [N]    AVX512-CD [Y]    AVX512-BW [Y]   AVX512-VL [Y] 
|- AVX512-VBMI  [Y] AVX512-VBMI2 [Y]  AVX512-VNNI [Y]  AVX512-ALG [Y] 
|- AVX512-VPOP  [Y] AVX512-VNNIW [N] AVX512-FMAPS [N] AVX512-VP2I [Y] 
|- AVX512-BF16  [Y] AVX-VNNI-VEX [Y]    AVX-FP128 [N]   AVX-FP256 [N] 
|- BMI1/BMI2  [Y/Y]         CLWB [Y]      CLFLUSH [Y] CLFLUSH-OPT [Y] 
|- CLAC-STAC    [Y]         CMOV [Y]    CMPXCHG8B [Y]  CMPXCHG16B [Y] 
|- F16C         [Y]          FPU [Y]         FXSR [Y]   LAHF-SAHF [Y] 
|- MMX/Ext    [Y/Y] MON/MWAITX [Y/Y]        MOVBE [Y]   PCLMULQDQ [Y] 
|- POPCNT       [Y]       RDRAND [Y]       RDSEED [Y]      RDTSCP [Y] 
|- SEP          [Y]          SHA [Y]          SSE [Y]        SSE2 [Y] 
|- SSE3         [Y]        SSSE3 [Y]  SSE4.1/4A [Y/Y]      SSE4.2 [Y] 
|- SERIALIZE    [N]      SYSCALL [Y]        RDPID [Y]        UMIP [Y] 
|- VAES         [Y]   VPCLMULQDQ [Y]   PREFETCH/W [Y]       LZCNT [Y] 
                                                                                
Features                                                                        
|- 1 GB Pages Support                                      1GB-PAGES   [Capable]
|- 100 MHz multiplier Control                            100MHzSteps   [Missing]
|- Advanced Configuration & Power Interface                     ACPI   [Capable]
|- Advanced Programmable Interrupt Controller                   APIC   [Capable]
|- Advanced Virtual Interrupt Controller                        AVIC   [Capable]
|- APIC Timer Invariance                                        ARAT   [Capable]
|- LOCK prefix to read CR8                                    AltMov   [Capable]
|- Clear Zero Instruction                                     CLZERO   [Capable]
|- Core Multi-Processing                                  CMP Legacy   [Capable]
|- L1 Data Cache Context ID                                  CNXT-ID   [Missing]
|- Collaborative Processor Performance Control                  CPPC   [Capable]
|- Direct Cache Access                                           DCA   [Missing]
|- Debugging Extension                                            DE   [Capable]
|- Debug Store & Precise Event Based Sampling               DS, PEBS   [Missing]
|- CPL Qualified Debug Store                                  DS-CPL   [Missing]
|- 64-Bit Debug Store                                         DTES64   [Missing]
|- Fast Short REP CMPSB|SCASB                                   FSRC   [Capable]
|- Fast Short REP MOVSB                                         FSRM   [Capable]
|- Fast Short REP STOSB                                         FSRS   [Capable]
|- Fast-String Operation                                        ERMS   [Capable]
|- Fused Multiply Add                                           FMA4   [Missing]
|- Fused Multiply Add                                            FMA   [Capable]
|- Hardware Lock Elision                                         HLE   [Missing]
|- Hyper-Threading Technology                                    HTT   [Capable]
|- Hardware P-state control                                      HwP   [Capable]
|- Instruction Based Sampling                                    IBS   [Capable]
|- Instruction INVLPGB                                       INVLPGB   [Missing]
|- Instruction INVPCID                                       INVPCID   [Capable]
|- Long Mode 64 bits                                       IA64 | LM   [Capable]
|- LightWeight Profiling                                         LWP   [Missing]
|- Memory Bandwidth Enforcement                                  MBE   [Capable]
|- Machine-Check Architecture                                    MCA   [Capable]
|- Instruction MCOMMIT                                       MCOMMIT   [Missing]
|- Model Specific Registers                                      MSR   [Capable]
|- Memory Type Range Registers                                  MTRR   [Capable]
|- No-Execute Page Protection                                     NX   [Capable]
|- OS-Enabled Ext. State Management                          OSXSAVE   [Capable]
|- OS Visible Work-around                                       OSVW   [Capable]
|- Physical Address Extension                                    PAE   [Capable]
|- Page Attribute Table                                          PAT   [Capable]
|- Pending Break Enable                                          PBE   [Missing]
|- Process Context Identifiers                                  PCID   [Missing]
|- Perfmon and Debug Capability                                 PDCM   [Missing]
|- Page Global Enable                                            PGE   [Capable]
|- Page Size Extension                                           PSE   [Capable]
|- 36-bit Page Size Extension                                  PSE36   [Capable]
|- Processor Serial Number                                       PSN   [Missing]
|- PREFETCHIT0/1 Instructions                              PREFETCHI   [Capable]
|- Resource Director Technology/PQE                            RDT-A   [Capable]
|- Resource Director Technology/PQM                            RDT-M   [Capable]
|- Read Processor Register at User level                       RDPRU   [Capable]
|- Restricted Transactional Memory                               RTM   [Missing]
|- Safer Mode Extensions                                         SMX   [Missing]
|- Self-Snoop                                                     SS   [Missing]
|- Supervisor-Mode Access Prevention                            SMAP   [Capable]
|- Supervisor-Mode Execution Prevention                         SMEP   [Capable]
|- Trailing Bit Manipulation                                     TBM   [Missing]
|- Translation Cache Extension                                   TCE   [Capable]
|- Time Stamp Counter                                            TSC [Invariant]
|- Time Stamp Counter Deadline                          TSC-DEADLINE   [Missing]
|- TSX Force Abort MSR Register                            TSX-ABORT   [Missing]
|- TSX Suspend Load Address Tracking                       TSX-LDTRK   [Missing]
|- User-Mode Instruction Prevention                             UMIP   [Capable]
|- Virtual Mode Extension                                        VME   [Capable]
|- Virtual Machine Extensions                                    VMX   [Missing]
|- Write Back & Do Not Invalidate Cache                     WBNOINVD   [Capable]
|- Extended xAPIC Support                                     x2APIC   [  xAPIC]
|- AVIC controller for x2APIC                                 x2AVIC   [Capable]
|- XSAVE/XSTOR States                                          XSAVE   [Capable]
|- xTPR Update Control                                          xTPR   [Missing]
|- Extended Operation Support                                    XOP   [Missing]
Mitigation mechanisms                                                           
|- Indirect Branch Restricted Speculation                       IBRS   [Capable]
   |- IBRS Always-On preferred by processor                            [ Unable]
   |- IBRS preferred over software solution                            [Capable]
   |- IBRS provides same speculation limits                            [Capable]
|- Indirect Branch Prediction Barrier                           IBPB   [Capable]
|- Selective Branch Predictor Barrier                           SBPB   [Capable]
|- Single Thread Indirect Branch Predictor                     STIBP   [ Enable]
|- Speculative Store Bypass Disable                             SSBD   [Capable]
   |- SSBD use VIRT_SPEC_CTRL register                                 [ Unable]
   |- SSBD not needed on this processor                                [ Unable]
|- No Speculative Return Stack Overflow                      SRSO_NO   [ Unable]
   |- No SRSO at the User-Kernel boundary                              [Capable]
|- No Branch Type Confusion                                   BTC_NO   [Capable]
|- BTC on Non-Branch instruction                            BTC-NOBR   [ Unable]
|- Limited Early Redirect Window                            AGENPICK   [ Unable]
|- Arch - No Fast Predictive Store Forwarding                   PSFD   [Capable]
|- Arch - Enhanced Predictive Store Forwarding                  EPSF   [Capable]
|- Arch - Cross Processor Information Leak                XPROC_LEAK   [ Unable]
Security Features                                                               
|- CET Shadow Stack features                                  CET-SS   [Capable]
|- Secure Init and Jump with Attestation                      SKINIT   [Capable]
|- Secure Encrypted Virtualization                               SEV   [Missing]
|- SEV - Encrypted State                                      SEV-ES   [Missing]
|- SEV - Secure Nested Paging                                SEV-SNP   [Missing]
|- Guest Mode Execute Trap                                      GMET   [Capable]
|- Supervisor Shadow Stack                                       SSS   [Capable]
|- VM Permission Levels                                         VMPL   [Missing]
|- VMPL Supervisor Shadow Stack                             VMPL-SSS   [Missing]
|- Secure Memory Encryption                                      SME   [Capable]
|- Transparent SME                                              TSME   [ Enable]
|- Secure Multi-Key Memory Encryption                         SME-MK   [Missing]
|- DRAM Data Scrambling                                    Scrambler   [ Enable]
                                                                                
Technologies                                                                    
|- Instruction Cache Unit                                                       
   |- L1 IP Prefetcher                                          L1 HW IP   < ON>
|- Data Cache Unit                                                              
   |- L1 Prefetcher                                                L1 HW   < ON>
|- Cache Prefetchers                                                            
   |- L2 Prefetcher                                                L2 HW   < ON>
   |- L1 Stride Prefetcher                                     L1 Stride   < ON>
   |- L1 Region Prefetcher                                     L1 Region   < ON>
   |- L1 Burst Prefetch Mode                                    L1 Burst   < ON>
   |- L2 Stream HW Prefetcher                                  L2 Stream   < ON>
   |- L2 Up/Down Prefetcher                                   L2 Up/Down   < ON>
|- System Management Mode                                       SMM-Lock   [ ON]
|- Simultaneous Multithreading                                       SMT   [ ON]
|- PowerNow!                                                         CnQ   [ ON]
|- Core C-States                                                     CCx   [ ON]
|- Core Performance Boost                                            CPB   < ON>
|- Watchdog Timer                                                    WDT   < ON>
|- Virtualization                                                    SVM   [ ON]
   |- I/O MMU                                                      AMD-V   [OFF]
   |- Version                                                     [         N/A]
   |- Hypervisor                                                           [OFF]
   |- Vendor ID                                                   [         N/A]
                                                                                
Performance Monitoring                                                          
|- Version                                                        PM       [  2]
|- Counters:          General                   Fixed                           
|           {  6,  6, 16 } x 48 bits            3 x 64 bits                     
|- Enhanced Halt State                                           C1E       <OFF>
|- C2 UnDemotion                                                 C2U       < ON>
|- C3 UnDemotion                                                 C3U       < ON>
|- Core C6 State                                                 CC6       < ON>
|- Package C6 State                                              PC6       < ON>
|- Legacy Frequency ID control                                   FID       [OFF]
|- Legacy Voltage ID control                                     VID       [OFF]
|- P-State Hardware Coordination Feedback                MPERF/APERF       [ ON]
|- Core C-States                                                                
   |- C-States Base Address                                      BAR   [ 0x413 ]
|- ACPI Processor C-States                                      _CST   [      3]
|- MONITOR/MWAIT                                                                
   |- State index:    #0    #1    #2    #3    #4    #5    #6    #7              
   |- Sub C-State:     1     2     0     0     0     0     0     0              
   |- Monitor-Mwait Extensions                                   EMX   [Capable]
   |- Interrupt Break-Event                                      IBE   [Capable]
|- Core Cycles                                                         [Capable]
|- Instructions Retired                                                [Capable]
|- Reference Cycles                                                    [Capable]
|- Last Level Cache References                                         [Capable]
|- Global Time Stamp Counter                                           [Missing]
|- Data Fabric Performance Counter                                     [Capable]
|- Core Performance Counter                                            [Capable]
|- Processor Performance Control                                _PCT   [ Enable]
|- Performance Supported States                                 _PSS   [      2]
|- Performance Present Capabilities                             _PPC   [      0]
|- Continuous Performance Control                               _CPC   [Missing]
                                                                                
Power, Current & Thermal                                                        
|- Temperature Offset:Junction                                 TjMax [ 49: 95 C]
|- CPPC Energy Preference                                        EPP   <    128>
|- Digital Thermal Sensor                                        DTS   [Capable]
|- Power Limit Notification                                      PLN   [Missing]
|- Package Thermal Management                                    PTM   [Missing]
|- Thermal Monitor 1                                             TTP   [ Enable]
|- Thermal Monitor 2                                             HTC   [ Enable]
|- Thermal Design Power                                          TDP   [Missing]
   |- Minimum Power                                              Min   [Missing]
   |- Maximum Power                                              Max   [Missing]
|- Thermal Design Power                                      Package   [Disable]
   |- Power Limit                                                PL1   [    0 W]
   |- Time Window                                                TW1   [   0 ns]
   |- Power Limit                                                PL2   [    0 W]
   |- Time Window                                                TW2   [   0 ns]
|- Thermal Design Power                                         Core   [Disable]
   |- Power Limit                                                PL1   [    0 W]
   |- Time Window                                                TW1   [   0 ns]
|- Thermal Design Power                                       Uncore   [Disable]
   |- Power Limit                                                PL1   [    0 W]
   |- Time Window                                                TW1   [   0 ns]
|- Thermal Design Power                                         DRAM   [Disable]
   |- Power Limit                                                PL1   [    0 W]
   |- Time Window                                                TW1   [   0 ns]
|- Thermal Design Power                                     Platform   [Disable]
   |- Power Limit                                                PL1   [    0 W]
   |- Time Window                                                TW1   [   0 ns]
   |- Power Limit                                                PL2   [    0 W]
   |- Time Window                                                TW2   [   0 ns]
|- Package Power Tracking                                        PPT   [Missing]
|- Electrical Design Current                                     EDC   [Missing]
|- Thermal Design Current                                        TDC   [Missing]
|- Core Thermal Point                                                           
|- Package Thermal Point                                                        
   |- Thermal Monitor Trip                                     Limit   [  115 C]
   |- HTC Temperature Limit                                    Limit   [  127 C]
   |- HTC Temperature Hysteresis                           Threshold   [    2 C]
|- Units                                                                        
   |- Power                                               watt   [      Missing]
   |- Energy                                             joule   [  0.000015259]
   |- Window                                            second   [  0.000976562]

moetayuko avatar Jun 27 '25 11:06 moetayuko

Hi the other 9950X did not encounter this issue.

What values are you reading when Cores are fully stressed ? Are those still different than k10temp ?

cyring avatar Jun 27 '25 11:06 cyring

Hi the other 9950X did not encounter this issue.

What values are you reading when Cores are fully stressed ? Are those still different than k10temp ?

Yes, but they don't vary that much:

    ~ ▓▒░·································································································
❯ corefreq-cli -C 1
CPU Freq(MHz) VID  Vcore  TMP(C)    Accumulator       Energy(J)     Power(W)
000 5426.59   192  1.2000   80  000000000000678095   10.346908569  10.346908569
001 5426.64   192  1.2000   80  000000000000685677   10.462600708  10.462600708
002 5426.64   192  1.2000   80  000000000000675926   10.313812256  10.313812256
003 5426.59   192  1.2000   80  000000000000695846   10.617767334  10.617767334
004 5426.64   192  1.2000   80  000000000000687470   10.489959717  10.489959717
005 5426.64   192  1.2000   80  000000000000695677   10.615188599  10.615188599
006 5426.64   190  1.1875   80  000000000000684540   10.445251465  10.445251465
007 5426.64   190  1.1875   80  000000000000693621   10.583816528  10.583816528
008 5376.40   190  1.1875   81  000000000000693943   10.588729858  10.588729858
009 5376.35   190  1.1875   81  000000000000680012   10.376159668  10.376159668
010 5376.30   190  1.1875   81  000000000000697079   10.636581421  10.636581421
011 5376.35   190  1.1875   81  000000000000685131   10.454269409  10.454269409
012 5376.30   190  1.1875   81  000000000000695940   10.619201660  10.619201660
013 5376.30   190  1.1875   81  000000000000691096   10.545288086  10.545288086
014 5376.35   190  1.1875   81  000000000000701210   10.699615479  10.699615479
015 5376.35   190  1.1875   81  000000000000679342   10.365936279  10.365936279
016 5426.64   190  1.1875   80  000000000000000000    0.000000000   0.000000000
017 5426.64   190  1.1875   80  000000000000000000    0.000000000   0.000000000
018 5426.65   190  1.1875   80  000000000000000000    0.000000000   0.000000000
019 5426.65   190  1.1875   80  000000000000000000    0.000000000   0.000000000
020 5426.65   190  1.1875   80  000000000000000000    0.000000000   0.000000000
021 5426.65   190  1.1875   80  000000000000000000    0.000000000   0.000000000
022 5426.65   190  1.1875   80  000000000000000000    0.000000000   0.000000000
023 5426.65   190  1.1875   80  000000000000000000    0.000000000   0.000000000
024 5376.40   190  1.1875   81  000000000000000000    0.000000000   0.000000000
025 5376.30   190  1.1875   81  000000000000000000    0.000000000   0.000000000
026 5376.30   190  1.1875   81  000000000000000000    0.000000000   0.000000000
027 5376.34   190  1.1875   81  000000000000000000    0.000000000   0.000000000
028 5376.40   190  1.1875   81  000000000000000000    0.000000000   0.000000000
029 5376.35   190  1.1875   81  000000000000000000    0.000000000   0.000000000
030 5376.30   190  1.1875   81  000000000000000000    0.000000000   0.000000000
031 5376.35   190  1.1875   81  000000000000000000    0.000000000   0.000000000

             Package[0]    Cores         Uncore        Memory        Platform
Energy(J): 220.729217529 167.909622192   0.000000000   0.000000000   0.000000000
Power(W) : 220.729217529 167.909622192   0.000000000   0.000000000   0.000000000


    ~ ▓▒░·································································································
❯ sensors k10temp-pci-00c3
k10temp-pci-00c3
Adapter: PCI adapter
Tctl:         +83.1°C

Additionally, corefreq-cli -C 1 sometimes fails to respond, and I need to press Ctrl+C and rerun it multiple times to obtain the output.

This might be because I have another instance of corefreq running. corefreq-cli -C 1 returns promptly once I close the other one.

moetayuko avatar Jun 27 '25 11:06 moetayuko

Hi the other 9950X did not encounter this issue. What values are you reading when Cores are fully stressed ? Are those still different than k10temp ?

Yes, but they don't vary that much:

    ~ ▓▒░·································································································
❯ corefreq-cli -C 1
CPU Freq(MHz) VID  Vcore  TMP(C)    Accumulator       Energy(J)     Power(W)
000 5426.59   192  1.2000   80  000000000000678095   10.346908569  10.346908569
001 5426.64   192  1.2000   80  000000000000685677   10.462600708  10.462600708
002 5426.64   192  1.2000   80  000000000000675926   10.313812256  10.313812256
003 5426.59   192  1.2000   80  000000000000695846   10.617767334  10.617767334
004 5426.64   192  1.2000   80  000000000000687470   10.489959717  10.489959717
005 5426.64   192  1.2000   80  000000000000695677   10.615188599  10.615188599
006 5426.64   190  1.1875   80  000000000000684540   10.445251465  10.445251465
007 5426.64   190  1.1875   80  000000000000693621   10.583816528  10.583816528
008 5376.40   190  1.1875   81  000000000000693943   10.588729858  10.588729858
009 5376.35   190  1.1875   81  000000000000680012   10.376159668  10.376159668
010 5376.30   190  1.1875   81  000000000000697079   10.636581421  10.636581421
011 5376.35   190  1.1875   81  000000000000685131   10.454269409  10.454269409
012 5376.30   190  1.1875   81  000000000000695940   10.619201660  10.619201660
013 5376.30   190  1.1875   81  000000000000691096   10.545288086  10.545288086
014 5376.35   190  1.1875   81  000000000000701210   10.699615479  10.699615479
015 5376.35   190  1.1875   81  000000000000679342   10.365936279  10.365936279
016 5426.64   190  1.1875   80  000000000000000000    0.000000000   0.000000000
017 5426.64   190  1.1875   80  000000000000000000    0.000000000   0.000000000
018 5426.65   190  1.1875   80  000000000000000000    0.000000000   0.000000000
019 5426.65   190  1.1875   80  000000000000000000    0.000000000   0.000000000
020 5426.65   190  1.1875   80  000000000000000000    0.000000000   0.000000000
021 5426.65   190  1.1875   80  000000000000000000    0.000000000   0.000000000
022 5426.65   190  1.1875   80  000000000000000000    0.000000000   0.000000000
023 5426.65   190  1.1875   80  000000000000000000    0.000000000   0.000000000
024 5376.40   190  1.1875   81  000000000000000000    0.000000000   0.000000000
025 5376.30   190  1.1875   81  000000000000000000    0.000000000   0.000000000
026 5376.30   190  1.1875   81  000000000000000000    0.000000000   0.000000000
027 5376.34   190  1.1875   81  000000000000000000    0.000000000   0.000000000
028 5376.40   190  1.1875   81  000000000000000000    0.000000000   0.000000000
029 5376.35   190  1.1875   81  000000000000000000    0.000000000   0.000000000
030 5376.30   190  1.1875   81  000000000000000000    0.000000000   0.000000000
031 5376.35   190  1.1875   81  000000000000000000    0.000000000   0.000000000

             Package[0]    Cores         Uncore        Memory        Platform
Energy(J): 220.729217529 167.909622192   0.000000000   0.000000000   0.000000000
Power(W) : 220.729217529 167.909622192   0.000000000   0.000000000   0.000000000


    ~ ▓▒░·································································································
❯ sensors k10temp-pci-00c3
k10temp-pci-00c3
Adapter: PCI adapter
Tctl:         +83.1°C

High temperature are closed but not idle !

Additionally, corefreq-cli -C 1 sometimes fails to respond, and I need to press Ctrl+C and rerun it multiple times to obtain the output.

This might be because I have another instance of corefreq running. corefreq-cli -C 1 returns promptly once I close the other one.

But you must not do that. I will insist on this in the Readme

cyring avatar Jun 27 '25 12:06 cyring

Meanwhile, Power(W) also seems strange, and the readings for CCD2 are missing

moetayuko avatar Jun 27 '25 12:06 moetayuko

Meanwhile, Power(W) also seems strange, and the readings for CCD2 are missing

Are max Power 220 W Package and 167 W total Cores what you expect ? Can you report about the specifications values ?


Where do you find CCD2 ? Don't know which register it is referring to ?

cyring avatar Jun 27 '25 12:06 cyring

Meanwhile, Power(W) also seems strange, and the readings for CCD2 are missing

Are max Power 220 W Package and 167 W total Cores what you expect ? Can you report about the specifications values ?

Guessing so, but why is the per-core power shown as ~10W?

Where do you find CCD2 ? Don't know which register it is referring to ?

oops, maybe CPU 0-15 are physical cores while 16-31 are hyperthreading logical cores so their power is shown as zero? I mistakenly thought 16-31 were CCD2...

moetayuko avatar Jun 27 '25 12:06 moetayuko

Meanwhile, Power(W) also seems strange, and the readings for CCD2 are missing

Are max Power 220 W Package and 167 W total Cores what you expect ? Can you report about the specifications values ?

Guessing so, but why is the per-core power shown as ~10W?

Where do you find CCD2 ? Don't know which register it is referring to ?

oops, maybe CPU 0-15 are physical cores while 16-31 are hyperthreading logical cores so their power is shown as zero? I mistakenly thought 16-31 were CCD2...


Indeed you won't find RAPL registers in a logical Core In short, CoreFreq is doing the sum of all Physical Cores. Package watt is coming from SMU and may add/include the consumption of other IPs


Back to the temperature issue: I have no clue why idle value makes the gape between CoreFreq and k10temp. Don't you have other source of software to show ? Even temperature reporting from tools for Windows ?

cyring avatar Jun 27 '25 12:06 cyring

Back to the temperature issue: I have no clue why idle value makes the gape between CoreFreq and k10temp. Don't you have other source of software to show ? Even temperature reporting from tools for Windows ?

hwinfo and aida64 idle temperatures are consistent with k10temp, so CoreFreq must be problematic.

moetayuko avatar Jun 27 '25 13:06 moetayuko

@vient @madoverlord40 @huajian628

Hello,

Can you tell if latest version of CoreFreq reports wrong temperature with your 9950X ? Especially low temperature during the idle states.

cyring avatar Jun 27 '25 13:06 cyring

Started with idle, then run stress 0-3 for 5s, stress 8-15 for 5s, stress 0-15 for 10s.

https://github.com/user-attachments/assets/1a07d821-730a-4b7d-b918-8131d3ab8b34

Kinda looks like k10temp has an exponential smoothing, with larger alpha when real temperature is bigger than current approximation. Overall looks pretty similar.

vient avatar Jun 27 '25 15:06 vient

Overall looks pretty similar.

Thank you for your well documented answer

cyring avatar Jun 27 '25 16:06 cyring

@moetayuko We should have a look at k10temp source code

cyring avatar Jun 27 '25 16:06 cyring

Don't know what k10temp is showing, Zen 5 support was added in 6.16 (so not even released yet) while I'm running 6.11.

vient avatar Jun 27 '25 16:06 vient

Don't know what k10temp is showing, Zen 5 support was added in 6.16 (so not even released yet) while I'm running 6.11.

Awesome, thank you.

@moetayuko What is your Linux kernel version ? You can post here the output of corefreq-cli -k

cyring avatar Jun 27 '25 16:06 cyring

Don't know what k10temp is showing, Zen 5 support was added in 6.16 (so not even released yet) while I'm running 6.11.

Awesome, thank you.

@moetayuko What is your Linux kernel version ? You can post here the output of corefreq-cli -k

❯ corefreq-cli -k
Linux:
|- Release                                                   [6.15.3-zen1-1-zen]
|- Version          [#1 ZEN SMP PREEMPT_DYNAMIC Thu, 19 Jun 2025 14:41:01 +0000]
|- Machine                                                              [x86_64]
Memory:
|- Total RAM                                                         98399876 KB
|- Shared RAM                                                          308060 KB
|- Free RAM                                                          78658588 KB
|- Buffer RAM                                                            4556 KB
|- Total High                                                               0 KB
|- Free High                                                                0 KB
Clock Source                                                  <             tsc>
CPU-Freq driver                                               [  amd-pstate-epp]
Governor                                                      [         Missing]
CPU-Idle driver                                               [       acpi_idle]
|- Idle Limit                                                 [              C3]
   |- State        POLL      C1      C2      C3
   |-           CPUIDLE ACPI FF ACPI IO ACPI IO
   |- Power          -1       0       0       0
   |- Latency         0       1      18     350
   |- Residency       0       2      36     700

moetayuko avatar Jun 27 '25 16:06 moetayuko

Just in case you really want to dig in, 6.11 has some code about 1Ah models which was removed in 6.12. ccd_offset is missing so I guess my k10temp only reports Tctl while CoreFreq reports Tccd1 and Tccd2 (?)

vient avatar Jun 27 '25 16:06 vient

Don't know what k10temp is showing, Zen 5 support was added in 6.16 (so not even released yet) while I'm running 6.11.

The commit description mentions that it's adding support for retrieving CCD temperatures, ig CCD temperature/package temperature/per-core temperature are different concepts?

moetayuko avatar Jun 27 '25 16:06 moetayuko

Right, README mentions that Tctl is some "synthetic" value used for fan control (guess that means that smoothing is performed by chip itself), while Tdie may provide real value and TccxN may also be available.

I also like the note in driver's code

The information [about converting raw sensor values to temperature] is not confirmed from chip datasheets, but experiments suggest that it provides reasonable temperature values.

vient avatar Jun 27 '25 16:06 vient

@moetayuko but before I go into code investigation, can you provide the idle and stressed temperature values from a third party software. Preferably a Windows temperature software provided by your mainboard manufacturer ?

cyring avatar Jun 27 '25 17:06 cyring

@moetayuko but before I go into code investigation, can you provide the idle and stressed temperature values from a third party software. Preferably a Windows temperature software provided by your mainboard manufacturer ?

idle temperature in windows is around 52℃, close to k10temp

stressed temperature is another story. I use cinebench r23 in windows, and the temperature reaches the 95℃ threshold as set in bios, meanwhile package power reaches 270w. in linux, the stress command is used, the temperature reaches only 81-83℃ as shown in both k10temp and corefreq, and the package power given by corefreq is only 220w. I can't tell if the stressed temperature reported by k10temp is wrong, or stress failed to provide enough stress as cinebench did.

moetayuko avatar Jun 27 '25 17:06 moetayuko

Should be right, stress is extremely simple. You can try stress-ng instead, something like

docker run --rm ghcr.io/colinianking/stress-ng --tz --rapl -t 60 --vnni -1

vient avatar Jun 27 '25 19:06 vient

idle temperature in windows is around 52℃

Thank you. Too me that's the main issue.

cyring avatar Jun 27 '25 20:06 cyring

@moetayuko

Based on latest version, can you edit source code for your architecture [AMD_Zen5_Eldora] at this line: https://github.com/cyring/CoreFreq/blob/deb3da7f0049f41794ba27854591f84bac6cc9e2/x86_64/corefreqk.h#L13381

you replace with that line:

.Query = Query_AMD_F17h_PerCluster,

then you rebuild:

make clean; make

restart CoreFreq and please post the idle temperature

cyring avatar Jun 27 '25 21:06 cyring

Don't know what k10temp is showing, Zen 5 support was added in 6.16 (so not even released yet) while I'm running 6.11.

I have checked: CoreFreq is already employing the same register address offset https://github.com/cyring/CoreFreq/blob/deb3da7f0049f41794ba27854591f84bac6cc9e2/x86_64/amd_reg.h#L212

cyring avatar Jun 27 '25 22:06 cyring

@moetayuko

Based on latest version, can you edit source code for your architecture [AMD_Zen5_Eldora] at this line:

CoreFreq/x86_64/corefreqk.h

Line 13381 in deb3da7 .Query = Query_AMD_F19h_61h_PerCluster,

you replace with that line:

.Query = Query_AMD_F17h_PerCluster,

then you rebuild:

make clean; make

restart CoreFreq and please post the idle temperature

all temperatures become zero after applying this to 2.0.7

moetayuko avatar Jun 28 '25 02:06 moetayuko

all temperatures become zero after applying this to 2.0.7

Thank you for trying.

You can now reset the file to its original content

cd CoreFreq
git checkout x86_64/corefreqk.h

We will try to apply a second negative offset which will be added in the temperature formula

Temp = ((Sensor * 5 / 40) - Param.Offset[1]) - Param.Offset[2]

Specific to 9950X, edit file at this line: https://github.com/cyring/CoreFreq/blob/deb3da7f0049f41794ba27854591f84bac6cc9e2/x86_64/corefreqk.h#L9288

and change offset parameter as bellow

.Param.Offset = {95, 0, -18},

Rebuild and restart CoreFreq to test the temperature


By the way, I will also need the topology to check the CCD/CCX clusters. Please provide the output of corefreq-cli -m

Thank you

cyring avatar Jun 28 '25 04:06 cyring

Just in case you really want to dig in, 6.11 has some code about 1Ah models which was removed in 6.12. ccd_offset is missing so I guess my k10temp only reports Tctl while CoreFreq reports Tccd1 and Tccd2 (?)

Indeed in k10temp_read_temp() function k10temp can switch to /* Tctl */ or /* Tdie */ or /* Tccd{1-12} */ based on its channel numbering

On his side, CoreFreq sticks with its CCD temperature function.

So what would be the best temperature to report per Core ? Tctl or Tccd ?


Other thing.

k10temp appears to unconditionally subtract 49C to Tccd

*val = (regval & ZEN_CCD_TEMP_MASK) * 125 - 49000;

whereas CoreFreq monitors bit 11 (CurTempRangeSel) to conditionally subtract the 49 offset https://github.com/cyring/CoreFreq/blob/deb3da7f0049f41794ba27854591f84bac6cc9e2/x86_64/corefreqk.c#L16516

cyring avatar Jun 28 '25 05:06 cyring

Specific to 9950X, edit file at this line:

CoreFreq/x86_64/corefreqk.h

Line 9288 in deb3da7 .Param.Offset = {95, 0, 0},

and change offset parameter as bellow

.Param.Offset = {95, 0, -18},

Rebuild and restart CoreFreq to test the temperature

something wrong with this change

❯ corefreq-cli -C 1
*** buffer overflow detected ***: terminated
[1]    7045 IOT instruction (core dumped)  corefreq-cli -C 1

By the way, I will also need the topology to check the CCD/CCX clusters. Please provide the output of corefreq-cli -m

❯ corefreq-cli -m
CPU Pkg  Apic  Core/Thread  Caches      (w)rite-Back (i)nclusive              
 #   ID   ID CCD CCX ID/ID L1-Inst Way  L1-Data Way      L2  Way      L3  Way 
000:BSP    0   0  0   0  0      32  8        48 12      1024 16 i   65536 16w 
001:  0    2   0  0   1  0      32  8        48 12      1024 16 i   65536 16w 
002:  0    4   0  0   2  0      32  8        48 12      1024 16 i   65536 16w 
003:  0    6   0  0   3  0      32  8        48 12      1024 16 i   65536 16w 
004:  0    8   0  1   4  0      32  8        48 12      1024 16 i   65536 16w 
005:  0   10   0  1   5  0      32  8        48 12      1024 16 i   65536 16w 
006:  0   12   0  1   6  0      32  8        48 12      1024 16 i   65536 16w 
007:  0   14   0  1   7  0      32  8        48 12      1024 16 i   65536 16w 
008:  0   16   1  2   8  0      32  8        48 12      1024 16 i   65536 16w 
009:  0   18   1  2   9  0      32  8        48 12      1024 16 i   65536 16w 
010:  0   20   1  2  10  0      32  8        48 12      1024 16 i   65536 16w 
011:  0   22   1  2  11  0      32  8        48 12      1024 16 i   65536 16w 
012:  0   24   1  3  12  0      32  8        48 12      1024 16 i   65536 16w 
013:  0   26   1  3  13  0      32  8        48 12      1024 16 i   65536 16w 
014:  0   28   1  3  14  0      32  8        48 12      1024 16 i   65536 16w 
015:  0   30   1  3  15  0      32  8        48 12      1024 16 i   65536 16w 
016:  0    1   0  0   0  1      32  8        48 12      1024 16 i   65536 16w 
017:  0    3   0  0   1  1      32  8        48 12      1024 16 i   65536 16w 
018:  0    5   0  0   2  1      32  8        48 12      1024 16 i   65536 16w 
019:  0    7   0  0   3  1      32  8        48 12      1024 16 i   65536 16w 
020:  0    9   0  1   4  1      32  8        48 12      1024 16 i   65536 16w 
021:  0   11   0  1   5  1      32  8        48 12      1024 16 i   65536 16w 
022:  0   13   0  1   6  1      32  8        48 12      1024 16 i   65536 16w 
023:  0   15   0  1   7  1      32  8        48 12      1024 16 i   65536 16w 
024:  0   17   1  2   8  1      32  8        48 12      1024 16 i   65536 16w 
025:  0   19   1  2   9  1      32  8        48 12      1024 16 i   65536 16w 
026:  0   21   1  2  10  1      32  8        48 12      1024 16 i   65536 16w 
027:  0   23   1  2  11  1      32  8        48 12      1024 16 i   65536 16w 
028:  0   25   1  3  12  1      32  8        48 12      1024 16 i   65536 16w 
029:  0   27   1  3  13  1      32  8        48 12      1024 16 i   65536 16w 
030:  0   29   1  3  14  1      32  8        48 12      1024 16 i   65536 16w 
031:  0   31   1  3  15  1      32  8        48 12      1024 16 i   65536 16w

moetayuko avatar Jun 28 '25 06:06 moetayuko

something wrong with this change

Can you stop completely CoreFreq Delete its project directory and then clone it again from latest version.

First build and run straight to check if it is working back.

Next attempt to make the offset change Param.Offset = {95, 0, -18}

But make sure to fully recompile and reload everything

make clean
make
rmmod corefreqk
insmod build/corefreqk.ko

cyring avatar Jun 28 '25 07:06 cyring

something wrong with this change

Can you stop completely CoreFreq Delete its project directory and then clone it again from latest version.

First build and run straight to check if it is working back.

Next attempt to make the offset change Param.Offset = {95, 0, -18}

But make sure to fully recompile and reload everything

make clean
make
rmmod corefreqk
insmod build/corefreqk.ko

same. I clean built everything and restarted to ensure kernel module is reloaded. below are the backtraces:

#0  __GI_abort () at abort.c:91
#1  0x00007fc11697d5c9 in __libc_message_impl (fmt=fmt@entry=0x7fc116b09216 "*** %s ***: terminated\n") at ../sysdeps/posix/libc_fatal.c:134
#2  0x00007fc116a7ba09 in __GI___fortify_fail (msg=msg@entry=0x7fc116b091fd "buffer overflow detected") at fortify_fail.c:24
#3  0x00007fc116a7b374 in __GI___chk_fail () at chk_fail.c:28
#4  0x000055e5947a2e8d in memcpy (__dest=0x55e59820ce7d, __src=0x55e59820cea0, __len=89) at /usr/include/bits/string_fortified.h:29
#5  Sensors (iter=<optimized out>) at x86_64/corefreq-cli.c:7285
#6  0x000055e5947879ef in main (argc=3, argv=<optimized out>) at x86_64/corefreq-cli.c:22721
(gdb) bt full
#0  __GI_abort () at abort.c:91
        act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {18446744073709551615, 0 <repeats 15 times>}}, sa_flags = 0, sa_restorer = 0x0}
#1  0x00007fc11697d5c9 in __libc_message_impl (fmt=fmt@entry=0x7fc116b09216 "*** %s ***: terminated\n") at ../sysdeps/posix/libc_fatal.c:134
        ap = {{gp_offset = 16, fp_offset = 0, overflow_arg_area = 0x7fffe4840c10, reg_save_area = 0x7fffe4840ba0}}
        fd = 2
        iov = {{iov_base = 0x7fc116b09216, iov_len = 4}, {iov_base = 0x7fc116b091fd, iov_len = 24}, {iov_base = 0x7fc116b0921c, iov_len = 17}, {iov_base = 0x7fffe4840b60, iov_len = 9537642091124368896}, {iov_base = 0x7fffe4840b70, iov_len = 9537642091124368896}, {
            iov_base = 0x7fffe4840a50, iov_len = 140467284565916}, {iov_base = 0x1f, iov_len = 152}}
        iovcnt = <optimized out>
        total = <optimized out>
        cp = <optimized out>
#2  0x00007fc116a7ba09 in __GI___fortify_fail (msg=msg@entry=0x7fc116b091fd "buffer overflow detected") at fortify_fail.c:24
No locals.
#3  0x00007fc116a7b374 in __GI___chk_fail () at chk_fail.c:28
No locals.
#4  0x000055e5947a2e8d in memcpy (__dest=0x55e59820ce7d, __src=0x55e59820cea0, __len=89) at /usr/include/bits/string_fortified.h:29
No locals.
#5  Sensors (iter=<optimized out>) at x86_64/corefreq-cli.c:7285
        idx = <optimized out>
        sdx = 77
        pw = <optimized out>
        cpu = <optimized out>
        rdx = <optimized out>
        ldx = 89
        out = 0x55e59820c350 "CPU Freq(MHz) VID  Vcore  TMP(C)    Accumulator       Energy(J)     Power(W)\n000   45.16   152  0.9500  4294901808  ", '0' <repeats 14 times>, "2947    0.044967651   0.044967651\n001   99.80   152  0.9500  429490180"...
        row = 0x55e59820cea0 "\n", ' ' <repeats 13 times>, "Package[0]    Cores         Uncore        Memory        Platform\nEnergy(J):"
#6  0x000055e5947879ef in main (argc=3, argv=<optimized out>) at x86_64/corefreq-cli.c:22721
        theme = <optimized out>
        _dest = <optimized out>
        tty = <optimized out>
        tty = <optimized out>
        tty = <optimized out>
        tty = <optimized out>
        iter = <optimized out>
        iter = <optimized out>
        iter = <optimized out>
        iter = <optimized out>
        iter = <optimized out>
        iter = <optimized out>
        usrIdx = <optimized out>
        roSize = 290816
        rwSize = <optimized out>
        stat_st = {ro = {st_dev = 24, st_ino = 2, st_nlink = 1, st_mode = 33060, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 290816, st_blksize = 4096, st_blocks = 568, st_atim = {tv_sec = 1751096343, tv_nsec = 55553474}, st_mtim = {tv_sec = 1751096343, 
              tv_nsec = 55991986}, st_ctim = {tv_sec = 1751096343, tv_nsec = 55991986}, __glibc_reserved = {0, 0, 0}}, rw = {st_dev = 24, st_ino = 3, st_nlink = 1, st_mode = 33206, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 4096, st_blksize = 4096, st_blocks = 8, 
            st_atim = {tv_sec = 1751096343, tv_nsec = 55553474}, st_mtim = {tv_sec = 1751096343, tv_nsec = 55935175}, st_ctim = {tv_sec = 1751096343, tv_nsec = 55935175}, __glibc_reserved = {0, 0, 0}}}
        fd = {ro = 3, rw = 4}
        idx = 2
        program = 0x55e59820b2a0 "corefreq-cli"
        appName = 0x55e59820b2a0 "corefreq-cli"
        option = 67 'C'
        trailing = 0 '\000'
        reason = <optimized out>

moetayuko avatar Jun 28 '25 07:06 moetayuko