vmatare / thinkfan

The minimalist fan control program
GNU General Public License v3.0
534 stars 61 forks source link

Support globs in the `temp1_input` path in the config #227

Open tukusejssirs opened 1 year ago

tukusejssirs commented 1 year ago

I have recently discovered that /sys/class/hwmon/hwmon6/temp1_input was moved to /sys/class/hwmon/hwmon9/temp1_input after a reboot and thus thinkfan SystemD service failed. FYI /sys/class/hwmon/hwmon9/name contains coretemp. This change might be related to updating my firmware using fwupdmgr, but I am not sure.

I think it might be a good idea to support paths with globs (like /sys/class/hwmon/hwmon*/temp1_input and the program would check all available files that match that path.

fwinkl commented 7 months ago

This can already be achieved by doing the lookup via the sensor name and index:

sensors:
 - hwmon: /sys/class/hwmon
    name: coretemp
    indices: [1]

Note that the index [N] resolves to tempN_input.