amdctl
amdctl copied to clipboard
Steam Deck: Pstate 0 Vid is 161, above max of 124
On the Steam Deck's custom AMD APU (model 90h, family 17h), the value of Pstate 0 is 161.
I'd like to undervolt this state! Would it be safe to raise the value of the MAX_VID
macro to something a bit above 161?
Output:
(deck@steamdeck amdctl)$ sudo ./amdctl -g
Detected CPU model 90h, from family 17h with 8 CPU cores (REFCLK = 100MHz ; Voltage ID Encodings: SVI (serial)).
Core 0 | P-State Limits (non-turbo): Highest: 0 ; Lowest 2 | Current P-State: 0
Pstate Status CpuFid CpuDid CpuVid CpuMult CpuFreq CpuVolt IddVal IddDiv CpuCurr CpuPower
0 1 112 8 161 28.00x 2800.00MHz 543mV 28 10 38.00A 20.63W
1 1 96 8 114 24.00x 2400.00MHz 837mV 24 10 34.00A 28.46W
2 1 102 12 105 17.00x 1700.00MHz 893mV 17 10 27.00A 24.11W
Core 1 | P-State Limits (non-turbo): Highest: 0 ; Lowest 2 | Current P-State: 0
Pstate Status CpuFid CpuDid CpuVid CpuMult CpuFreq CpuVolt IddVal IddDiv CpuCurr CpuPower
0 1 112 8 161 28.00x 2800.00MHz 543mV 28 10 38.00A 20.63W
1 1 96 8 114 24.00x 2400.00MHz 837mV 24 10 34.00A 28.46W
2 1 102 12 105 17.00x 1700.00MHz 893mV 17 10 27.00A 24.11W
Core 2 | P-State Limits (non-turbo): Highest: 0 ; Lowest 2 | Current P-State: 0
Pstate Status CpuFid CpuDid CpuVid CpuMult CpuFreq CpuVolt IddVal IddDiv CpuCurr CpuPower
0 1 112 8 161 28.00x 2800.00MHz 543mV 28 10 38.00A 20.63W
1 1 96 8 114 24.00x 2400.00MHz 837mV 24 10 34.00A 28.46W
2 1 102 12 105 17.00x 1700.00MHz 893mV 17 10 27.00A 24.11W
Core 3 | P-State Limits (non-turbo): Highest: 0 ; Lowest 2 | Current P-State: 0
Pstate Status CpuFid CpuDid CpuVid CpuMult CpuFreq CpuVolt IddVal IddDiv CpuCurr CpuPower
0 1 112 8 161 28.00x 2800.00MHz 543mV 28 10 38.00A 20.63W
1 1 96 8 114 24.00x 2400.00MHz 837mV 24 10 34.00A 28.46W
2 1 102 12 105 17.00x 1700.00MHz 893mV 17 10 27.00A 24.11W
Core 4 | P-State Limits (non-turbo): Highest: 0 ; Lowest 2 | Current P-State: 0
Pstate Status CpuFid CpuDid CpuVid CpuMult CpuFreq CpuVolt IddVal IddDiv CpuCurr CpuPower
0 1 112 8 161 28.00x 2800.00MHz 543mV 28 10 38.00A 20.63W
1 1 96 8 114 24.00x 2400.00MHz 837mV 24 10 34.00A 28.46W
2 1 102 12 105 17.00x 1700.00MHz 893mV 17 10 27.00A 24.11W
Core 5 | P-State Limits (non-turbo): Highest: 0 ; Lowest 2 | Current P-State: 0
Pstate Status CpuFid CpuDid CpuVid CpuMult CpuFreq CpuVolt IddVal IddDiv CpuCurr CpuPower
0 1 112 8 161 28.00x 2800.00MHz 543mV 28 10 38.00A 20.63W
1 1 96 8 114 24.00x 2400.00MHz 837mV 24 10 34.00A 28.46W
2 1 102 12 105 17.00x 1700.00MHz 893mV 17 10 27.00A 24.11W
Core 6 | P-State Limits (non-turbo): Highest: 0 ; Lowest 2 | Current P-State: 0
Pstate Status CpuFid CpuDid CpuVid CpuMult CpuFreq CpuVolt IddVal IddDiv CpuCurr CpuPower
0 1 112 8 161 28.00x 2800.00MHz 543mV 28 10 38.00A 20.63W
1 1 96 8 114 24.00x 2400.00MHz 837mV 24 10 34.00A 28.46W
2 1 102 12 105 17.00x 1700.00MHz 893mV 17 10 27.00A 24.11W
Core 7 | P-State Limits (non-turbo): Highest: 0 ; Lowest 2 | Current P-State: 0
Pstate Status CpuFid CpuDid CpuVid CpuMult CpuFreq CpuVolt IddVal IddDiv CpuCurr CpuPower
0 1 112 8 161 28.00x 2800.00MHz 543mV 28 10 38.00A 20.63W
1 1 96 8 114 24.00x 2400.00MHz 837mV 24 10 34.00A 28.46W
2 1 102 12 105 17.00x 1700.00MHz 893mV 17 10 27.00A 24.11W
Ah it appears that undervolting mobile Zen CPUs may not be possible even through the MSR. Please close if that's the case. I tried manually tweaking the CpuVid limit in code and running amdctl, even setting the VID to some insanely high number, I didn't really seem to notice a difference in either temperatures or get the system to crash due to low voltage.
I noticed as well: weirdly enough the higher P-States on the Deck have lower VIDs?
The new way to undervolt mobile Ryzen CPUs:
Undervolting Mobile Ryzen CPUs at BIOS-level:
https://github.com/DavidS95/Smokeless_UMAF
This allows you to access hidden BIOS settings which is good for computers with Ryzen mobile CPUs where the BIOS is locked. This also works on Steam Deck, which you can now finally undervolt the Steam Deck.
You can also check: https://www.reddit.com/r/SteamDeck/comments/yq2yjl/how_to_overclock_your_steam_deck_fr/ https://www.reddit.com/r/SteamDeck/comments/zc58pt/ocuv_steam_deck_quick_guide_and_settings/
Yes, I know about Smokeless UMAF. It would be great to be able to control it from Linux, though.
just an FYI for anyone who comes across this with the same question I had. Yes, you can set MAX_VID
to a higher value and build from source. I went through the AMD processor programming reference sheet for my cpu and couldn't find anything there or elsewhere online that indicated that I shouldn't set the core VID higher than 124. I'm guessing the author of this tool might've just thought it was a reasonable limit or something? My laptop hasn't exploded yet so I'm guessing there's no serious reason to not undervolt even harder if your hardware can handle it. If things go badly though, I'll try to remember to update this.
edit: also I was gonna try smokeless umaf but it's not open source and the dev isn't active at all, and I worry about using a potentially dangerous piece of software under those circumstances
also, hardware: Dell Inspiron 14 5425, Ryzen 5 5625u current undervolt:
Pstate Status CpuFid CpuDid CpuVid CpuMult CpuFreq CpuVolt IddVal IddDiv CpuCurr CpuPower
0 1 92 8 108 23.00x 2300.00MHz 875mV 23 10 33.00A 28.88W
1 1 90 10 124 18.00x 1800.00MHz 775mV 18 10 28.00A 21.70W
2 1 96 12 125 16.00x 1600.00MHz 768mV 16 10 26.00A 19.97W
edit2: actually since the docs im reading and the amdctl source code both agree that for 19h family CPUs, bits 21:14
(8 bits) are used to store the core VID, a true maximum value would be #define MAX_VID 255
.
edit3: i didnt check the voltage calculation math before saying that. yea 255 is a true max value, but realistically, something like 165 would be more than reasonable.
edit4: i've just realized that my undervolt isn't doing anything. I've been suspicious about how low I've been able to go, but after seeing issue #18 and installing zenpower, i've confirmed it :(