You are not logged in.
I'm running miffe/linux-mainline 6.7-rc5 with an RX 7800 XT.
I have this script to overclock it on startup:
#!/usr/bin/env bash
CARD_ID=card1
HWMON_ID=hwmon0
PL=244 # watts
SCLK_MAX=2950 # mhz
MCLK_MAX=1310 # mhz
VOLT_OFF=-140 # volts
TEMP_TGT=60 # celsius
GPU_SYSFS="/sys/devices/pci0000:00/0000:00:03.1/0000:07:00.0/0000:08:00.0/0000:09:00.0/drm/$CARD_ID/device"
HWMON_SYSFS="$GPU_SYSFS/hwmon/$HWMON_ID"
FAN_CTRL_SYSFS="$GPU_SYSFS/gpu_od/fan_ctrl"
# set power limit
echo "$((PL * 1000000))" > "$HWMON_SYSFS/power1_cap"
# # set target fan temp
# echo "$TEMP_TGT" > "$FAN_CTRL_SYSFS/fan_target_temperature"
# echo "c" > "$FAN_CTRL_SYSFS/fan_target_temperature"
# set pstate1 clocks
echo "s 1 $SCLK_MAX" > "$GPU_SYSFS/pp_od_clk_voltage"
echo "m 1 $MCLK_MAX" > "$GPU_SYSFS/pp_od_clk_voltage"
echo "vo $VOLT_OFF" > "$GPU_SYSFS/pp_od_clk_voltage"
echo "c" > "$GPU_SYSFS/pp_od_clk_voltage"And this works fine.
However, if I uncomment the "set target fan temp" section _before_ "set pstate1 clocks", fan speeds stay at default settings; and if I uncomment it _after_ "set pstate1 clocks", the overclock doesn't work anymore.
I can confirm that setting fan_target_temperature after the script has already run does make the clocks go back to default (if nvtop is anything to go by).
IIRC this did not happen on previous 6.7-rc's, although I haven't tested that yet.
What seems to be the underlying issue here? Is there a kernel and/or fdo drm/amd bug report yet? How can I troubleshoot this?
Thanks,
flippette
Offline
IIRC this did not happen on previous 6.7-rc's, although I haven't tested that yet.
Do you have the previous 6.7-rc's in pacman's cache that you can easily test? Otherwise you may need to build them from source.
What seems to be the underlying issue here? Is there a kernel and/or fdo drm/amd bug report yet? How can I troubleshoot this?
Can you reproduce the issue using the latest stable kernel or otherwise isolate it to the kernel? Have you looked through the existing issues at https://gitlab.freedesktop.org/drm/amd/-/issues?
Offline
Do you have the previous 6.7-rc's in pacman's cache that you can easily test? Otherwise you may need to build them from source.
I'll rebuild -rc4 to try when I have access to my computer and test with that.
Can you reproduce the issue using the latest stable kernel or otherwise isolate it to the kernel?
The 6.6 series didn't have the controls for RDNA3 wired up, and I don't think anything's changed since I updated to 6.7-rc5. I could be wrong though.
Have you looked through the existing issues at https://gitlab.freedesktop.org/drm/amd/-/issues?
I can't seem to find any related ones, though my search-fu isn't the best.
Offline
Just in case anyone finds this, I got it to work by committing the settings on both files together at the end of the script.
Like so:
#!/usr/bin/env bash
# config for 7800 xt
CARD_ID=card0
HWMON_ID=hwmon0
PL=244 # watts, default 236
SCLK_MAX=3200 # mhz, default 2570
MCLK_MAX=1310 # mhz, default 1219
VOLT_OFF=-50 # millivolts, default 0
TEMP_TGT=60 # celsius, default 87
GPU_SYSFS="/sys/class/drm/$CARD_ID/device"
HWMON_SYSFS="$GPU_SYSFS/hwmon/$HWMON_ID"
FAN_CTRL_SYSFS="$GPU_SYSFS/gpu_od/fan_ctrl"
# set power limit
echo "$((PL * 10**6))" > "$HWMON_SYSFS/power1_cap"
# set power profile
echo "manual" > "$GPU_SYSFS/power_dpm_force_performance_level"
echo "1" > "$GPU_SYSFS/pp_power_profile_mode"
# set pstate1 clocks
echo "s 1 $SCLK_MAX" > "$GPU_SYSFS/pp_od_clk_voltage"
echo "m 1 $MCLK_MAX" > "$GPU_SYSFS/pp_od_clk_voltage"
echo "vo $VOLT_OFF" > "$GPU_SYSFS/pp_od_clk_voltage"
# set fan curve
echo "$TEMP_TGT" > "$FAN_CTRL_SYSFS/fan_target_temperature"
# confirm all settings in one go
echo "c" | tee "$GPU_SYSFS/pp_od_clk_voltage" | tee "$FAN_CTRL_SYSFS/fan_target_temperature" 1>/dev/nullOffline