Ticket #2368 (closed enhancement: fixed)

Opened 6 years ago

Last modified 5 years ago

Module loading order is unstable

Reported by: khali Owned by: khali
Priority: major Milestone: 3.1.0
Component: interface Version:
Keywords: Cc:

Description

With some hwmon drivers auto-loading, the order of the hwmon class devices is different when starting the lm_sensors service at boot and when restarting it later. While libsensors-based applications do not care, applications which access the hwmon class devices directly such as fancontrol are adversely affected.

See the discussion at:  http://lists.lm-sensors.org/pipermail/lm-sensors/2009-January/025197.html

Proposed solution:

  1. Make sure sensors-detect stops the lm_sensors service before scanning the system.
  2. Exclude the already loaded hwmon drivers from the list of drivers recommended by sensors-detect.

This will not fix systems already affected by the system, but will prevent more systems from being affected in the future.

Change History

Changed 6 years ago by khali

An alternative approach proposed by Volker Kuhlmann would be to unload all the hwmon drivers before reloading them when starting the lm_sensors service. This approach has the advantage that it doesn't depend on the initial state of the system. However it incurs a minor performance penalty, and might have unexpected side effects.

Changed 6 years ago by khali

Kay Sievers suggests that we can use the modalias files in sysfs together with "modprobe -n" to figure out whether a given hwmon driver was auto-loaded or not. This is much more robust than my initial proposal of relying on the initial system state to make the decision.

Changed 5 years ago by khali

  • owner changed from somebody to khali
  • status changed from new to assigned

Changed 5 years ago by khali

  • status changed from assigned to closed
  • resolution set to fixed

Hopefully addressed by r5635.

Note: See TracTickets for help on using tickets.