You are not logged in.

#1 2009-09-12 14:23:57

Wilco
Member
Registered: 2008-11-09
Posts: 440

hwmon[0-3] not persistent, changes after reboot

I have a problem with conky, which refuses to start because it can't find my hwmon sensors.

ls /sys/class/hwmon/ -al
total 0
drwxr-xr-x  2 root root 0 2009-09-12 15:48 .
drwxr-xr-x 37 root root 0 2009-09-12 15:48 ..
lrwxrwxrwx  1 root root 0 2009-09-12 15:50 hwmon0 -> ../../devices/LNXSYSTM:00/device:00/PNP0A08:00/device:03/ATK0110:00/hwmon/hwmon0
lrwxrwxrwx  1 root root 0 2009-09-12 16:08 hwmon1 -> ../../devices/platform/coretemp.0/hwmon/hwmon1
lrwxrwxrwx  1 root root 0 2009-09-12 16:08 hwmon2 -> ../../devices/platform/coretemp.1/hwmon/hwmon2
lrwxrwxrwx  1 root root 0 2009-09-12 15:50 hwmon3 -> ../../devices/platform/w83627ehf.656/hwmon/hwmon3

These symlinks seem to change after each reboot. So when I refer to hwmon3 sensor 2, this sensor might suddenly point to coretemp.0 instead of w83627ehf.656.

Is there any way to make hwmon[0-3] always point to the same sensor? Thanks.

Offline

#2 2009-09-15 21:08:34

Beini
Member
From: Finland
Registered: 2007-06-06
Posts: 78

Re: hwmon[0-3] not persistent, changes after reboot

I'm having the same problem, and I think writing udev rules for them is the solution(?)

I haven't had any luck yet, though hmm

EDIT: SOLVED for me. Ran 'sensors-detect' and that created /etc/conf.d/lm_sensors. That seems to keep them persistent roll

Last edited by Beini (2009-09-15 21:34:58)


archlinux x86_64 user || My PKGBUILDs

Offline

#3 2009-10-07 19:57:48

Wilco
Member
Registered: 2008-11-09
Posts: 440

Re: hwmon[0-3] not persistent, changes after reboot

Still doesn't work for me, BUMP!

Offline

#4 2009-10-08 03:18:27

foolosophy
Member
Registered: 2009-04-17
Posts: 48

Re: hwmon[0-3] not persistent, changes after reboot

I've been having the same problem for a while. I think that I have just fixed it.

Steps:
1st: do a "sensors-detect" to figure out which kernel modules you need for your sensors.
2nd: Blacklist those in /etc/rc.conf by adding a "!" (bang) before their name in the MODULES array.
3rd: Manually edit /etc/conf.d/lm_sensors to load the appropriate modules in order (MODULE_0= etc)
4th: Reboot.
5th: pwmconfig.

Fancontrol should be working now fine on every reboot. I've just done this, so maybe it's not the way to do it. But I thought I could share my experience.

Offline

#5 2009-10-08 03:19:59

foolosophy
Member
Registered: 2009-04-17
Posts: 48

Re: hwmon[0-3] not persistent, changes after reboot

Steps 2 and 3 could be accomplished by simply listing the sensors modules in order in the MODULES array, since it loads them in order. I like it this way better, though. I just feel it's cleaner. Do as you please.

Offline

#6 2009-10-15 17:55:51

Wilco
Member
Registered: 2008-11-09
Posts: 440

Re: hwmon[0-3] not persistent, changes after reboot

Found a better solution. It's also possible to use the $platform variable instead of the hwmon variable. That way you can specify a name of the sensor:

${platform coretemp.0 temp 1}

This always works smile

Offline

#7 2009-10-15 17:59:17

foolosophy
Member
Registered: 2009-04-17
Posts: 48

Re: hwmon[0-3] not persistent, changes after reboot

Wilco wrote:

Found a better solution. It's also possible to use the $platform variable instead of the hwmon variable. That way you can specify a name of the sensor:

${platform coretemp.0 temp 1}

This always works smile

Could you explain with more detail? I didn't understand.

Offline

#8 2009-10-15 19:46:07

Wilco
Member
Registered: 2008-11-09
Posts: 440

Re: hwmon[0-3] not persistent, changes after reboot

coretemp.0 is the name of a directory in /sys/bus/platform/devices/
temp = show the temperature
1 = sensor number inside the directory coretemp.0

ls /sys/bus/platform/devices/

Lists all the sensors you can use. For example, if you want to use coretemp.0, you add the following to .conkyrc:
${platform coretemp.0 temp 1}

So if you use:

${platform coretemp.0 temp 1}

Conky will show the value of:

/sys/bus/platform/devices/coretemp.0/temp1_input

Offline

#9 2019-10-29 19:22:02

feixm
Member
Registered: 2019-10-29
Posts: 2

Re: hwmon[0-3] not persistent, changes after reboot

In fact, even more stable way to solve this with Conky is to use:

${hwmon coretemp temp 1}°C

Offline

#10 2019-10-29 19:28:40

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: hwmon[0-3] not persistent, changes after reboot

Please do not necrobump.

Closing.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB