All of lore.kernel.org
 help / color / mirror / Atom feed
* file name changes between reboots : /sys/class/hwmon/hwmon[0->1]/temp1_input
@ 2015-01-30 13:02 Toralf Förster
  2015-02-02  8:32 ` Clemens Ladisch
  0 siblings, 1 reply; 2+ messages in thread
From: Toralf Förster @ 2015-01-30 13:02 UTC (permalink / raw)
  To: Linux Kernel

I'm wondering where to blame a nagging issue with these file names :

t44 ~ # ls -l /sys/class/hwmon/hwmon?/temp?_input
-r--r--r-- 1 root root 4096 Jan 30 13:57 /sys/class/hwmon/hwmon1/temp1_input
-r--r--r-- 1 root root 4096 Jan 30 13:57 /sys/class/hwmon/hwmon2/temp1_input
-r--r--r-- 1 root root 4096 Jan 30 13:57 /sys/class/hwmon/hwmon2/temp2_input
-r--r--r-- 1 root root 4096 Jan 30 13:57 /sys/class/hwmon/hwmon2/temp3_input

It appears sometimes after a reboot / new minor stable kernel that the first file name is found in hwmon0 instead of hwmon1.
That's prevents me from adding that sensor file to the thinkfan.conf file b/c thinkfan refuses to start then.

This is a Lenove T440s with a a64 bit Gentoo Linux and 3.18.X-hardened kernel.

-- 
Toralf
pgp key: 7B1A 07F4 EC82 0F90 D4C2  8936 872A E508 0076 E94E


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: file name changes between reboots : /sys/class/hwmon/hwmon[0->1]/temp1_input
  2015-01-30 13:02 file name changes between reboots : /sys/class/hwmon/hwmon[0->1]/temp1_input Toralf Förster
@ 2015-02-02  8:32 ` Clemens Ladisch
  0 siblings, 0 replies; 2+ messages in thread
From: Clemens Ladisch @ 2015-02-02  8:32 UTC (permalink / raw)
  To: Toralf Förster, Linux Kernel

Toralf Förster wrote:
> I'm wondering where to blame a nagging issue with these file names :
>
> # ls -l /sys/class/hwmon/hwmon?/temp?_input
> -r--r--r-- 1 root root 4096 Jan 30 13:57 /sys/class/hwmon/hwmon1/temp1_input
> -r--r--r-- 1 root root 4096 Jan 30 13:57 /sys/class/hwmon/hwmon2/temp1_input
> -r--r--r-- 1 root root 4096 Jan 30 13:57 /sys/class/hwmon/hwmon2/temp2_input
> -r--r--r-- 1 root root 4096 Jan 30 13:57 /sys/class/hwmon/hwmon2/temp3_input
>
> It appears sometimes after a reboot / new minor stable kernel that the first file name is found in hwmon0 instead of hwmon1.

Those numbers get assigned in the order in which the drivers get
attached, which is essentially random.

You have to use the permanent device path, which isn't as easy.  Run
something like this to find it:

  find /sys -name 'temp*_input'


Regards,
Clemens

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-02  8:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-30 13:02 file name changes between reboots : /sys/class/hwmon/hwmon[0->1]/temp1_input Toralf Förster
2015-02-02  8:32 ` Clemens Ladisch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.