[SOLVED] fancontrol, hwmon devices change all the time
by deNiro from LinuxQuestions.org on (#5DT0J)
Since yesterday I'm on Slackware Current, and I really like it
However, I have an issue with the fancontrol config and hwmon links that are changing every boot, probably based on load order of the modules. This means i have to edit the config file at every bootand can not automatically run it.
At this boot session the hwmon devices are:
Code:henk@WOPR:~$ ls /sys/class/hwmon/ -al
total 0
drwxr-xr-x 2 root root 0 Feb 5 2021 ./
drwxr-xr-x 78 root root 0 Feb 5 2021 ../
lrwxrwxrwx 1 root root 0 Feb 5 14:50 hwmon0 -> ../../devices/virtual/thermal/thermal_zone0/hwmon0/
lrwxrwxrwx 1 root root 0 Feb 5 14:50 hwmon1 -> ../../devices/platform/coretemp.0/hwmon/hwmon1/
lrwxrwxrwx 1 root root 0 Feb 5 14:50 hwmon2 -> ../../devices/platform/eeepc-wmi/hwmon/hwmon2/
lrwxrwxrwx 1 root root 0 Feb 5 14:50 hwmon3 -> ../../devices/platform/nct6775.656/hwmon/hwmon3/Now I would like the order, for example, like this
Code:/sbin/modprobe thermal
/sbin/modprobe coretemp
/sbin/modprobe nct6775
/sbin/modprobe eeepc-wmi( I tried to place it in /etc/rc.d/rc.modules.local , but that's probably not the correct way to get the right sequence, because it did not work.)
So I see 2 solutions.
1.use the real device pathnames in the fancontrol config file. But this will make the config hard to read.
2. load the modules in order. But I don't know how to achieve this.
Well there is a third insane solution, which would be to create 16 fancontrol scripts, based on the 4 hwmon possibilities, and then create a bash script to do a check which is which, and then load the right fancontrolscript. But that would be pretty inefficient.
So basically is it possible to controle the module load order of these 4 modules, how can I do that?


However, I have an issue with the fancontrol config and hwmon links that are changing every boot, probably based on load order of the modules. This means i have to edit the config file at every bootand can not automatically run it.
At this boot session the hwmon devices are:
Code:henk@WOPR:~$ ls /sys/class/hwmon/ -al
total 0
drwxr-xr-x 2 root root 0 Feb 5 2021 ./
drwxr-xr-x 78 root root 0 Feb 5 2021 ../
lrwxrwxrwx 1 root root 0 Feb 5 14:50 hwmon0 -> ../../devices/virtual/thermal/thermal_zone0/hwmon0/
lrwxrwxrwx 1 root root 0 Feb 5 14:50 hwmon1 -> ../../devices/platform/coretemp.0/hwmon/hwmon1/
lrwxrwxrwx 1 root root 0 Feb 5 14:50 hwmon2 -> ../../devices/platform/eeepc-wmi/hwmon/hwmon2/
lrwxrwxrwx 1 root root 0 Feb 5 14:50 hwmon3 -> ../../devices/platform/nct6775.656/hwmon/hwmon3/Now I would like the order, for example, like this
Code:/sbin/modprobe thermal
/sbin/modprobe coretemp
/sbin/modprobe nct6775
/sbin/modprobe eeepc-wmi( I tried to place it in /etc/rc.d/rc.modules.local , but that's probably not the correct way to get the right sequence, because it did not work.)
So I see 2 solutions.
1.use the real device pathnames in the fancontrol config file. But this will make the config hard to read.
2. load the modules in order. But I don't know how to achieve this.
Well there is a third insane solution, which would be to create 16 fancontrol scripts, based on the 4 hwmon possibilities, and then create a bash script to do a check which is which, and then load the right fancontrolscript. But that would be pretty inefficient.
So basically is it possible to controle the module load order of these 4 modules, how can I do that?