AMDGPU fan 0 rpm

I’m using Manjaro Gnome kernel version 5.16.14.1, my graphics card is AMD ATI Radeon RX 6700 XT and i’m using the standard amdgpu driver.

Couple of months ago my GPU fan speed started showing as 0 rpm on lm-sensors. I also dual boot to pop!_os and the fan speed seems to be working fine, the kernel version is 5.16.11-76051611-generic.

I know the fan is working, because when I adjust the fan speed on corectrl you can hear the fan increasing or decreasing, I just can’t see what speed the fan is running at.

1 Like

have you redo

sudo sensors-detect 

Many times with no success

Hi,

What is your purpose ? i.e run lm_sensors/corectl or getting fans pwm running ?

At first look, its seems to not be compatible between corectl and fancontrol from lm_sensors here.

If you want to get your fans working and nothing all, try amdfan of mcgillij available in AUR. Follow instructions
for installation and will work fine.

Here you have guide aboud amdgpu fans:

https://wiki.archlinux.org/title/Fan_speed_control#AMDGPU_sysfs_fan_control

What is your purpose ? i.e run lm_sensors/corectl or getting fans pwm running ?

Does matter what I want to use it for? The main thing is it use to show fan speed but it no longer does.

At first look, its seems to not be compatible between corectl and fancontrol from lm_sensors here.

Everything works fine on pop!_os

If you want to get your fans working and nothing all, try amdfan of mcgillij available in AUR. Follow instructions

Same, still shows as 0 RPM

1 Like

Here you have guide aboud amdgpu fans:

https://wiki.archlinux.org/title/Fan_speed_control#AMDGPU_sysfs_fan_control

Doesn’t support my GPU

it should show the RPM speed here /sys/class/drm/card0/device/hwmon/hwmon2/fan1_input but it’s always 0

Does matter what I want to use it for? The main thing is it use to show fan speed but it no longer does.

Okay like me in January.

Yes and it will be the same thing with lm_sensors like this values are using by lm_sensors.

Same, still shows as 0 RPM

I’m surprised that not worked for you, me its running fine since I have used amdfan.

Please, report this bug on amfan githup page. I’ll think that you’ll find some answers.

BTW :What did you get in a terminal when you run amdfan ?

If i’m not wrong amdfan extracts fan speed info from /sys/class/drm/card0/device/hwmon/hwmon2/fan1_input, so if the fan1_input is 0 amdfan will show 0, therefore it’s not a amdfan bug

I have no issue with my AMD RX 5700. I did not change the setting or did not install AMDGPU fan that was enabled by default in KDE. I am using Linux Kernel 5.16

Screenshot_20220318_193210


❯ cat /sys/class/drm/card0/device/hwmon/hwmon2/fan1_input
820

It looks like it works.

In my case and then in my experience, my fans were working when I was booting my computer and after, nothing. It is a Gigabyte Radeon RX5500 XT 8Go.
And I don’t know why. I have search a lot on documentation, test a lot of times lm_sensors and I have found amdfan which has saved me and without any configuration. And since this time (mi-january), that works like a charm at around 35 C° and 1150 pwm/minutes.

Hum I remember I have used it in manual mode like automatic mode doesn’t work for me.

What did you get when you ran in a terminal amdfan ?

Hum let me come back to my other computer and find if possible my command lines.

It is not an issue with the number of kernel. The automatic mode doesn’t work.

If i’m not wrong amdfan extracts fan speed info from /sys/class/drm/card0/device/hwmon/hwmon2/fan1_input, so if the fan1_input is 0 amdfan will show 0, therefore it’s not a amdfan bug

lm_sensor use /sys/class/drm/card0/device/hwmon/hwmon2/fan1_input but not amdfan and that’s why that’s work.

Let me not the number of the thread and found my notes.

But it works for me, Fan speed changes automatically, it depends on the temperature. I think it was already integrated into GPU.

@Zesko
Not for me before using amdfan and at first look for ak2022. After yes like you.

@ak2022
Okay.I have finally found my notes and found my bash too. We are going to pass some commands in a terminal for seing why it doesn’t work for you.

pacman -Qi amdfan
systemctl status amdfan

Normally you should get that:

pacman -Qi amdfan
Nom                      : amdfan
Version                  : 0.1.17-1
Description              : Python daemon for controlling the fans on amdgpu cards
Architecture             : any
URL                      : https://github.com/mcgillij/amdfan
Licences                 : GPL2
Groupes                  : --
Fournit                  : --
Dépend de                : python  python-yaml  python-numpy  python-rich  python-click
Dépendances opt.         : --
Requis par               : --
Optionnel pour           : --
Est en conflit avec      : --
Remplace                 : --
Taille installée         : 32,47 KiB
Paqueteur                : Unknown Packager
Compilé le               : sam. 05 mars 2022 20:25:38
Installé le              : sam. 05 mars 2022 20:33:09
Motif d’installation     : Explicitement installé
Script d’installation    : Non
Validé par               : --

[olivier@thorielle ~]$ systemctl status amdfan
● amdfan.service - amdfan controller
     Loaded: loaded (/usr/lib/systemd/system/amdfan.service; enabled; vendor preset: disabled)
     Active: active (running) since Fri 2022-03-18 19:45:04 CET; 12min ago
   Main PID: 555 (amdfan)
      Tasks: 1 (limit: 38405)
     Memory: 57.2M
        CPU: 294ms
     CGroup: /system.slice/amdfan.service
             └─555 /usr/bin/python /usr/bin/amdfan --daemon

mars 18 19:45:04 thorielle systemd[1]: Started amdfan controller.
mars 18 19:45:06 thorielle amdfan[555]: [19:45:06] INFO     Starting amdfan                                >
lines 1-12/12 (END)

Did you have seen my last answer ?

lm_sensor use /sys/class/drm/card0/device/hwmon/hwmon2/fan1_input but not amdfan and that’s why that’s work.

Are you sure? Because according to amdfan source file from line 133 to 138 it’s requesting data from fan1_input

    @property
    def fan_speed(self) -> int:
        try:
            return int(self.read_endpoint("fan1_input"))
        except KeyError:  # better to return no speed then explode
            return 0

and look at line 30 and 31

ROOT_DIR: str = "/sys/class/drm"
HWMON_DIR: str = "device/hwmon"
ROOT_DIR: str = "/sys/class/drm"
HWMON_DIR: str = "device/hwmon"

The /sys/class/drm/card* is read by a lot of software like amdgpu, amdfan and lm_sensors because it is here that the system get some informations about your graphic card. And it is the same for hwmon .
Besides you can see all the options provided by this driver, just do in a terminal :

ls /sys/class/drm/card0/device/hwmon/hwmon*/

And if you want to know what number is your first graphic card :

ls /sys/class/drm/card0/device/hwmon/

And see values of the options for sample the fan1_input

cat /sys/class/drm/card0/device/hwmon/hwmon*/fan1_input 
lm_sensor use /sys/class/drm/card0/device/hwmon/hwmon2/fan1_input but not amdfan and that’s why that’s work.

Exactly, I have mixed lm_sensors and hwmon. Sorry.

To come back to your issue (i.e having fan working), please provide the output of the two commands given upper.

pacman -Qi amdfan                                                ✔ 
Name            : amdfan
Version         : 0.1.17-1
Description     : Python daemon for controlling the fans on amdgpu cards
Architecture    : any
URL             : https://github.com/mcgillij/amdfan
Licenses        : GPL2
Groups          : None
Provides        : None
Depends On      : python  python-yaml  python-numpy  python-rich  python-click
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 32.47 KiB
Packager        : Unknown Packager
Build Date      : Fri 18 Mar 2022 17:52:00 GMT
Install Date    : Fri 18 Mar 2022 17:52:03 GMT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : None

systemctl status amdfan                                                        INT ✘  6s  
● amdfan.service - amdfan controller
     Loaded: loaded (/usr/lib/systemd/system/amdfan.service; enabled; vendor preset: disabled)
     Active: active (running) since Sat 2022-03-19 14:22:29 GMT; 1h 37min ago
   Main PID: 1160 (amdfan)
      Tasks: 1 (limit: 38369)
     Memory: 56.8M
        CPU: 1.431s
     CGroup: /system.slice/amdfan.service
             └─1160 /usr/bin/python /usr/bin/amdfan --daemon

Mar 19 14:22:29 manjaro systemd[1]: Started amdfan controller.
Mar 19 14:22:29 manjaro amdfan[1160]: [14:22:29] INFO     Starting amdfan