wiiznokes / fan-control

Control your fans with different behaviors
GNU General Public License v3.0
157 stars 11 forks source link

Udev rules does not works anymore #112

Closed wiiznokes closed 6 months ago

wiiznokes commented 6 months ago

They don't work on Fedora for me

wiiznokes commented 6 months ago

With this command, it works again

sudo /bin/chmod a+w /sys/class/hwmon/hwmon7/pwm2
sudo /bin/chmod a+w /sys/class/hwmon/hwmon7/pwm2_enable

The permission of this files was reset after some time. We probably need a rule with a RUN clause that execute this commands

wiiznokes commented 6 months ago
sudo hx /usr/lib/udev/rules.d/60-fan-control.rules

or

sudo hx /etc/udev/rules.d/60-fan-control.rules
wiiznokes commented 6 months ago

sudo udevadm test /sys/class/hwmon/hwmon7

wiiznokes commented 6 months ago

KERNEL=="hwmon*", SUBSYSTEM=="hwmon", TAG+="uaccess", RUN+="/bin/find /sys%p -type f -regex '/sys%p/pwm[0-99]\(_enable\)?' -exec /bin/chmod a+w {} \;"

wiiznokes commented 6 months ago

MODE="0464" && https://chmod-calculator.com/

wiiznokes commented 6 months ago

sudo /bin/find /sys/devices/platform/nct6775.656/hwmon/hwmon7 -type f -regex '.*pwm[0-99]\(_enable\)?' -exec /bin/chmod a-w {} \;

wiiznokes commented 6 months ago
SUBSYSTEM=="hwmon", KERNEL=="hwmon[0-99]", RUN+="/bin/chmod a+w /sys%p/pwm2"
SUBSYSTEM=="hwmon", KERNEL=="hwmon[0-99]", RUN+="/bin/chmod a+w /sys%p/pwm2_enable"

or

SUBSYSTEM=="hwmon", KERNEL=="hwmon[0-99]", RUN+="/bin/chmod a+w /sys/class/hwmon/%k/pwm2"
SUBSYSTEM=="hwmon", KERNEL=="hwmon[0-99]", RUN+="/bin/chmod a+w /sys/class/hwmon/%k/pwm2_enable"