Skip to contentSkip to conversation

/sys/class/hwmon/ numbering

lm-sensors Charles Prévot 4 participants 7 messages Nov 26, 2009 – Nov 27, 2009

lore
Share & tools
lore
#0 lore raw

Hi,
I'm not sure it's the right place to ask my question, if it's not please feel free to indicate me the post appropriate place ;)

I have some problems configuring the fancontrol script, because each time I shutdown my computer, when I reboot my /sys/class/hwmon/ is different (subfolders hwmon? are numbered differently).
What is responsible for this order ?
How can I configure it to have i fixed order ?

my motherboard is a Asus MN2 SLI DELUXE with AMD CPU below some results:

$ls -l /sys/class/hwmon/hwmon?/ /sys/class/hwmon/hwmon0/:
total 0
-r--r--r-- 1 root root 4096 2009-11-26 08:30 name
drwxr-xr-x 2 root root 0 2009-11-26 08:51 power
lrwxrwxrwx 1 root root 0 2009-11-26 08:51 subsystem ->
../../../../class/hwmon
-r--r--r-- 1 root root 4096 2009-11-26 08:51 temp1_crit -r--r--r-- 1 root root 4096 2009-11-26 08:35 temp1_input -rw-r--r-- 1 root root 4096 2009-11-26 08:51 uevent

/sys/class/hwmon/hwmon1/:
total 0
lrwxrwxrwx 1 root root 0 2009-11-26 08:30 device -> ../../../ATK0110:00
-r--r--r-- 1 root root 4096 2009-11-26 08:11 fan1_input -r--r--r-- 1 root root 4096 2009-11-26 08:30 fan1_label -r--r--r-- 1 root root 4096 2009-11-26 08:30 fan1_max -r--r--r-- 1 root root 4096 2009-11-26 08:11 fan1_min -r--r--r-- 1 root root 4096 2009-11-26 08:11 fan2_input -r--r--r-- 1 root root 4096 2009-11-26 08:30 fan2_label -r--r--r-- 1 root root 4096 2009-11-26 08:30 fan2_max -r--r--r-- 1 root root 4096 2009-11-26 08:11 fan2_min -r--r--r-- 1 root root 4096 2009-11-26 08:11 fan3_input -r--r--r-- 1 root root 4096 2009-11-26 08:30 fan3_label -r--r--r-- 1 root root 4096 2009-11-26 08:30 fan3_max -r--r--r-- 1 root root 4096 2009-11-26 08:11 fan3_min -r--r--r-- 1 root root 4096 2009-11-26 08:11 in0_input -r--r--r-- 1 root root 4096 2009-11-26 08:27 in0_label -r--r--r-- 1 root root 4096 2009-11-26 08:11 in0_max -r--r--r-- 1 root root 4096 2009-11-26 08:11 in0_min -r--r--r-- 1 root root 4096 2009-11-26 08:11 in1_input -r--r--r-- 1 root root 4096 2009-11-26 08:27 in1_label -r--r--r-- 1 root root 4096 2009-11-26 08:11 in1_max -r--r--r-- 1 root root 4096 2009-11-26 08:11 in1_min -r--r--r-- 1 root root 4096 2009-11-26 08:11 in2_input -r--r--r-- 1 root root 4096 2009-11-26 08:30 in2_label -r--r--r-- 1 root root 4096 2009-11-26 08:11 in2_max -r--r--r-- 1 root root 4096 2009-11-26 08:11 in2_min -r--r--r-- 1 root root 4096 2009-11-26 08:11 in3_input -r--r--r-- 1 root root 4096 2009-11-26 08:30 in3_label -r--r--r-- 1 root root 4096 2009-11-26 08:11 in3_max -r--r--r-- 1 root root 4096 2009-11-26 08:11 in3_min -r--r--r-- 1 root root 4096 2009-11-26 08:30 name
drwxr-xr-x 2 root root 0 2009-11-26 08:30 power
lrwxrwxrwx 1 root root 0 2009-11-26 08:30 subsystem ->
../../../../../../../class/hwmon
-r--r--r-- 1 root root 4096 2009-11-26 08:30 temp1_crit -r--r--r-- 1 root root 4096 2009-11-26 08:11 temp1_input -r--r--r-- 1 root root 4096 2009-11-26 08:30 temp1_label -r--r--r-- 1 root root 4096 2009-11-26 08:30 temp1_max -r--r--r-- 1 root root 4096 2009-11-26 08:30 temp2_crit -r--r--r-- 1 root root 4096 2009-11-26 08:26 temp2_input -r--r--r-- 1 root root 4096 2009-11-26 08:33 temp2_label -r--r--r-- 1 root root 4096 2009-11-26 08:30 temp2_max -rw-r--r-- 1 root root 4096 2009-11-26 08:30 uevent

