You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running fancontrol-gui via the snap package manager and thus need udev rules. The default udev rules from this github assume hwmon7 to be the correct one for PWM control:
❯ ls /sys/class/hwmon
hwmon0 hwmon1 hwmon2 hwmon3 hwmon4
So I looked into the directories and hwmon1 had 1 PWM controllers and hwmon4 had 7 PWM controllers. These are the controllers from my graphics card (nvidia, so noveau driver) and my motherboard:
❯ /usr/bin/cat /sys/class/hwmon/hwmon1/name
nouveau
❯ /usr/bin/cat /sys/class/hwmon/hwmon4/name
nct6798
Only after adding a line for hwmon1 and hwmon4 in the udev file was I able to control my fans.
I propose two solutions:
Add all possible hwmon devices to the udev file
or
Run a script to detect which hwmon has PWM controllers and only add those to the udev file
Please note that hwmon numbers will also change upon changing hardware configuration. So after swapping out a graphics card or the motherboard all numbers will be mixed up again (which will also mess with the fancontrol config file...)
The text was updated successfully, but these errors were encountered:
Thanks for bringing that up. Tbh, it seemed odd to me that only hwon7 was useful.
I'm running fancontrol-gui via the snap package manager
Didn't known that was possible. Are you planning to make a snap package or it's just something personal ?
# XXX: Only hwmon7 because it failed on all other number on machine
SUBSYSTEM=="hwmon", KERNEL=="hwmon7", RUN+="/bin/sh -c '/bin/chmod a+w /sys%p/pwm*'"
As the comment say, i specified the 7 because the chmod command was runned for every KERNEL, thus causing errors. It just not nice for logs, but i guess we could wildcard the kernel number (KERNEL=="hwmon[0-99]") or just remove it, and discard any error (command || true).
Please note that hwmon numbers will also change upon changing hardware configuration. So after swapping out a graphics card or the motherboard all numbers will be mixed up again (which will also mess with the fancontrol config file...)
I don't see it as an issue, because it will not make the app crash. The config is sanitized at runtime.
We might be able to play with OWNER, GROUP, MODE and TAG+="uaccess" instead of relying on hacky chmod command (doc).
I'm running fancontrol-gui via the snap package manager and thus need udev rules. The default udev rules from this github assume hwmon7 to be the correct one for PWM control:
My system doesn't even have a folder for hwmon7:
So I looked into the directories and hwmon1 had 1 PWM controllers and hwmon4 had 7 PWM controllers. These are the controllers from my graphics card (nvidia, so noveau driver) and my motherboard:
Only after adding a line for hwmon1 and hwmon4 in the udev file was I able to control my fans.
I propose two solutions:
or
Please note that hwmon numbers will also change upon changing hardware configuration. So after swapping out a graphics card or the motherboard all numbers will be mixed up again (which will also mess with the fancontrol config file...)
The text was updated successfully, but these errors were encountered: