Svante Signell a écrit : > On Fri, 2008-01-04 at 11:07 +0100, Aurelien Jarno wrote: >> Svante Signell a écrit : >>> OK, I give up. In my opinion, then there are logic errors in some of the >>> the kernel modules :-( I assume that they are creating the /sys entries. >>> They should be changed, as well as the sensors.conf file, but who cares! >> They are correct. The modules in the kernel obey to the logic on the raw >> value: min < input < max. min corresponds to the min register in the >> chip. max corresponds to the max register in the chip. > > Then there are logic errors in the mainboard register values then! As a > matter of fact -12.05 is smaller than -11.95, whereas +11.95 is smaller > than +12.05!!
The sensors registers have no notion of positive or negative value. It reads one or more voltage usually between 0 and 5V, converts them to a raw value, usually between 0 and 255, and put them in the corresponding registers. The chip driver in the kernel usually converts this raw value into a voltage that corresponds to the voltage on the input pin and put it in /sys. The relation between the measured voltage and the voltage on the input pin of the sensors depends on the motherboard (and not on the chip). That's what the formula in /etc/sensors.conf describes. Now, a concrete example for an hypothetic chip/motherboard: -12.05V corresponds to 4.02V on the input pin and to 205 in the register. -11.95V corresponds to 3.98V on the input pin and to 203 in the register. There is no logic error 203 < 205. >> Then you can apply a formula to match the gain and the offset of the >> amplifiers/resistors on the motherboard. This formula can revert the >> order, and varies from motherboard to motherboard. If you change the >> order in the kernel, you will fix the order for your favorite >> motherboard, but break the order for the others. That's why it has been >> chosen to keep the order used by the chip. >> > I have been playing a little with the settings for sensors.conf for some > of the boards, and there seems to be some default settings (in mainboard > registers?) that can be overridden by sensors.conf, via sensors -s. If I > understand you correctly, all main boards have registers for report > nominal, min and max values for voltages, temperatures and fan speeds. Not all sensors have registers for min/max values but most of them. > If this is true, there is no need for a sensors.conf at all? I'm > puzzled, please explain, or maybe forward this question to upstream. > sensors.conf is need to convert the input voltage from the value in /sys into the measured voltage. Same for speed and temperatures. Also depending on the chip and mainboard, the default values are either values set by the bios, random values, or default values of the chip. That's why they are min and max values in sensors.conf. Finally this files maps the number of the input with a name so that you know for example that input1 corresponds to the +5V line. So in short sensors.conf is not strictly needed (lm-sensors 3 works without it), as long as you are satisfied with raw input voltages instead of real voltages, temperatures and fan speed, and as long as you don't want to determine if a fan speed (or temperature, or voltage) corresponds to the CPU or to the case. For example: it8718-isa-0290 Adapter: ISA adapter in0: +1.25 V (min = +0.00 V, max = +4.08 V) in1: +1.82 V (min = +0.00 V, max = +4.08 V) in2: +3.31 V (min = +0.00 V, max = +4.08 V) in3: +3.01 V (min = +0.00 V, max = +4.08 V) in4: +2.05 V (min = +0.00 V, max = +4.08 V) in5: +0.00 V (min = +0.00 V, max = +4.08 V) in6: +0.06 V (min = +0.00 V, max = +4.08 V) in7: +3.07 V (min = +0.00 V, max = +4.08 V) in8: +3.14 V fan1: 2235 RPM (min = 0 RPM) fan2: 0 RPM (min = 0 RPM) fan3: 0 RPM (min = 0 RPM) temp1: +40°C (low = +127°C, high = +127°C) sensor = thermistor temp2: +51°C (low = +127°C, high = +90°C) sensor = diode You can see that all voltages are all positive and between 0 and 5V. However they corresponds (in random order) to VCore 1, VCore 2, +3.3V, +5V, +12V, +3.3V Standby, -5V, -12V and VBat. -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' [EMAIL PROTECTED] | [EMAIL PROTECTED] `- people.debian.org/~aurel32 | www.aurel32.net -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

