You are not logged in.

#1 2024-06-20 08:44:47

Salkay
Member
Registered: 2014-05-22
Posts: 631

Control fans on AMD RX 7800 XT GPU

I just installed an AMD RX 7800 XT (Sapphire Nitro+) on my system. I'm not sure if relevant, but the BIOS switch on the card is set to "Software Switch Mode". The display seems to be working fine, but I can't seem to control the fan. I've read the wiki.

To switch to manual fan control from automatic, run

# echo "1" > /sys/class/drm/card0/device/hwmon/hwmon0/pwm1_enable

However, I don't have these directories.

$ ls -1 /sys/class/drm/
card1-DP-1
card1-DP-2
card1-HDMI-A-1
card1-HDMI-A-2
card1-Writeback-1
renderD128
version

I do have a file at /sys/class/drm/card1/device/hwmon/hwmon1/pwm1_enable (i.e. different card and hwmon numbers).

I tried following the wiki with this alternative file. The first part worked, but the next failed.

# echo 1 > /sys/class/drm/card1/device/hwmon/hwmon1/pwm1_enable
# echo 128 > /sys/class/drm/card1/device/hwmon/hwmon1/pwm1
bash: echo: write error: Invalid argument

I've tried a bunch of other things, i.e.

* corectl
* tuxclocker
* amdguid-wayland-bin (after starting/enabling amdgui-helper.service and amdfand.service)
* lact (after starting/enabling lactd.service)

I've also tried all this after adding amdgpu.ppfeaturemask=0xffffffff to grub, regenerating the config, then rebooting. (Also not sure if relevant, but my bootloader also has acpi_enforce_resources=lax thermal.off=1 module_blacklist=eeepc_wmi to allow me to control the CPU fans.)

In all these cases, I cannot seem to control the fan, although monitoring the temperature seems to work. I've seem reports online of other people getting fan control working for this model. I've also verified that the fan does work; it turns on automatically under load. Is there a way to control the fan using software?

Last edited by Salkay (2024-06-20 08:47:26)

Offline

#2 2024-06-20 10:01:35

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 344
Website

Re: Control fans on AMD RX 7800 XT GPU

However, I don't have these directories.

You do realize the path was more like a example and that you should modify it according to your system?
These values aren't even persistent, e.g. they can change between reboots.

sadly, setting the fan speed manually isn't possible for RDNA3 GPUs yet. see the note in the wiki.
However, it is possible to adjust the fan curves, as described here https://www.kernel.org/doc/html/latest/ … #fan-curve (also scroll down, there's also fan_target_temperature, you might be interested in that)

Feel free to update the wiki with the fan curve to help others.

Last edited by jl2 (2024-06-20 10:13:27)


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Offline

#3 2024-06-20 10:46:49

Salkay
Member
Registered: 2014-05-22
Posts: 631

Re: Control fans on AMD RX 7800 XT GPU

Thanks @jl2.

jl2 wrote:

You do realize the path was more like a example and that you should modify it according to your system?
...
see the note in the wiki.

Oops, I noticed none of that! Thanks for the hints.

jl2 wrote:

However, it is possible to adjust the fan curves, as described here https://www.kernel.org/doc/html/latest/ … #fan-curve (also scroll down, there's also fan_target_temperature, you might be interested in that)

Ah nice. I think I have found the right files. I tested a few different things, but I'm not convinced it's working. Presumably if I write a low value to fan_target_temperature, then the fans should start.

# echo 25 > /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/gpu_od/fan_ctrl/fan_target_temperature
# cat /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/gpu_od/fan_ctrl/fan_target_temperature
FAN_TARGET_TEMPERATURE:
25
OD_RANGE:
TARGET_TEMPERATURE: 25 110
# echo c /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/gpu_od/fan_ctrl/fan_target_temperature

Alternatively, if I write a high value to fan_minimum_pwm the fans should also start.

# echo r /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/gpu_od/fan_ctrl/fan_target_temperature
# echo 90 > /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/gpu_od/fan_ctrl/fan_minimum_pwm
# cat /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/gpu_od/fan_ctrl/fan_minimum_pwm
FAN_MINIMUM_PWM:
90
OD_RANGE:
MINIMUM_PWM: 15 100
# echo c > /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/gpu_od/fan_ctrl/fan_minimum_pwm

However, the fans stayed off in both tests.

jl2 wrote:

Feel free to update the wiki with the fan curve to help others.

I'll definitely do this. I always update the wiki where possible.

I suspect there might be some other issue that I'm missing, given all those other tools failed for me as well!

Last edited by Salkay (2024-06-20 10:48:20)

Offline

#4 2024-06-20 11:24:13

Bzzz_56
Member
Registered: 2021-05-14
Posts: 29

Re: Control fans on AMD RX 7800 XT GPU

I'm using the method given in 7900 XTX Unable to set fan speed, basically one need set the values in

/sys/class/drm/card*/device/gpu_od/fan_ctrl/fan_curve

Offline

#5 2024-06-20 14:07:15

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 344
Website

Re: Control fans on AMD RX 7800 XT GPU

but I'm not convinced it's working

It might be that it uses the Tjunction temperatur (also reported in sensors) like windows instead of the Tedge.

Alternatively, if I write a high value to fan_minimum_pwm the fans should also start.

note that the fans make a full stop when they are under a certain temperature, I think the default is around 50 - 55°, this can be turned off in windows. I don't know how in linux.

I can test on my gpu too, once I get home.

Just out of interest, does your gpu get too hot?

Last edited by jl2 (2024-06-20 14:08:02)


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Offline

#6 2024-06-20 14:33:04

cryptearth
Member
Registered: 2024-02-03
Posts: 411

Re: Control fans on AMD RX 7800 XT GPU

I have a Sapphire 7700 XT pulse and as noted elsewhere: I can adjust the fans with windows but only in a limited range - on linux the card defaults to its own curve.
Running a full blast test (a crypto miner, furmark, gta v and arma 3 all at the same time to fully utilize all parts of the card at once) it gets quite warm (video-mem hits about 90) but the fans keep up at just around 65%.
TLDR: it ssems sapphire uses a rather optimistic curve by prefer low noice over low temps - but hopefully the cards are designed for that

Offline

#7 2024-06-21 05:01:55

Salkay
Member
Registered: 2014-05-22
Posts: 631

Re: Control fans on AMD RX 7800 XT GPU

Thanks everyone for the replies.

Bzzz_56 wrote:

I'm using the method given in 7900 XTX Unable to set fan speed, basically one need set the values in

/sys/class/drm/card*/device/gpu_od/fan_ctrl/fan_curve

I suspect I've essentially tested the equivalent, but I gave this a try anyway.

# echo "0 100 90" > /sys/class/drm/card1/device/gpu_od/fan_ctrl/fan_curve
bash: fan_curve: cannot overwrite existing file

So it doesn't seem to work.

jl2 wrote:

note that the fans make a full stop when they are under a certain temperature, I think the default is around 50 - 55°, this can be turned off in windows. I don't know how in linux.

Yes, I think that's happening in "automatic" mode. However, my understanding from your link is that setting fan_minimum_pwm higher should keep the fan running all the time?

jl2 wrote:

I can test on my gpu too, once I get home.

Thanks again. Much appreciated.

jl2 wrote:

Just out of interest, does your gpu get too hot?

Yeah, I haven't noticed it. TBH the default automatic curve seems okay so far. I'm just used to having to tweak the settings to minimise noise with my old Nvidia card! Perhaps I just shouldn't worry.

cryptearth wrote:

it gets quite warm (video-mem hits about 90) but the fans keep up at just around 65%.
TLDR: it ssems sapphire uses a rather optimistic curve by prefer low noice over low temps - but hopefully the cards are designed for that

Yes, that seems good! I don't think 90°C is terribly high? I would have probably used more than 65% fans, but maybe that's unnecessary.

So yeah, maybe I just shouldn't worry about trying to create a manual curve, because my AMD card seems to do it better than my Nvidia did.

Offline

#8 2024-06-21 08:41:45

cryptearth
Member
Registered: 2024-02-03
Posts: 411

Re: Control fans on AMD RX 7800 XT GPU

Salkay wrote:
cryptearth wrote:

it gets quite warm (video-mem hits about 90) but the fans keep up at just around 65%.
TLDR: it ssems sapphire uses a rather optimistic curve by prefer low noice over low temps - but hopefully the cards are designed for that

Yes, that seems good! I don't think 90°C is terribly high? I would have probably used more than 65% fans, but maybe that's unnecessary.

So yeah, maybe I just shouldn't worry about trying to create a manual curve, because my AMD card seems to do it better than my Nvidia did.

I also would prefer a more agressive curve with higher fan speeds but lower temps - the video-mem long time about 90c is quite toastie and I guess at the upper end
on the other hand according to its dmi data my card has criticals in the 100+ range - with 105c beeing some major warning and critical at 115c - so I guess 90c is within thermal design limits of my card - hence I don't really mind it

Offline

#9 2024-06-21 15:57:06

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 344
Website

Re: Control fans on AMD RX 7800 XT GPU

Thanks again. Much appreciated.

My gpu doesn't have the gpu_od folder sad

But I'm currently running whicper on it for the last 15mins, and I don't hear a lot.
Even with the OC (it's a OC card) temperatures stay at 60° for Tedge and 80° for Tjunction and Tmem, all while under 2000rpm. guess the 3 fans payed off smile


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Offline

#10 2024-06-22 01:43:02

Salkay
Member
Registered: 2014-05-22
Posts: 631

Re: Control fans on AMD RX 7800 XT GPU

cryptearth wrote:

I guess 90c is within thermal design limits of my card - hence I don't really mind it

Agreed.

jl2 wrote:

My gpu doesn't have the gpu_od folder sad

Oh strange. What model is yours?

jl2 wrote:

But I'm currently running whicper on it for the last 15mins, and I don't hear a lot.
Even with the OC (it's a OC card) temperatures stay at 60° for Tedge and 80° for Tjunction and Tmem, all while under 2000rpm. guess the 3 fans payed off smile

Sorry, I'm not sure what whicper is. My Sapphire Nitro+ also has three fans, so maybe I should just stop worrying and leave it on automatic.

Offline

#11 2024-06-22 11:52:37

cryptearth
Member
Registered: 2024-02-03
Posts: 411

Re: Control fans on AMD RX 7800 XT GPU

Just as a sanity check I rebooted into windows - updated all stuff - and well, ok, windows somehow gets a bit more overall power from the card (linux limits to 200w - windows gets about 230w) I also set the curve a bit more agressive - but the result is about the same:
gpu hotspot: around 70c
v-mem: (not displayed but likely same as on linux around 80c-90c)
fans: about 63% (2.400rpm)
tldr: no matter if using the default curve in the v-bios or tuning on windows - my 7700xt sapphire pulse runs a bit hot while get stable the full performance
I'm not sure if the higher temps will shorten the livespan of the card - but it seems to be within design limits

Offline

#12 2024-06-22 13:19:43

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 344
Website

Re: Control fans on AMD RX 7800 XT GPU

(linux limits to 200w - windows gets about 230w)

That is the same here, but wasn't always so - sensors would show 263W (like windows) and nvtop would show 236W, now both show 236W
However, performance doesn't seem to be affected.

@Salkay I have a Gigabyte Radeon RX 7800 XT gaming OC (no specific issue with that card on the internet)
just realized the card has a HW switch for OC/quiet mode. I think that's irrelevant though, got it on OC
And whisper is a AI text transcribtion model (=> I meant heavy load).

Last edited by jl2 (2024-06-22 13:21:46)


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Offline

#13 2024-06-23 04:39:20

Salkay
Member
Registered: 2014-05-22
Posts: 631

Re: Control fans on AMD RX 7800 XT GPU

cryptearth wrote:

I'm not sure if the higher temps will shorten the livespan of the card - but it seems to be within design limits

Hopefully we will replace the card with a newer model before then!

jl2 wrote:

just realized the card has a HW switch for OC/quiet mode.

Yeah mine also has that switch. The documentation from AMD is woeful, but it's on "software switch" mode, which (probably) default to OC. But at the moment the GPU is performing so well it's staying at <60°C when gaming. So the upshot is that I shouldn't worry!

Thanks all for your comments!

Offline

Board footer

Powered by FluxBB