kevinlekiller / amdctl

Set P-State voltages and clock speeds on recent AMD CPUs on Linux.
GNU General Public License v3.0
243 stars 22 forks source link

AMD 10h: P-State detection is wrong #42

Open M95D opened 2 years ago

M95D commented 2 years ago

As you can see below, "Current P-State" (first line for each core) never changes. It is always 1. Current frequency (last line in table) is correct. Current voltage is probably correct too, but it doesn't match P-State table.

Highest P-State and Lowest are also wrong. In my case, highest is 0 (see it in action on core 2) and lowest is 3 (see it on core 0). P-State 4 is invalid and should not appear in table.

CPU is Phenom II X4 965. These are default parameters set by BIOS "Auto".

Detected CPU model 4h, from family 10h with 4 CPU cores (REFCLK = 100MHz ; Voltage ID Encodings: SVI (serial)).

Core 0 | P-State Limits (non-turbo): Highest: 1 ; Lowest 4 | Current P-State: 1
 Pstate Status CpuFid CpuDid CpuVid  CpuMult     CpuFreq CpuVolt IddVal IddDiv CpuCurr CpuPower NbVid NbVolt
      0      1     22      0     10   19.00x  3800.00MHz  1425mV    210     10  21.00A   29.92W    36 1100mV
      1      1     11      0     18   13.50x  2700.00MHz  1325mV    151     10  15.10A   20.01W    36 1100mV
      2      1      6      0     26   11.00x  2200.00MHz  1225mV    109     10  10.90A   13.35W    36 1100mV
      3      1      0      1     40    4.00x   800.00MHz  1050mV     44     10   4.40A    4.62W    36 1100mV
      4      0      0      0      0    8.00x  1600.00MHz  1550mV      0      1   0.00A    0.00W     0 1550mV
current      1      0      1     10    4.00x   800.00MHz  1425mV                                   36 1100mV

Core 1 | P-State Limits (non-turbo): Highest: 1 ; Lowest 4 | Current P-State: 1
 Pstate Status CpuFid CpuDid CpuVid  CpuMult     CpuFreq CpuVolt IddVal IddDiv CpuCurr CpuPower NbVid NbVolt
      0      1     18      0     10   17.00x  3400.00MHz  1425mV    210     10  21.00A   29.92W    36 1100mV
      1      1     11      0     18   13.50x  2700.00MHz  1325mV    151     10  15.10A   20.01W    36 1100mV
      2      1      6      0     26   11.00x  2200.00MHz  1225mV    109     10  10.90A   13.35W    36 1100mV
      3      1      0      1     40    4.00x   800.00MHz  1050mV     44     10   4.40A    4.62W    36 1100mV
      4      0      0      0      0    8.00x  1600.00MHz  1550mV      0      1   0.00A    0.00W     0 1550mV
current      1      0      1     10    4.00x   800.00MHz  1425mV                                   36 1100mV

Core 2 | P-State Limits (non-turbo): Highest: 1 ; Lowest 4 | Current P-State: 1
 Pstate Status CpuFid CpuDid CpuVid  CpuMult     CpuFreq CpuVolt IddVal IddDiv CpuCurr CpuPower NbVid NbVolt
      0      1     18      0     10   17.00x  3400.00MHz  1425mV    210     10  21.00A   29.92W    36 1100mV
      1      1     11      0     18   13.50x  2700.00MHz  1325mV    151     10  15.10A   20.01W    36 1100mV
      2      1      6      0     26   11.00x  2200.00MHz  1225mV    109     10  10.90A   13.35W    36 1100mV
      3      1      0      1     40    4.00x   800.00MHz  1050mV     44     10   4.40A    4.62W    36 1100mV
      4      0      0      0      0    8.00x  1600.00MHz  1550mV      0      1   0.00A    0.00W     0 1550mV
current      1     18      0     10   17.00x  3400.00MHz  1425mV                                   36 1100mV

Core 3 | P-State Limits (non-turbo): Highest: 1 ; Lowest 4 | Current P-State: 1
 Pstate Status CpuFid CpuDid CpuVid  CpuMult     CpuFreq CpuVolt IddVal IddDiv CpuCurr CpuPower NbVid NbVolt
      0      1     18      0     10   17.00x  3400.00MHz  1425mV    210     10  21.00A   29.92W    36 1100mV
      1      1     11      0     18   13.50x  2700.00MHz  1325mV    151     10  15.10A   20.01W    36 1100mV
      2      1      6      0     26   11.00x  2200.00MHz  1225mV    109     10  10.90A   13.35W    36 1100mV
      3      1      0      1     40    4.00x   800.00MHz  1050mV     44     10   4.40A    4.62W    36 1100mV
      4      0      0      0      0    8.00x  1600.00MHz  1550mV      0      1   0.00A    0.00W     0 1550mV
current      1      6      0     10   11.00x  2200.00MHz  1425mV                                   36 1100mV

Thanks.

OscarL commented 1 year ago

With my Phenom II X4 925, I also get that weird looking:

Core 0 | P-State Limits (non-turbo): Highest: 1 ; Lowest 4 | Current P-State: 1 for every core, even when forcing the CPU to P3 (via cpufreq-set).

Notice that not only Current P-State: is always 1, but also Highest: 1 is wrong (should be Highest: 0).

The last line for each core (current [...]) also shows the proper P-State for me at least.


Side note:

On my motherboard (BIOSTAR A760G-M2) the voltage shown by amdctl are wrong, as it uses the PVI calculation, but even the BIOS only provides voltage changes in steps of 125 milivolts (as in SVI mode).

Same 125 milivolts increments as PhenomMSRTweaker always uses on Windows. Also on Windows, K10stat always uses 125 milivolts steps, even when also showing that my motherboard is in PVI mode.

I ended up commenting out those lines in amdctl.c. I guess that merits opening its own issue.


Side note 2:

After changing the CpuVid/NBVid values for a given P-State with amdctl, their corresponding IddVal and IddDiv are rest to 0 and 1 respectively, resulting in CpuPower being always 0 afterwards. Not sure if that's expected or a bug.


Side note 3:

After modifying a P-State (with amdctl -p 3 -n 40 for example) it gets disabled, and I have to use amdctl -p 3 -a 1 to re-enable it. Is that normal/expected behavior, or something is iffy with my motherboard/cpu combo?