/sys/class/hwmon/hwmon2/:
total 0

lrwxrwxrwx 1 root root    0 2009-11-26 08:35 device -> ../../../it87.656
drwxr-xr-x 2 root root    0 2009-11-26 08:51 power
lrwxrwxrwx 1 root root    0 2009-11-26 08:51 subsystem ->

../../../../../class/hwmon
-rw-r--r-- 1 root root 4096 2009-11-26 08:51 uevent

$ cat /sys/class/hwmon/hwmon0/name
acpitz
$ cat /sys/class/hwmon/hwmon1/name
atk0110

/sys/class/hwmon/hwmon*/name

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#1 lore raw
Quoted 4 lines · Charles Prévot

I have some problems configuring the fancontrol script, because each time I shutdown my computer, when I reboot my /sys/class/hwmon/ is different (subfolders hwmon? are numbered differently).
What is responsible for this order ?

The order in which the respective drivers are initialized. Since the initialization functions run in parallel, this is essentially random, as you're seeing.

Quoted 1 line

How can I configure it to have i fixed order ?

The entries in /sys/class/hwmon/ are actually symbolic links (see the output of "ls -l /sys/class/hwmon"), so you could refer to the devices by their real path.

If some program requires paths in /sys/class/hwmon, you could blacklist all the hwmon modules to prevent them from loading, then load them later in some predetermined order. (How this is done depends on the distribution, usually with files in /etc/modprobe.conf.)

HTH
Clemens

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#2 lore raw
In reply to Charles Prévot

Bonjour Charles,

Quoted 70 lines · Charles Prévot

I have some problems configuring the fancontrol script, because each time I shutdown my computer, when I reboot my /sys/class/hwmon/ is different (subfolders hwmon? are numbered differently).
What is responsible for this order ?
How can I configure it to have i fixed order ?

my motherboard is a Asus MN2 SLI DELUXE with AMD CPU below some results:

$ls -l /sys/class/hwmon/hwmon?/
/sys/class/hwmon/hwmon0/:
total 0
-r--r--r-- 1 root root 4096 2009-11-26 08:30 name
drwxr-xr-x 2 root root 0 2009-11-26 08:51 power
lrwxrwxrwx 1 root root 0 2009-11-26 08:51 subsystem ->
../../../../class/hwmon

(quoted diff) +0 -3
-r--r--r-- 1 root root 4096 2009-11-26 08:51 temp1_crit
-r--r--r-- 1 root root 4096 2009-11-26 08:35 temp1_input
-rw-r--r-- 1 root root 4096 2009-11-26 08:51 uevent

/sys/class/hwmon/hwmon1/:
total 0
lrwxrwxrwx 1 root root 0 2009-11-26 08:30 device -> ../../../ATK0110:00

(quoted diff) +0 -29
-r--r--r-- 1 root root 4096 2009-11-26 08:11 fan1_input
-r--r--r-- 1 root root 4096 2009-11-26 08:30 fan1_label
-r--r--r-- 1 root root 4096 2009-11-26 08:30 fan1_max
-r--r--r-- 1 root root 4096 2009-11-26 08:11 fan1_min
-r--r--r-- 1 root root 4096 2009-11-26 08:11 fan2_input
-r--r--r-- 1 root root 4096 2009-11-26 08:30 fan2_label
-r--r--r-- 1 root root 4096 2009-11-26 08:30 fan2_max
-r--r--r-- 1 root root 4096 2009-11-26 08:11 fan2_min
-r--r--r-- 1 root root 4096 2009-11-26 08:11 fan3_input
-r--r--r-- 1 root root 4096 2009-11-26 08:30 fan3_label
-r--r--r-- 1 root root 4096 2009-11-26 08:30 fan3_max
-r--r--r-- 1 root root 4096 2009-11-26 08:11 fan3_min
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in0_input
-r--r--r-- 1 root root 4096 2009-11-26 08:27 in0_label
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in0_max
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in0_min
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in1_input
-r--r--r-- 1 root root 4096 2009-11-26 08:27 in1_label
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in1_max
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in1_min
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in2_input
-r--r--r-- 1 root root 4096 2009-11-26 08:30 in2_label
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in2_max
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in2_min
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in3_input
-r--r--r-- 1 root root 4096 2009-11-26 08:30 in3_label
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in3_max
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in3_min
-r--r--r-- 1 root root 4096 2009-11-26 08:30 name

drwxr-xr-x 2 root root 0 2009-11-26 08:30 power
lrwxrwxrwx 1 root root 0 2009-11-26 08:30 subsystem ->
../../../../../../../class/hwmon

(quoted diff) +0 -9
-r--r--r-- 1 root root 4096 2009-11-26 08:30 temp1_crit
-r--r--r-- 1 root root 4096 2009-11-26 08:11 temp1_input
-r--r--r-- 1 root root 4096 2009-11-26 08:30 temp1_label
-r--r--r-- 1 root root 4096 2009-11-26 08:30 temp1_max
-r--r--r-- 1 root root 4096 2009-11-26 08:30 temp2_crit
-r--r--r-- 1 root root 4096 2009-11-26 08:26 temp2_input
-r--r--r-- 1 root root 4096 2009-11-26 08:33 temp2_label
-r--r--r-- 1 root root 4096 2009-11-26 08:30 temp2_max
-rw-r--r-- 1 root root 4096 2009-11-26 08:30 uevent

/sys/class/hwmon/hwmon2/:
total 0

lrwxrwxrwx 1 root root    0 2009-11-26 08:35 device -> ../../../it87.656
drwxr-xr-x 2 root root    0 2009-11-26 08:51 power
lrwxrwxrwx 1 root root    0 2009-11-26 08:51 subsystem ->
Quoted 7 lines

../../../../../class/hwmon
-rw-r--r-- 1 root root 4096 2009-11-26 08:51 uevent

$ cat /sys/class/hwmon/hwmon0/name
acpitz
$ cat /sys/class/hwmon/hwmon1/name
atk0110

This is not the question you were asking, but you should NOT be using drivers asus_atk0110 and it87 together. They access the same piece of hardware, without synchronization of any form, which is dangerous. If your kernel is recent enough that it has the asus_atk0110 driver (you did not tell us the exact kernel version... I guess 2.6.30?) then you should stop using the it87 driver. Kernel 2.6.31 and later will prevent you from loading it87 so you better get used to it.

This will indirectly solve your problem, although probably not the way you would like: the asus_atk0110 driver doesn't offer manual fan speed control facilities, instead you must select the automatic fan speed control strategy in the BIOS.

I'm not sure about the ACPI thermal zone, I thought Asus boards did not have one. Luca, ever seen this before? Is it OK to use both the ACPI thermal driver and the asus_atk0110 driver at the same time?

Signature · 7 lines
Jean Delvare
http://khali.linux-fr.org/wishlist.html

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#3 lore raw
In reply to Charles Prévot
Quoted 78 lines · Jean Delvare

Bonjour Charles,

Quoted 1 line · Charles Prévot

I have some problems configuring the fancontrol script, because each time

I

Quoted 19 lines

shutdown my computer, when I reboot my /sys/class/hwmon/ is different (subfolders hwmon? are numbered differently).
What is responsible for this order ?
How can I configure it to have i fixed order ?

my motherboard is a Asus MN2 SLI DELUXE with AMD CPU below some results:

$ls -l /sys/class/hwmon/hwmon?/
/sys/class/hwmon/hwmon0/:
total 0
-r--r--r-- 1 root root 4096 2009-11-26 08:30 name
drwxr-xr-x 2 root root 0 2009-11-26 08:51 power
lrwxrwxrwx 1 root root 0 2009-11-26 08:51 subsystem ->
../../../../class/hwmon

