Lurkki14 / tuxclocker

Qt overclocking tool for GNU/Linux
GNU General Public License v3.0
777 stars 31 forks source link

[Question] RX 7800 XT cannot control fans? #79

Open Sentenza-Git opened 11 months ago

Sentenza-Git commented 11 months ago

Hello,

I'm trying to manually control the card's fans but my settings have no effect, hence my question: Is this card already supported in the latest version of TuxClocker?

PS. I have the same problem if I use CoreCtrl.

TuxClocker version:1.4.0-1 Distribution: Arch Linux - Cinnamon - X11 Kernel version:6.6.3-arch1-1 GPU model:RX 7800 XT Sapphire Pulse **GPU driver:Mesa 23.2.1-2

Lurkki14 commented 11 months ago

Support for that should come in Linux 6.7 but I'm not sure the interface is stable yet.

Sentenza-Git commented 11 months ago

Ok thanks for your reply, I'll be patient then.

Lurkki14 commented 9 months ago

New fan control interface has been released, I'm just not sure if the old interface works with 6.7 with 7000-series cards.

If not, I'll just make the fan speed control set all the curve points to the same value on 7000-series cards, since we can already set fan curves with custom granularity and more conveniently.

Lurkki14 commented 9 months ago

Attempted to add support with https://github.com/Lurkki14/tuxclocker/commit/4f96ee16288fcb103fbf6a364dddf442a94b1ca1

Nama commented 9 months ago

Doesn't seem to work. image

I have libdrm installed. Tried on 6.7.2-AMD-znver3 and linux-zen 6.7 on arch.

I have XFX SPEEDSTER MERC 310 AMD Radeon RX 7900 XT

Lurkki14 commented 9 months ago

@Nama does doing cat /sys/class/drm/card*/device/gpu_od/fan_ctrl/fan_curve look similar to this? https://github.com/Lurkki14/tuxclocker/discussions/88#discussioncomment-8283581

Nama commented 9 months ago

yes

OD_FAN_CURVE:
0: 0C 0%
1: 0C 0%
2: 0C 0%
3: 0C 0%
4: 0C 0%
OD_RANGE:
FAN_CURVE(hotspot temp): 25C 100C
FAN_CURVE(fan speed): 15% 100%

echoing works for me, too. But not with the values you provided. These worked, but took like 10-20 seconds oO (maybe it was the low temp of the core at 42°C)

echo "0 36 20" | sudo tee /sys/class/drm/card0/device/gpu_od/fan_ctrl/fan_curve
echo "1 40 30" | sudo tee /sys/class/drm/card0/device/gpu_od/fan_ctrl/fan_curve
echo "2 45 35" | sudo tee /sys/class/drm/card0/device/gpu_od/fan_ctrl/fan_curve
echo "3 50 40" | sudo tee /sys/class/drm/card0/device/gpu_od/fan_ctrl/fan_curve
echo "4 55 45" | sudo tee /sys/class/drm/card0/device/gpu_od/fan_ctrl/fan_curve
echo "c" | sudo tee /sys/class/drm/card*/device/gpu_od/fan_ctrl/fan_curve

echo "r" resets the fan speed/curve.

Nama commented 9 months ago

Like @lafluer56 said, the default values can't be read: image

getFanSpeedWrite() looks more correct than getFanSpeedWriteRX7000() to me (at least for static speed, I guess)?

$ ls -l /sys/class/drm/card0/device/hwmon/hwmon2/pwm1*
.rw-r--r-- 4.1k root 29 Jan 11:30 /sys/class/drm/card0/device/hwmon/hwmon2/pwm1
.rw-r--r-- 4.1k root 29 Jan 20:10 /sys/class/drm/card0/device/hwmon/hwmon2/pwm1_enable
.r--r--r-- 4.1k root 29 Jan 20:40 /sys/class/drm/card0/device/hwmon/hwmon2/pwm1_max
.r--r--r-- 4.1k root 29 Jan 20:40 /sys/class/drm/card0/device/hwmon/hwmon2/pwm1_min
$ cat /sys/class/drm/card0/device/hwmon/hwmon2/pwm1*
0
2
255
0
$ ls -l /sys/class/drm/card0/device/hwmon/hwmon2/fan1_*
.rw-r--r-- 4.1k root 29 Jan 20:40 /sys/class/drm/card0/device/hwmon/hwmon2/fan1_enable
.r--r--r-- 4.1k root 29 Jan 11:30 /sys/class/drm/card0/device/hwmon/hwmon2/fan1_input
.r--r--r-- 4.1k root 29 Jan 11:30 /sys/class/drm/card0/device/hwmon/hwmon2/fan1_max
.r--r--r-- 4.1k root 29 Jan 11:30 /sys/class/drm/card0/device/hwmon/hwmon2/fan1_min
.rw-r--r-- 4.1k root 29 Jan 20:40 /sys/class/drm/card0/device/hwmon/hwmon2/fan1_target
$ cat /sys/class/drm/card0/device/hwmon/hwmon2/fan1_*
0
0
3300
0
0
# echo 1 > /sys/class/drm/card0/device/hwmon/hwmon2/pwm1_enable
# cat /sys/class/drm/card0/device/hwmon/hwmon2/pwm1_enable
2
# echo 100 > /sys/class/drm/card0/device/hwmon/hwmon2/pwm1
# dmesg
amdgpu: manual fan speed control should be enabled first

It is not possible to change to manual mode oO

Lurkki14 commented 9 months ago

Attempted fix for fan speed setting https://github.com/Lurkki14/tuxclocker/commit/258ad2f16af6ba0d263cf6dc11b24d993b6a0c37

Also looks like we need a separate node for RX 7000 to reset the fan speed, I'll add that in a bit

Lurkki14 commented 9 months ago

Added the reset edb7a8d19e7649f3dc423763811f66165268da48

Also uploaded a tarball with this to https://github.com/Lurkki14/tuxclocker/releases/tag/1.5.0 as tuxclocker-master.tar.xz