https://bugs.freedesktop.org/show_bug.cgi?id=109887
Bug ID: 109887 Summary: vega56 undervolting/overclocking voltage issues Product: DRI Version: unspecified Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: DRM/AMDgpu Assignee: dri-devel@lists.freedesktop.org Reporter: kgkggl+bugs.freedesktop.org@gmail.com
Created attachment 143547 --> https://bugs.freedesktop.org/attachment.cgi?id=143547&action=edit dmesg output
I overwrite "pp_od_clk_voltage" to control the voltage, but I have a problem.
The GPU voltage represents the value of "/sys/class/drm/card0/device/hwmon/hwmon0/in0_input"
If I set "pp_od_clk_voltage" before starting Xorg/compton/WM, the GPU voltage will be locked at 1200mv. If I set "pp_od_clk_voltage" after starting Xorg/compton/WM, the GPU is locked to 1200mv after a heavy load.
Unless I set "echo c > /sys/class/drm/card0/device/pp_od_clk_voltage" again, the idle voltage will return to 900-950mv.But still higher than the set value.
Then we have a new problem.I can't control the "P7" voltage by setting "pp_od_clk_voltage". The value in "pp_od_clk_voltage" can be changed, but the reading is always 1200mv when the GPU jumps to "P7".
I set "P6" and "P7" to the same value to prevent the GPU from jumping to "P7"
My "pp_od_clk_voltage" setting: OD_SCLK: 0: 852Mhz 800mV 1: 974Mhz 825mV 2: 1096Mhz 850mV 3: 1218Mhz 875mV 4: 1340Mhz 900mV 5: 1462Mhz 925mV 6: 1584Mhz 950mV 7: 1584Mhz 950mV OD_MCLK: 0: 167Mhz 800mV 1: 500Mhz 800mV 2: 700Mhz 900mV 3: 800Mhz 950mV OD_RANGE: SCLK: 852MHz 2400MHz MCLK: 167MHz 1500MHz VDDC: 800mV 1200mV
Default "pp_od_clk_voltage" setting OD_SCLK: 0: 852Mhz 800mV 1: 991Mhz 900mV 2: 1138Mhz 950mV 3: 1269Mhz 1000mV 4: 1312Mhz 1050mV 5: 1474Mhz 1100mV 6: 1538Mhz 1150mV 7: 1590Mhz 1200mV OD_MCLK: 0: 167Mhz 800mV 1: 500Mhz 800mV 2: 700Mhz 900mV 3: 800Mhz 950mV OD_RANGE: SCLK: 852MHz 2400MHz MCLK: 167MHz 1500MHz VDDC: 800mV 1200mV
RYZEN 1700 MSI B350M MORTAR PowerColor Radeon RX Vega 56
Linux 5.0.0-arch1-1-ARCH #1 SMP PREEMPT Mon Mar 4 14:11:43 UTC 2019 x86_64 GNU/Linux
Thanks!
https://bugs.freedesktop.org/show_bug.cgi?id=109887
--- Comment #1 from kgkggl+bugs.freedesktop.org@gmail.com --- Created attachment 143548 --> https://bugs.freedesktop.org/attachment.cgi?id=143548&action=edit Xorg.log
https://bugs.freedesktop.org/show_bug.cgi?id=109887
--- Comment #2 from kgkggl+bugs.freedesktop.org@gmail.com --- Created attachment 143549 --> https://bugs.freedesktop.org/attachment.cgi?id=143549&action=edit pp_table
https://bugs.freedesktop.org/show_bug.cgi?id=109887
--- Comment #3 from fin4478@hotmail.com --- You need to have a kernel command line parameter and c is used to commit changes. See: https://wiki.archlinux.org/index.php/AMDGPU#Overclocking
https://bugs.freedesktop.org/show_bug.cgi?id=109887
--- Comment #4 from kgkggl+bugs.freedesktop.org@gmail.com --- (In reply to fin4478 from comment #3)
You need to have a kernel command line parameter and c is used to commit changes. See: https://wiki.archlinux.org/index.php/AMDGPU#Overclocking
Yes, I use "c" to commit changes, the GPU frequency can always be modified, but the voltage does not take effect.
I use parameters:
# echo s 1 974 825 > /sys/class/drm/card0/device/pp_od_clk_voltage # echo s 2 1096 850 > /sys/class/drm/card0/device/pp_od_clk_voltage # echo s 3 1218 875 > /sys/class/drm/card0/device/pp_od_clk_voltage # echo s 4 1340 900 > /sys/class/drm/card0/device/pp_od_clk_voltage # echo s 5 1462 925 > /sys/class/drm/card0/device/pp_od_clk_voltage # echo s 6 1584 950 > /sys/class/drm/card0/device/pp_od_clk_voltage # echo s 7 1584 950 > /sys/class/drm/card0/device/pp_od_clk_voltage # echo c > /sys/class/drm/card0/device/pp_od_clk_voltage
https://bugs.freedesktop.org/show_bug.cgi?id=109887
--- Comment #5 from bednarczyk.pawel@outlook.com --- Did you manage to get this resolved. I have the same issue and in my case setting P6 = P7 Frequency, the memory clock gets stuck at P0 167 Mhz. I tried 5.1 RC-3 but no joy either.
https://bugs.freedesktop.org/show_bug.cgi?id=109887
--- Comment #6 from Jon Doane jrdoane@gmail.com --- I'm also having this particular issue with a Vega 64. It appears that setting any non-stock voltage to any of the power states will cause the voltage at any clock to jump to 1.20v. I haven't been able to find a way around it yet.
https://bugs.freedesktop.org/show_bug.cgi?id=109887
--- Comment #7 from hagar-dunor hagar-dunor@wanadoo.fr --- Met the same annoyance, and found a rather convoluted way to get around it. It would be better overclocking/undervolting work by setting pp_od_clk_voltage only.
https://forum.level1techs.com/t/how-to-overclock-vega-on-linux/132771/65
https://bugs.freedesktop.org/show_bug.cgi?id=109887
--- Comment #8 from Andrew Sheldon asheldon55@gmail.com --- I also can confirm the problem, and it seems to have gotten worse since 5.3.0-rcX.
In past kernels, you could kind of work around it by setting slightly less conservative undervolts and it would work. If you go past a certain point (a point that works fine if the pp table is overridden), it would wrap around to 1.2V. For reference this around 950mv at state 6/7.
Now with 5.3, even that same relatively conservative undervolt would immediately jump to 1.2V under load.
As hagar-dunor suggested, manually overriding the entire PP table, works around the problem.
https://bugs.freedesktop.org/show_bug.cgi?id=109887
--- Comment #9 from Andrew Sheldon asheldon55@gmail.com --- Here's a linux pp table editor that also seems to support more options (such as raising the power cap) than OverDriveNTool: https://github.com/amezin/powerplay-table-editor
I will note that you might still see raised voltages if you do a too aggressive overclock/undervolt with modded PP tables, but it seems to only overvolt as much as is needed (say 975mv -> 1.05V) if you set a too high clock, rather than jumping to the maximum possible voltage that you see by editing pp_od_clk_voltage.
https://bugs.freedesktop.org/show_bug.cgi?id=109887
--- Comment #10 from Andrew Sheldon asheldon55@gmail.com --- (In reply to Andrew Sheldon from comment #9)
I will note that you might still see raised voltages if you do a too aggressive overclock/undervolt with modded PP tables, but it seems to only overvolt as much as is needed (say 975mv -> 1.05V) if you set a too high clock, rather than jumping to the maximum possible voltage that you see by editing pp_od_clk_voltage.
Replying to myself here. I've found that the raised voltage occurs when forcing GPU state to "high". If I then re-write the PP table again, it settles on the correct voltage, and successfully switches to "high" after. I'm not sure if this is related to some of the other voltage issues, but there you go. This occurs on both 5.2.3 and 5.3-rc2, for the record.
I have to do this every time I force to "high", BTW.
https://bugs.freedesktop.org/show_bug.cgi?id=109887
--- Comment #11 from Stefan Springer stefanspr94@gmail.com --- Loading a powerplay table only temporarily alleviates the issue. It comes back after a while of desktop usage.
I think the culprit might be here: https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/amd/powerplay/...
Why set the voltage for a state to max_vddc in the first place?
https://bugs.freedesktop.org/show_bug.cgi?id=109887
--- Comment #12 from Stefan Springer stefanspr94@gmail.com --- Actually, it gets reset to 1200mV every time the resolution changes. I.e. when launching a fullscreen game or restarting the display manager.
https://bugs.freedesktop.org/show_bug.cgi?id=109887
Stefan Springer stefanspr94@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wslatem@gmail.com
--- Comment #13 from Stefan Springer stefanspr94@gmail.com --- *** Bug 110113 has been marked as a duplicate of this bug. ***
https://bugs.freedesktop.org/show_bug.cgi?id=109887
--- Comment #14 from Stefan Springer stefanspr94@gmail.com --- *** Bug 110347 has been marked as a duplicate of this bug. ***
https://bugs.freedesktop.org/show_bug.cgi?id=109887
Stefan Springer stefanspr94@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|vega56 |[Vega10][powerplay] P7 gets |undervolting/overclocking |reset to max_vddc |voltage issues |(1.2V/1.25V) after applying | |any custom settings via | |pp_od_clk_voltage and/or | |pp_table
https://bugs.freedesktop.org/show_bug.cgi?id=109887
--- Comment #15 from Stefan Springer stefanspr94@gmail.com --- The patch Pelle van Gils proposed here works flawlessly for me: https://bugzilla.kernel.org/show_bug.cgi?id=205277
https://bugs.freedesktop.org/show_bug.cgi?id=109887
haro41@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugzilla.kernel.org | |/show_bug.cgi?id=205277
https://bugs.freedesktop.org/show_bug.cgi?id=109887
haro41@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED
dri-devel@lists.freedesktop.org