sibradzic / amdgpu-clocks

Simple script to control power states of amdgpu driven GPUs
GNU General Public License v2.0
390 stars 43 forks source link

line 132: echo: write error: Invalid argument #18

Closed nikspyratos closed 3 years ago

nikspyratos commented 3 years ago

Seems to be when trying to write the VDDC_CURVE_STATE values, since I can see the other values I have specified being changed. Nothing seems out of the ordinary with that part of the script so not sure where to look further.

Won't write initial state to /tmp/amdgpu-custom-states.card0.initial, it already exists.
Detecting the state values at /sys/class/drm/card0/device/pp_od_clk_voltage:
  SCLK state 0: 800Mhz
  SCLK state 1: 2000Mhz
  MCLK state 1: 875MHz
  VDDC Curve state 0: 800MHz, 698mV
  VDDC Curve state 1: 1467MHz, 790mV
  VDDC Curve state 2: 2000MHz, 1190mV
  Maximum clocks & voltages:
    SCLK clock 2250Mhz
    MCLK clock 950Mhz
  Curent power cap: 230W
Verifying user state values at /etc/default/amdgpu-custom-states.card0:
  SCLK state 0: 800Mhz
  SCLK state 1: 2000Mhz
  MCLK state 1: 875MHz
  VDDC Curve state 0: 800MHz, 698mV
  VDDC Curve state 1: 1467MHz, 790mV
  VDDC Curve state 2: 2000MHz, 1190mV
  Maximum clocks & voltages:
    SCLK clock 2250Mhz
    MCLK clock 950Mhz
Committing custom states to /sys/class/drm/card0/device/pp_od_clk_voltage:
/usr/local/bin/amdgpu-clocks: line 132: echo: write error: Invalid argument
  Done

It actually seems now that I'm getting double output, as when I run amdgpu-clocks I get the above output twice in a row.

b3m17 commented 3 years ago

I had this issue yesterday while I was on 5.9.0-3. Today I updated to 5.9.1-4 and I can now write to pp_od_clk_voltage.

The issue was mentioned here: https://gitlab.freedesktop.org/drm/amd/-/issues/1245

nikspyratos commented 3 years ago

I'm on 5.8.1 but I'll get to trying 5.9.1 then.

alpha6 commented 3 years ago

I have similar problem on my 5700xt/rx580 and 5.8.0-23

b3m17 commented 3 years ago

I have similar problem on my 5700xt/rx580 and 5.8.0-23

Just upgrade to 5.9.1. I'm on RX580 too and I was having the same problem on 5.9.0.

sibradzic commented 3 years ago

@nikolaos-spyratos & @jdotdarko can you please check against latest fix https://github.com/sibradzic/amdgpu-clocks/commit/5b48f04 ? I finally had time to test 5.10, and there is indeed an issue, as pp_od_clk_voltage output changed in the driver, yet again...

b3m17 commented 3 years ago

@sibradzic the latest fix works. No issue with it or whatsoever. I'm on 5.9.6

sibradzic commented 3 years ago

@jdotdarko thanks for reporting!