Results 1 to 2 of 2

Thread: order of device sensors listed in hwmon changes every boot: how to force specific order?

  1. #1
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    518

    Default order of device sensors listed in hwmon changes every boot: how to force specific order?

    Hi,
    i am using conky to display some system/hardware stats on my screen. This includes the cpu and other temperatures. The problem is that conky access those information using hwmon and the order in which those information is presented in the /sys/class/hwmon/hwmon[0-3] sub directories depends on the load order of the corresponding modules during boot, which itself is basically random.

    I searched for a solution for a while and it seems the best way is to force a specific order by adding the respective modules in the modules array found in either /etc/conf.d or some other directory, i am not sure here because the solutions i found where mostly specific to arch linux or ubuntu and do not seem to work for opensuse.

    So my question is, how can i force a specific order of the temperature sensors found in the hwmon directories in opensuse tumbleweed?

  2. #2

    Default Re: order of device sensors listed in hwmon changes every boot: how to force specific order?

    Very late reply and not an answer to the specific question, but
    I solve it by using Conky's if_existing like so:
    Code:
    ${if_existing /sys/class/hwmon2/name coretemp}\
    CPU${hwmon 2 temp 1}°C
    C0 ${hwmon 2 temp 2}°C
    C1 ${hwmon 2 temp 3}°C\
    ${else}\
    CPU${hwmon 3 temp 1}°C
    C0 ${hwmon 3 temp 2}°C
    C1 ${hwmon 3 temp 3}°C\
    ${endif}
    "coretemp" in above is the string to look for in the file, it might differ depending on your system.
    You might have to expand the code to check for the string in hwmon0 and hwmon1 too. For me CPU is always either hwmon2 or hwmon3.
    One caveat: When starting Conky from terminal and coretemp is in hwmon3, conky shows warnings about not being able to open temp2_input and temp3_input for hwmon2 even those are inside the IF/ELSE and shouldn't be parsed in this case.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •