Closed GreatBigWhiteWorld closed 2 years ago
I'm having the exact same problem. Can you share your system info? The script is trying to write a value that the driver rejects, in my case 97MHz for MCLK state 0; the second value of 1000MHz for state 1 gets a pass. I'm testing with an empty /etc/default/amdgpu-custom-state.card0
.
# cat /sys/class/drm/card0/device/pp_od_clk_voltage
OD_SCLK:
0: 500Mhz
1: 2519Mhz
OD_MCLK:
0: 97Mhz <-- it's trying to write this back as a custom state
1: 1000MHz
OD_VDDGFX_OFFSET:
0mV
OD_RANGE:
SCLK: 500Mhz 3000Mhz
MCLK: 674Mhz 1075Mhz
# cat /sys/class/drm/card0/device/pp_dpm_mclk
0: 96Mhz <-- 96 instead of 97, but the driver also doesn't accept it
1: 456Mhz
2: 673Mhz
3: 1000Mhz *
Replacing (I just jammed it into the script to test) m 0 97
with m 0 674
works. My PC froze when I initially replaced it with m 0 1000
(alongside m 1 1000
) so I'm hitting send on this comment before trying 673 and 456. :')
Edit: It rejects 673MHz, as well as - seemingly - any value below 674MHz. It seems what's listed above in the OD_RANGE
lines applies, but the script assumes the valid range for custom/overdrive pstates can be read from the list of current states. Now I need to figure out why my current states are 97 and 1000, if 97 clearly isn't allowed by the driver - that'd explain why it doesn't seem to reduce memory clock in idle (it's stuck at 1000, which is a separate problem unrelated to this tool).
Edit 2: The system journal is pretty direct about it, I should have checked this first...
kernel: amdgpu 0000:0b:00.0: amdgpu: OD setting (6, 456) is less than the minimum allowed (674)
I'm a noob but I guess it's a bug of the script, which tries to apply a too low value to be allowed by the driver, if the expected value is not given by the custom-states profile.
I didn't test it but if anything below 673 is rejected, my understanding is that the driver rejects any mclock value that's even lower than the second highest value (673) as the highest value it can use, which would cause the machine to be unstable? So the script's default mclock range reading might be problematic. And the work around atm is to give a value for mclock in the custom-states file, e.g.: OD_MCLK: 1: 1000MHz (the default highest value if you don't care about it at all)
I just tested my solution, but setting mclk 950 or 1000 don't work either for me. It's the same line 154 error. OD_MCLK: 1: 1000MHz
This machine has an RX 6600 XT card, but it uses amdgpu driver from the official AMD repo, not from the OS distro kernel firmware, which did not work for some reason.
@GreatBigWhiteWorld
Hi, any idea what's causing this?
See https://github.com/sibradzic/amdgpu-clocks/issues/32
Two more unrelated questions
manual
is required in order to make certain other settings possible at all, details in the link.Written initial backup states to /tmp/custom-states.card0.initial
early in the output. The script will attempt to store the "initial" state to a file, that restore command should be able to restore. If you have an issue with restore feature, please open another issue, with details on how do you get there in the first place.@GreatBigWhiteWorld @itspngu
Since this is 3rd+ time people are complaining about this, essentially a GPU ROM/firmware issue, I've decided it would be better to add a simple workaround to the script to avoid this from happening in the first place. Gimme few minutes...
@GreatBigWhiteWorld @itspngu
does the change I just pushed help?
@GreatBigWhiteWorld @itspngu
does the change I just pushed help?
Yes sir! Thank you. Wasn't aware that this was a known issue.
# amdgpu-clocks
Writen initial backup states to /tmp/amdgpu-custom-state.card0.initial
Detecting the state values at /sys/class/drm/card0/device/pp_od_clk_voltage:
SCLK state 0: 500Mhz
SCLK state 1: 2514Mhz
MCLK state 0: 97Mhz
MCLK state 1: 1000MHz
VDD GFX Offset: 0mV
Maximum clocks & voltages:
SCLK clock 3000Mhz
MCLK clock 1075Mhz
Curent power cap: 255W
Verifying user state values at /etc/default/amdgpu-custom-state.card0:
SCLK state 0: 500Mhz
SCLK state 1: 2519Mhz
MCLK state 0: 674MHz
MCLK state 1: 1000MHz
Committing custom states to /sys/class/drm/card0/device/pp_od_clk_voltage:
Done
- When you run the script, you get something like
Written initial backup states to /tmp/custom-states.card0.initial
early in the output. The script will attempt to store the "initial" state to a file, that restore command should be able to restore. If you have an issue with restore feature, please open another issue, with details on how do you get there in the first place.
I can confirm the new script works fine. Thanks!
Dumb question:
As for the restore feature, can you tell me how to use it?
I tried
sudo amdgpu-clocks --restore
or
sudo amdgpu-clocks restore
But neither works? Did you mean I need to manually cd to the /tmp folder to run the script again using the stored file?
Just restore
, as the one and only argument. Can't help you much unless you provide full output when you run the script, restore included, preferably in a separate issue...
674 MHz is the lowest value for the lowest power state for memory as defined in the gpu bios. It makes sense that you cannot set it any lower. (And really, there shouldn't be any reason to do so)
I also encounter this issue, and I fixed it after setting performance level to 'manual' manully before running the script:
1. Should performance level set to 'manual' mandatory if I use this script? I have a poor understanding of what manually really means...
@sibradzic is it intentional ?
I found the root cause is related to https://github.com/sibradzic/amdgpu-clocks/issues/45. Even if the service did set the level to manual and adjust the frequency, the states seemed to be reverted back.
Is there any way to start the service after amd driver setup?
Hi, any idea what's causing this? I have a very simple profile which only force SCLK state and performance level.
Two more unrelated questions (let me know if I should start a new issue for these)