(quoted diff) +0 -3
-r--r--r-- 1 root root 4096 2009-11-26 08:51 temp1_crit
-r--r--r-- 1 root root 4096 2009-11-26 08:35 temp1_input
-rw-r--r-- 1 root root 4096 2009-11-26 08:51 uevent
Quoted 3 lines

/sys/class/hwmon/hwmon1/:
total 0
lrwxrwxrwx 1 root root 0 2009-11-26 08:30 device ->

../../../ATK0110:00

Quoted 50 lines
(quoted diff) +0 -29
-r--r--r-- 1 root root 4096 2009-11-26 08:11 fan1_input
-r--r--r-- 1 root root 4096 2009-11-26 08:30 fan1_label
-r--r--r-- 1 root root 4096 2009-11-26 08:30 fan1_max
-r--r--r-- 1 root root 4096 2009-11-26 08:11 fan1_min
-r--r--r-- 1 root root 4096 2009-11-26 08:11 fan2_input
-r--r--r-- 1 root root 4096 2009-11-26 08:30 fan2_label
-r--r--r-- 1 root root 4096 2009-11-26 08:30 fan2_max
-r--r--r-- 1 root root 4096 2009-11-26 08:11 fan2_min
-r--r--r-- 1 root root 4096 2009-11-26 08:11 fan3_input
-r--r--r-- 1 root root 4096 2009-11-26 08:30 fan3_label
-r--r--r-- 1 root root 4096 2009-11-26 08:30 fan3_max
-r--r--r-- 1 root root 4096 2009-11-26 08:11 fan3_min
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in0_input
-r--r--r-- 1 root root 4096 2009-11-26 08:27 in0_label
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in0_max
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in0_min
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in1_input
-r--r--r-- 1 root root 4096 2009-11-26 08:27 in1_label
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in1_max
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in1_min
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in2_input
-r--r--r-- 1 root root 4096 2009-11-26 08:30 in2_label
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in2_max
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in2_min
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in3_input
-r--r--r-- 1 root root 4096 2009-11-26 08:30 in3_label
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in3_max
-r--r--r-- 1 root root 4096 2009-11-26 08:11 in3_min
-r--r--r-- 1 root root 4096 2009-11-26 08:30 name

drwxr-xr-x 2 root root 0 2009-11-26 08:30 power
lrwxrwxrwx 1 root root 0 2009-11-26 08:30 subsystem ->
../../../../../../../class/hwmon

(quoted diff) +0 -9
-r--r--r-- 1 root root 4096 2009-11-26 08:30 temp1_crit
-r--r--r-- 1 root root 4096 2009-11-26 08:11 temp1_input
-r--r--r-- 1 root root 4096 2009-11-26 08:30 temp1_label
-r--r--r-- 1 root root 4096 2009-11-26 08:30 temp1_max
-r--r--r-- 1 root root 4096 2009-11-26 08:30 temp2_crit
-r--r--r-- 1 root root 4096 2009-11-26 08:26 temp2_input
-r--r--r-- 1 root root 4096 2009-11-26 08:33 temp2_label
-r--r--r-- 1 root root 4096 2009-11-26 08:30 temp2_max
-rw-r--r-- 1 root root 4096 2009-11-26 08:30 uevent

/sys/class/hwmon/hwmon2/:
total 0

lrwxrwxrwx 1 root root    0 2009-11-26 08:35 device -> ../../../it87.656
drwxr-xr-x 2 root root    0 2009-11-26 08:51 power
lrwxrwxrwx 1 root root    0 2009-11-26 08:51 subsystem ->

../../../../../class/hwmon
-rw-r--r-- 1 root root 4096 2009-11-26 08:51 uevent

Quoted 13 lines
Quoted 4 lines
$ cat /sys/class/hwmon/hwmon0/name
acpitz
$ cat /sys/class/hwmon/hwmon1/name
atk0110

This is not the question you were asking, but you should NOT be using drivers asus_atk0110 and it87 together. They access the same piece of hardware, without synchronization of any form, which is dangerous. If your kernel is recent enough that it has the asus_atk0110 driver (you did not tell us the exact kernel version... I guess 2.6.30?) then you should stop using the it87 driver. Kernel 2.6.31 and later will prevent you from loading it87 so you better get used to it.

Ok, if you say so... I was using it87 because sensors-detect told me to. I'm using the latest kernel version proposed by ubuntu karmic (should be 2.6.31-15 but I'm not in front of this computer right now). I will investigate this when I get back home.
Is asus_atk0110 supposed to managed the "Cool'n Quiet" feature ?

Quoted 6 lines

This will indirectly solve your problem, although probably not the way you would like: the asus_atk0110 driver doesn't offer manual fan speed control facilities, instead you must select the automatic fan speed control strategy in the BIOS.

I think the strategy is ok in the bios settings (as far as I recall it was working on windows), but I will look at it too. I don't want a manual fan speed control, I was using the fancontrol script to slow them depending on the temperatures, if the bios can do it automatically it's ok for me, but I'm not sure it's the case...

Quoted 9 lines

I'm not sure about the ACPI thermal zone, I thought Asus boards did not have one. Luca, ever seen this before? Is it OK to use both the ACPI thermal driver and the asus_atk0110 driver at the same time?

--
Jean Delvare
http://khali.linux-fr.org/wishlist.html

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#4 lore raw
In reply to Charles Prévot
Quoted 1 line · Charles Prévot

Is asus_atk0110 supposed to managed the "Cool'n Quiet" feature ?

No, AFAIK Cool'n Quiet is a CPU-related feature handled by the powernow-k8 driver. asus_atk0110 is only exporting the hardware monitoring values implemented by Asus in their BIOS. At this time asus_atk0110 is a read-only driver, it doesn't make any change to your system.

Signature · 7 lines
Jean Delvare
http://khali.linux-fr.org/wishlist.html

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#5 lore raw
In reply to Charles Prévot
Quoted 4 lines · Jean Delvare

Bonjour Charles,

Quoted 2 lines · Charles Prévot

my motherboard is a Asus MN2 SLI DELUXE with AMD CPU below some results:

[...]

Quoted 8 lines

This will indirectly solve your problem, although probably not the way you would like: the asus_atk0110 driver doesn't offer manual fan speed control facilities, instead you must select the automatic fan speed control strategy in the BIOS.

I'm not sure about the ACPI thermal zone, I thought Asus boards did not have one. Luca, ever seen this before? Is it OK to use both the ACPI thermal driver and the asus_atk0110 driver at the same time?

Yes. I already have the DSDT of that board; internally TZ and ATK both use the same methods but the execution of the ACPI interpreter is serialized so there's no chance of conflict.
On this particular board the it87 driver would interfere with TZ, regardless of whether asus_atk0110 is loaded or not: better not load it.
Charles, the BIOS supports Q-FAN; in the DSDT I don't see the profiles, but a "Q-Fan Ratio". Check the manual (and the BIOS itself).

Luca

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#6 lore raw
In reply to Charles Prévot
Quoted 15 lines · Luca Tettamanti
Quoted 4 lines · Jean Delvare

Bonjour Charles,

Quoted 2 lines · Charles Prévot

my motherboard is a Asus MN2 SLI DELUXE with AMD CPU below some results:

[...]

Quoted 8 lines

This will indirectly solve your problem, although probably not the way you would like: the asus_atk0110 driver doesn't offer manual fan speed control facilities, instead you must select the automatic fan speed control strategy in the BIOS.

I'm not sure about the ACPI thermal zone, I thought Asus boards did not have one. Luca, ever seen this before? Is it OK to use both the ACPI thermal driver and the asus_atk0110 driver at the same time?

Quoted 9 lines

Yes. I already have the DSDT of that board; internally TZ and ATK both use the same methods but the execution of the ACPI interpreter is serialized so there's no chance of conflict.
On this particular board the it87 driver would interfere with TZ, regardless of whether asus_atk0110 is loaded or not: better not load it.
Charles, the BIOS supports Q-FAN; in the DSDT I don't see the profiles, but a "Q-Fan Ratio". Check the manual (and the BIOS itself).

Exact, you were right. I don't know how I missed this one and then try to use fancontrol...
Anyway, it solved my problems, and I learned a few things thanks to you all. So thank you very much for your help Clemens, Jean and Luca. (btw I disabled the it87 module)

Quoted 3 lines

Luca

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors