[ltp] thinkpad hwmon device switch randomly every reboot

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Sat, 25 Sep 2010 00:28:43 -0300

On Sat, 25 Sep 2010, Yonggang Guo wrote:
> The fancontrol script use configure file: /etc/fancontrol, which use hwmon1
> to control the fan.

It is broken, then.

> But the thinkpad_hwmon switch randomly between hwmon0 and hwmon1 after
> reboot.

Yes.  hwmon device numbering is first-come, first-served.

> How to set the thinkpad_hwmon to a fix position? Thanks!

You cannot.  If anything loads before it, or wins a race to see who
registers a hwmon device first, it will change position.

The fix is to teach fancontrol to locate the device it needs like
libsensors does.  If it can already do that, you should configure it
accordingly (I don't use it, so I can't say).

Meanwhile, use a more stable path (/sys/devices/platform/...) as a

  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh