* Re: [lm-sensors] [w83627ehf] Not all fans are shown (#3)
@ 2012-01-27 14:51 Guenter Roeck
2012-01-27 17:49 ` CC
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: Guenter Roeck @ 2012-01-27 14:51 UTC (permalink / raw)
To: lm-sensors
Forwarging to lm-sensors to keep the group in the loop.
On Fri, Jan 27, 2012 at 08:06:10AM -0500, ccom wrote:
> The testing branch resolves the issue.
>
> Thanks for fixing and maintaining the drivers, CC
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/groeck/w83627ehf/issues/3#issuecomment-3686328
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [lm-sensors] [w83627ehf] Not all fans are shown (#3)
2012-01-27 14:51 [lm-sensors] [w83627ehf] Not all fans are shown (#3) Guenter Roeck
@ 2012-01-27 17:49 ` CC
2012-01-27 22:41 ` Guenter Roeck
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: CC @ 2012-01-27 17:49 UTC (permalink / raw)
To: lm-sensors
On Fri, Jan 27, 2012 at 6:34 PM, CC <ccomren@gmail.com> wrote:
> On Fri, Jan 27, 2012 at 5:54 PM, CC <ccomren@gmail.com> wrote:
>> On Fri, Jan 27, 2012 at 3:54 PM, Guenter Roeck
>> <guenter.roeck@ericsson.com> wrote:
>>> Forwarding to lm-sensors to keep the group in the loop.
>>>
>>> ----- Forwarded message from ccom <reply+i-2970830-11e203ec4162e4680a3e2c999f2bba9b513a1927-1030448@reply.github.com> -----
>>>
>>> Date: Fri, 27 Jan 2012 09:29:45 -0500
>>> From: ccom <reply+i-2970830-11e203ec4162e4680a3e2c999f2bba9b513a1927-1030448@reply.github.com>
>>> To: Guenter Roeck <guenter.roeck@ericsson.com>
>>> Subject: Re: [w83627ehf] Not all fans are shown (#3)
>>>
>>> Note that I adapted /etc/sensors3.conf. The output is:
>>>
>>> nct6776-isa-0290
>>> Adapter: ISA adapter
>>> VCore: +0.76 V (min = +0.00 V, max = +1.74 V)
>>> +12V: +12.36 V (min = +0.00 V, max = +0.00 V) ALARM
>>> AVCC: +3.38 V (min = +0.00 V, max = +0.00 V) ALARM
>>> +3.3V: +3.36 V (min = +0.00 V, max = +0.00 V) ALARM
>>> in4: +0.02 V (min = +0.00 V, max = +0.00 V) ALARM
>>> +5V: +5.04 V (min = +0.00 V, max = +0.00 V) ALARM
>>> 3VSB: +3.46 V (min = +0.00 V, max = +0.00 V) ALARM
>>> VBat: +3.30 V (min = +0.00 V, max = +0.00 V) ALARM
>>> fan1: 0 RPM (min = 0 RPM) ALARM
>>> fan2: 570 RPM (min = 0 RPM) ALARM
>>> fan3: 0 RPM (min = 0 RPM) ALARM
>>> fan4: 1867 RPM (min = 0 RPM) ALARM
>>> fan5: 0 RPM (min = 0 RPM) ALARM
>>> SYSTIN: +35.0°C (high = +0.0°C, hyst = +0.0°C) ALARM sensor = thermistor
>>> CPUTIN: +33.0°C (high = +80.0°C, hyst = +75.0°C) sensor = thermistor
>>> AUXTIN: +35.5°C (high = +80.0°C, hyst = +75.0°C) sensor = thermistor
>>> PECI Agent 0: +36.0°C
>>> cpu0_vid: +2.050 V
>>> intrusion0: ALARM
>>> intrusion1: ALARM
>>>
>>> There's one more thing missing, though. I cannot find a way to set the fan speed in the sys-dir.
>>>
>>> ---
>>>
>>> You might also want to set min-max values to get rid of the warnings. Fan speeds are set through pwm[1-3].
>>> Did you try to set those ? Chances are that one controls fan2 and another fan4; there does not
>>> have to be a direct mapping.
>>>
>>> Thanks,
>>> Guenter
>>
>> Oh, I forgot to start the daemon since trying out the patch. I did set
>> the min and max values.
>>
>> The correct mapping (triple-checked with the BIOS) for the AsRock Z68
>> Pro3-M mainboard, and quite possibly for others -- the +12V
>> calculation is done as an example in the manual of the chip -- is
>> given by
>>
>> label in1 "+12V"
>> compute in1 @*6.6,@/6.6
>>
>> label in5 "+5V"
>> compute in5 @*3,@/3
>>
>> Best, CC
>
> I tested all three fan outputs. Another thing is weird: pwm1_mode has
> its meaning reversed (it's a 3-pin connector and the value 1 is DC
> mode, in contrast to pwm2 and the documentation).
>
> fan1 is controlled by pwm1, which is labelled as CHA_FAN (3-pin connector)
> fan2 is controlled by pwm2, which is labelled as CPU_FAN (4-pin connector)
> fan3 does not exist
> fan4 is not yet controlled, but is labelled PWR_FAN (3-pin connector)
> fan5 does not exist
>
> Best, CC
I tested against the BIOS; it cannot control fan4 either. Then I
noticed that I have a fourth fan connector, which the BIOS actually
can control and the driver can, too.
The updated info for the mainboard AsRock Z68 Pro3-M:
label in1 "+12V"
compute in1 @*6.6,@/6.6
set in1_min 12*0.9
set in1_max 12*1.1
label in5 "+5V"
compute in5 @*3,@/3
set in5_min 5*0.9
set in5_max 5*1.1
labal fan1 "CHA_FAN1"
label fan2 "CPU_FAN"
label fan3 "CHA_FAN2"
label fan4 "PWR_FAN"
The mapping is fan1<>pwm1, fan2<>pwm2, fan3<>pwm3. The meaning of
pmw[1,3]_mode is reversed.
It's a bit weird that the chip apparently supports the control of four
fans, but AsRock didn't connect it to it (according to the BIOS). But
I guess everything is working now.
Thanks, CC
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [lm-sensors] [w83627ehf] Not all fans are shown (#3)
2012-01-27 14:51 [lm-sensors] [w83627ehf] Not all fans are shown (#3) Guenter Roeck
2012-01-27 17:49 ` CC
@ 2012-01-27 22:41 ` Guenter Roeck
2012-01-27 23:52 ` CC
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2012-01-27 22:41 UTC (permalink / raw)
To: lm-sensors
Hi,
On Fri, Jan 27, 2012 at 12:49:48PM -0500, CC wrote:
[ ... ]
> >
> > I tested all three fan outputs. Another thing is weird: pwm1_mode has
> > its meaning reversed (it's a 3-pin connector and the value 1 is DC
> > mode, in contrast to pwm2 and the documentation).
> >
You lost me there. pwm1 supports both DC and PWM. pwm1_mode should return 0 for DC mode,
1 for pwm mode. The other pwm channels only support pwm mode on the NCT6776F, thus
pwm2_mode and pwm3_mode should both return 1.
Are you saying that reading pwm1_mode returns 1, and pwm2_mode and pwm3_mode
both return 0 ?
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [lm-sensors] [w83627ehf] Not all fans are shown (#3)
2012-01-27 14:51 [lm-sensors] [w83627ehf] Not all fans are shown (#3) Guenter Roeck
2012-01-27 17:49 ` CC
2012-01-27 22:41 ` Guenter Roeck
@ 2012-01-27 23:52 ` CC
2012-01-28 1:26 ` Guenter Roeck
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: CC @ 2012-01-27 23:52 UTC (permalink / raw)
To: lm-sensors
On Fri, Jan 27, 2012 at 11:41 PM, Guenter Roeck
<guenter.roeck@ericsson.com> wrote:
> Hi,
>
> On Fri, Jan 27, 2012 at 12:49:48PM -0500, CC wrote:
> [ ... ]
>> >
>> > I tested all three fan outputs. Another thing is weird: pwm1_mode has
>> > its meaning reversed (it's a 3-pin connector and the value 1 is DC
>> > mode, in contrast to pwm2 and the documentation).
>> >
> You lost me there. pwm1 supports both DC and PWM. pwm1_mode should return 0 for DC mode,
> 1 for pwm mode. The other pwm channels only support pwm mode on the NCT6776F, thus
> pwm2_mode and pwm3_mode should both return 1.
>
> Are you saying that reading pwm1_mode returns 1, and pwm2_mode and pwm3_mode
> both return 0 ?
>
> Thanks,
> Guenter
Maybe my reasoning is wrong...
We have that
* fan1 is linked to pwm1
* fan2 is linked to pwm2
* fan4 can only be monitored
* fan5 is linked to pwm3
Only fan2 has a 4-pin connector and could thus be controlled by PWM,
the others can only be controlled by voltage. Let's assume all fans to
be in manual mode.
* regardless of pwm1, fan1 runs at full speed when pwm1_mode returns 0
* the fan's speed can be controlled by pwm1 when pwm1_mode returns 1
So DC mode is only (correctly) activated when pwm1_mode returns 1.
* fan2 stops when pwm2 returns 0 and pwm2_mode also returns 0
* fan2 runs slowly when pwm2 returns 0 and pwm2_mode returns 1
I interpret this as DC mode being used when pwm2_mode returns 0.
* regardless of pwm3, fan5 runs at full speed whenever pwm3_mode returns 0
* the fan's speed can be controlled when pwm1_mode returns 1
So DC mode is only (correctly) activated when pwm3_mode returns 1.
Regards, CC
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [lm-sensors] [w83627ehf] Not all fans are shown (#3)
2012-01-27 14:51 [lm-sensors] [w83627ehf] Not all fans are shown (#3) Guenter Roeck
` (2 preceding siblings ...)
2012-01-27 23:52 ` CC
@ 2012-01-28 1:26 ` Guenter Roeck
2012-01-28 8:41 ` Jean Delvare
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2012-01-28 1:26 UTC (permalink / raw)
To: lm-sensors
On Fri, Jan 27, 2012 at 06:52:17PM -0500, CC wrote:
> On Fri, Jan 27, 2012 at 11:41 PM, Guenter Roeck
> <guenter.roeck@ericsson.com> wrote:
> > Hi,
> >
> > On Fri, Jan 27, 2012 at 12:49:48PM -0500, CC wrote:
> > [ ... ]
> >> >
> >> > I tested all three fan outputs. Another thing is weird: pwm1_mode has
> >> > its meaning reversed (it's a 3-pin connector and the value 1 is DC
> >> > mode, in contrast to pwm2 and the documentation).
> >> >
> > You lost me there. pwm1 supports both DC and PWM. pwm1_mode should return 0 for DC mode,
> > 1 for pwm mode. The other pwm channels only support pwm mode on the NCT6776F, thus
> > pwm2_mode and pwm3_mode should both return 1.
> >
> > Are you saying that reading pwm1_mode returns 1, and pwm2_mode and pwm3_mode
> > both return 0 ?
> >
> > Thanks,
> > Guenter
>
> Maybe my reasoning is wrong...
>
> We have that
>
> * fan1 is linked to pwm1
> * fan2 is linked to pwm2
> * fan4 can only be monitored
> * fan5 is linked to pwm3
>
> Only fan2 has a 4-pin connector and could thus be controlled by PWM,
> the others can only be controlled by voltage. Let's assume all fans to
> be in manual mode.
>
> * regardless of pwm1, fan1 runs at full speed when pwm1_mode returns 0
> * the fan's speed can be controlled by pwm1 when pwm1_mode returns 1
>
> So DC mode is only (correctly) activated when pwm1_mode returns 1.
>
> * fan2 stops when pwm2 returns 0 and pwm2_mode also returns 0
> * fan2 runs slowly when pwm2 returns 0 and pwm2_mode returns 1
>
> I interpret this as DC mode being used when pwm2_mode returns 0.
>
> * regardless of pwm3, fan5 runs at full speed whenever pwm3_mode returns 0
> * the fan's speed can be controlled when pwm1_mode returns 1
>
> So DC mode is only (correctly) activated when pwm3_mode returns 1.
>
On pwm2 and pwm3, the chip doesn't even support DC mode (per datasheet).
So setting those to 0 is, at best, undefined, and should not yield any results.
I guess the "bug" here is that pwm2_mode and pwm3_mode are writable for the NCT6776F.
We should really reject setting DC mode for those attributes.
Regarding pwm1_mode, maybe the board plays with the pwm output and converts
it to a voltage - really hard to say. Question really is - what are the powerup
settings ? Presumably those should be correct.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [lm-sensors] [w83627ehf] Not all fans are shown (#3)
2012-01-27 14:51 [lm-sensors] [w83627ehf] Not all fans are shown (#3) Guenter Roeck
` (3 preceding siblings ...)
2012-01-28 1:26 ` Guenter Roeck
@ 2012-01-28 8:41 ` Jean Delvare
2012-01-28 12:08 ` CC
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Jean Delvare @ 2012-01-28 8:41 UTC (permalink / raw)
To: lm-sensors
On Sat, 28 Jan 2012 00:52:17 +0100, CC wrote:
> We have that
>
> * fan1 is linked to pwm1
> * fan2 is linked to pwm2
> * fan4 can only be monitored
> * fan5 is linked to pwm3
>
> Only fan2 has a 4-pin connector and could thus be controlled by PWM,
> the others can only be controlled by voltage.
This assumption is wrong. 3-pin fans can be controlled by PWM too. It
is frequent that CPU fan = 4 pins controlled with PWM and case fan =
3 pins controlled with DC but other combinations are possible too.
> Let's assume all fans to be in manual mode.
>
> * regardless of pwm1, fan1 runs at full speed when pwm1_mode returns 0
> * the fan's speed can be controlled by pwm1 when pwm1_mode returns 1
>
> So DC mode is only (correctly) activated when pwm1_mode returns 1.
>
> * fan2 stops when pwm2 returns 0 and pwm2_mode also returns 0
> * fan2 runs slowly when pwm2 returns 0 and pwm2_mode returns 1
>
> I interpret this as DC mode being used when pwm2_mode returns 0.
>
> * regardless of pwm3, fan5 runs at full speed whenever pwm3_mode returns 0
> * the fan's speed can be controlled when pwm1_mode returns 1
>
> So DC mode is only (correctly) activated when pwm3_mode returns 1.
You are not supposed to change pwm*_mode attribute values in the first
place. Your board should come up with the right settings from the BIOS.
In most cases the output pins of the chip aren't connected directly to
the fan headers, there is some electronics involved on the path which
only works as designed if you use the right output mode, so changing
the mode simply breaks fan control.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [lm-sensors] [w83627ehf] Not all fans are shown (#3)
2012-01-27 14:51 [lm-sensors] [w83627ehf] Not all fans are shown (#3) Guenter Roeck
` (4 preceding siblings ...)
2012-01-28 8:41 ` Jean Delvare
@ 2012-01-28 12:08 ` CC
2012-01-28 12:53 ` Jean Delvare
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: CC @ 2012-01-28 12:08 UTC (permalink / raw)
To: lm-sensors
On Sat, Jan 28, 2012 at 9:41 AM, Jean Delvare <khali@linux-fr.org> wrote:
> On Sat, 28 Jan 2012 00:52:17 +0100, CC wrote:
>> We have that
>>
>> * fan1 is linked to pwm1
>> * fan2 is linked to pwm2
>> * fan4 can only be monitored
>> * fan5 is linked to pwm3
>>
>> Only fan2 has a 4-pin connector and could thus be controlled by PWM,
>> the others can only be controlled by voltage.
>
> This assumption is wrong. 3-pin fans can be controlled by PWM too. It
> is frequent that CPU fan = 4 pins controlled with PWM and case fan =
> 3 pins controlled with DC but other combinations are possible too.
>
>> Let's assume all fans to be in manual mode.
>>
>> * regardless of pwm1, fan1 runs at full speed when pwm1_mode returns 0
>> * the fan's speed can be controlled by pwm1 when pwm1_mode returns 1
>>
>> So DC mode is only (correctly) activated when pwm1_mode returns 1.
>>
>> * fan2 stops when pwm2 returns 0 and pwm2_mode also returns 0
>> * fan2 runs slowly when pwm2 returns 0 and pwm2_mode returns 1
>>
>> I interpret this as DC mode being used when pwm2_mode returns 0.
>>
>> * regardless of pwm3, fan5 runs at full speed whenever pwm3_mode returns 0
>> * the fan's speed can be controlled when pwm1_mode returns 1
>>
>> So DC mode is only (correctly) activated when pwm3_mode returns 1.
>
> You are not supposed to change pwm*_mode attribute values in the first
> place. Your board should come up with the right settings from the BIOS.
> In most cases the output pins of the chip aren't connected directly to
> the fan headers, there is some electronics involved on the path which
> only works as designed if you use the right output mode, so changing
> the mode simply breaks fan control.
>
> --
> Jean Delvare
It's bad to provide a writable attribute and documentation if one
isn't supposed to ever change it... let me rewrite this after a cold
boot, where I didn't change any settings, where I use the exact same
fan, and where I employ pwmcontrol:
pwm1_mode returns 1. Between "PWM 255" and "PWM 75" the fan speed
correlation is very jagged, very non-linear.
pwm2_mode returns 1. Between "PWM 210" and "PWM 60" the fan speed
correlation is surprisingly close to linear.
pwm3_mode returns 1. Between "PWM 255" and "PWM 75" the fan speed
correlation is very jagged, very non-linear.
So the behavior is different, although pwm*_mode returns the same
value. Moreover:
* Three pin connectors have ground, +12V and a tachometer signal.
* Four pin connectors have ground, +12V, a tachometer signal and a PWM signal.
Therefore, only unusual systems can control an unsual 3-pin fan by
PWM. As per the standard,
http://www.formfactors.org/developer/specs/4_Wire_PWM_Spec.pdf, the
correlation between the fan speed and the PWM signal is supposed to be
linear between its min and max. I conclude that PWM mode is working
correctly for pwm2, and DC mode (the name is from the docs -- most
likely it's linear voltage regulation) is working correctly for pwm1
and pwm3.
So: I didn't change any settings, but it seems like the meaning of
pwm*_mode does not agree with the documentation.
Best, CC
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [lm-sensors] [w83627ehf] Not all fans are shown (#3)
2012-01-27 14:51 [lm-sensors] [w83627ehf] Not all fans are shown (#3) Guenter Roeck
` (5 preceding siblings ...)
2012-01-28 12:08 ` CC
@ 2012-01-28 12:53 ` Jean Delvare
2012-01-28 15:14 ` CC
2012-01-31 15:12 ` Jean Delvare
8 siblings, 0 replies; 10+ messages in thread
From: Jean Delvare @ 2012-01-28 12:53 UTC (permalink / raw)
To: lm-sensors
On Sat, 28 Jan 2012 13:08:14 +0100, CC wrote:
> It's bad to provide a writable attribute and documentation if one
> isn't supposed to ever change it...
With this reasoning we wouldn't make any attribute writable, as ideally
the BIOS would have set up everything properly in the first place. And
same would hold for a lot of other sysfs attributes.
I agree the limitations of changing the value of the pwm[1-*]_mode
attribute could be better documented.
> let me rewrite this after a cold
> boot, where I didn't change any settings, where I use the exact same
> fan, and where I employ pwmcontrol:
Using the same fan for 4-pin headers and 3-pin headers makes little
sense. If you used a 3-pin fan, it wouldn't be controllable when
connected to a 4-pin header. As your results below contradict this, I
get that you used a 4-pin fan, which means it was controlled
differently between 3-pin headers (control on the +12V pin) and 4-pin
headers (control on the tachometer). Beware that some 3-wire fans are
happy to be controlled by PWM on +12V, but most 4-wire fans are not, as
they are really designed for a separate control signal.
> pwm1_mode returns 1. Between "PWM 255" and "PWM 75" the fan speed
> correlation is very jagged, very non-linear.
> pwm2_mode returns 1. Between "PWM 210" and "PWM 60" the fan speed
> correlation is surprisingly close to linear.
> pwm3_mode returns 1. Between "PWM 255" and "PWM 75" the fan speed
> correlation is very jagged, very non-linear.
>
> So the behavior is different, although pwm*_mode returns the same
> value. Moreover:
Different behavior is explained by 4-pin vs. 3-pin headers, see above.
>
> * Three pin connectors have ground, +12V and a tachometer signal.
> * Four pin connectors have ground, +12V, a tachometer signal and a PWM signal.
>
> Therefore, only unusual systems can control an unsual 3-pin fan by
> PWM.
This is plain wrong, sorry. A lot of motherboards have been using 3-pin
fan headers and offered fan speed control using PWM between, say 2000
and 2008. Most monitoring chips did not even support DC mode before
2007 (with the notable exception of the W83627THF.) There's nothing
"unusual" about this.
Some 3-wire fans behave better under PWM, while others prefer DC.
Unfortunately you usually don't get to chose the method, the
motherboard maker decides for you, because the value at the output pin
generally needs to be transformed before it goes to the fan. For PWM,
the output is a logical 0/1 which is applied to +12V before reaching
the fan. For DC the output is an analog voltage but most controllers
can't output +12V, they'll output 2.5V max for example, and an external
amplifier is needed to actually drive the fan. That's why I said that
changing the mode generally doesn't work, unless the BIOS got it wrong
in the first place. Feeding an amplifier with a PWM signal won't get
you anywhere I'm afraid, just like modulating +12V based on another
voltage output may result in bad things. [1]
4-wire headers are a completely different story, as power and control
are on different pins and the control is really only a signal. I think
4-pin fans are always controlled by PWM, but if DC is ever possible on
such fans, then changing the chip settings would work, because no extra
circuitry on the board is needed, I think the output pin of the control
chip is routed directly to the fan.
> As per the standard,
> http://www.formfactors.org/developer/specs/4_Wire_PWM_Spec.pdf, the
> correlation between the fan speed and the PWM signal is supposed to be
> linear between its min and max.
That's my observation as well... for 4-wire fans and assuming proper
PWM frequency. For example:
http://khali.linux-fr.org/articles/sts100/STS100C_PWM_response__large.png
For 3-wire fans this is a completely different story, the response is
generally very non-linear at high frequencies, with 75% top duty cycles
controlling about nothing and only 20% of the range allowing for
control. Lower frequencies give better results but are often unpleasant
to the ears. For example:
http://khali.linux-fr.org/devel/lm-sensors/pwm_response_curves.png
> I conclude that PWM mode is working
> correctly for pwm2,
As expected, for a 4-pin header with a 4-pin fan.
> and DC mode (the name is from the docs -- most
> likely it's linear voltage regulation) is working correctly for pwm1
> and pwm3.
As far as I know DC stands for "direct current" and indeed means
voltage regulation.
But I fail to see how you come to this conclusion from the experiment
above. Your reports about pwm1 and pwm3 do match what I would expect
from PWM sent to a 3-wire fan (or 4-wire fan on a 3-pin header -
similar behavior.)
> So: I didn't change any settings, but it seems like the meaning of
> pwm*_mode does not agree with the documentation.
The only way to demonstrate this would be to measure the values at the
output pin. At this point I have no reason to believe that the values
reported by the w83627ehf driver are incorrect.
[1] Disclaimer: I am not an electronics guy, so take what I say with a
grain of salt. The electronics schematics I read over the years for
various boards and my experience make me believe I'm correct in what I
say here, but I could be wrong on specific details.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [lm-sensors] [w83627ehf] Not all fans are shown (#3)
2012-01-27 14:51 [lm-sensors] [w83627ehf] Not all fans are shown (#3) Guenter Roeck
` (6 preceding siblings ...)
2012-01-28 12:53 ` Jean Delvare
@ 2012-01-28 15:14 ` CC
2012-01-31 15:12 ` Jean Delvare
8 siblings, 0 replies; 10+ messages in thread
From: CC @ 2012-01-28 15:14 UTC (permalink / raw)
To: lm-sensors
On Sat, Jan 28, 2012 at 1:53 PM, Jean Delvare <khali@linux-fr.org> wrote:
> On Sat, 28 Jan 2012 13:08:14 +0100, CC wrote:
>> It's bad to provide a writable attribute and documentation if one
>> isn't supposed to ever change it...
>
> With this reasoning we wouldn't make any attribute writable, as ideally
> the BIOS would have set up everything properly in the first place. And
> same would hold for a lot of other sysfs attributes.
>
> I agree the limitations of changing the value of the pwm[1-*]_mode
> attribute could be better documented.
>
>> let me rewrite this after a cold
>> boot, where I didn't change any settings, where I use the exact same
>> fan, and where I employ pwmcontrol:
>
> Using the same fan for 4-pin headers and 3-pin headers makes little
> sense. If you used a 3-pin fan, it wouldn't be controllable when
> connected to a 4-pin header. As your results below contradict this, I
> get that you used a 4-pin fan, which means it was controlled
> differently between 3-pin headers (control on the +12V pin) and 4-pin
> headers (control on the tachometer). Beware that some 3-wire fans are
> happy to be controlled by PWM on +12V, but most 4-wire fans are not, as
> they are really designed for a separate control signal.
>
>> pwm1_mode returns 1. Between "PWM 255" and "PWM 75" the fan speed
>> correlation is very jagged, very non-linear.
>> pwm2_mode returns 1. Between "PWM 210" and "PWM 60" the fan speed
>> correlation is surprisingly close to linear.
>> pwm3_mode returns 1. Between "PWM 255" and "PWM 75" the fan speed
>> correlation is very jagged, very non-linear.
>>
>> So the behavior is different, although pwm*_mode returns the same
>> value. Moreover:
>
> Different behavior is explained by 4-pin vs. 3-pin headers, see above.
>
>>
>> * Three pin connectors have ground, +12V and a tachometer signal.
>> * Four pin connectors have ground, +12V, a tachometer signal and a PWM signal.
>>
>> Therefore, only unusual systems can control an unsual 3-pin fan by
>> PWM.
>
> This is plain wrong, sorry. A lot of motherboards have been using 3-pin
> fan headers and offered fan speed control using PWM between, say 2000
> and 2008. Most monitoring chips did not even support DC mode before
> 2007 (with the notable exception of the W83627THF.) There's nothing
> "unusual" about this.
>
> Some 3-wire fans behave better under PWM, while others prefer DC.
> Unfortunately you usually don't get to chose the method, the
> motherboard maker decides for you, because the value at the output pin
> generally needs to be transformed before it goes to the fan. For PWM,
> the output is a logical 0/1 which is applied to +12V before reaching
> the fan. For DC the output is an analog voltage but most controllers
> can't output +12V, they'll output 2.5V max for example, and an external
> amplifier is needed to actually drive the fan. That's why I said that
> changing the mode generally doesn't work, unless the BIOS got it wrong
> in the first place. Feeding an amplifier with a PWM signal won't get
> you anywhere I'm afraid, just like modulating +12V based on another
> voltage output may result in bad things. [1]
>
> 4-wire headers are a completely different story, as power and control
> are on different pins and the control is really only a signal. I think
> 4-pin fans are always controlled by PWM, but if DC is ever possible on
> such fans, then changing the chip settings would work, because no extra
> circuitry on the board is needed, I think the output pin of the control
> chip is routed directly to the fan.
>
>> As per the standard,
>> http://www.formfactors.org/developer/specs/4_Wire_PWM_Spec.pdf, the
>> correlation between the fan speed and the PWM signal is supposed to be
>> linear between its min and max.
>
> That's my observation as well... for 4-wire fans and assuming proper
> PWM frequency. For example:
> http://khali.linux-fr.org/articles/sts100/STS100C_PWM_response__large.png
>
> For 3-wire fans this is a completely different story, the response is
> generally very non-linear at high frequencies, with 75% top duty cycles
> controlling about nothing and only 20% of the range allowing for
> control. Lower frequencies give better results but are often unpleasant
> to the ears. For example:
> http://khali.linux-fr.org/devel/lm-sensors/pwm_response_curves.png
>
>> I conclude that PWM mode is working
>> correctly for pwm2,
>
> As expected, for a 4-pin header with a 4-pin fan.
>
>> and DC mode (the name is from the docs -- most
>> likely it's linear voltage regulation) is working correctly for pwm1
>> and pwm3.
>
> As far as I know DC stands for "direct current" and indeed means
> voltage regulation.
>
> But I fail to see how you come to this conclusion from the experiment
> above. Your reports about pwm1 and pwm3 do match what I would expect
> from PWM sent to a 3-wire fan (or 4-wire fan on a 3-pin header -
> similar behavior.)
>
>> So: I didn't change any settings, but it seems like the meaning of
>> pwm*_mode does not agree with the documentation.
>
> The only way to demonstrate this would be to measure the values at the
> output pin. At this point I have no reason to believe that the values
> reported by the w83627ehf driver are incorrect.
>
> [1] Disclaimer: I am not an electronics guy, so take what I say with a
> grain of salt. The electronics schematics I read over the years for
> various boards and my experience make me believe I'm correct in what I
> say here, but I could be wrong on specific details.
>
> --
> Jean Delvare
I wasn't aware that mainboard chips can and do modulate +12V by PWM
themself. So there's actually *three* methods/modes to drive a fan:
1) Voltage regulation ("DC")
2) PWM by modulating the +12V line
3) PWM by providing a control signal
In my previous statements, I did assume that "PWM" always means (3).
Maybe we could adapt the documentation to reflect the situation. I
guess it's a valid distinction, and you surely wouldn't want another
smart-ass guy complaining about it.
Best, CC
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [lm-sensors] [w83627ehf] Not all fans are shown (#3)
2012-01-27 14:51 [lm-sensors] [w83627ehf] Not all fans are shown (#3) Guenter Roeck
` (7 preceding siblings ...)
2012-01-28 15:14 ` CC
@ 2012-01-31 15:12 ` Jean Delvare
8 siblings, 0 replies; 10+ messages in thread
From: Jean Delvare @ 2012-01-31 15:12 UTC (permalink / raw)
To: lm-sensors
On Sat, 28 Jan 2012 16:14:35 +0100, CC wrote:
> I wasn't aware that mainboard chips can and do modulate +12V by PWM
> themself. So there's actually *three* methods/modes to drive a fan:
>
> 1) Voltage regulation ("DC")
> 2) PWM by modulating the +12V line
> 3) PWM by providing a control signal
>
> In my previous statements, I did assume that "PWM" always means (3).
> Maybe we could adapt the documentation to reflect the situation. I
> guess it's a valid distinction, and you surely wouldn't want another
> smart-ass guy complaining about it.
Adapt which documentation? I wasn't even aware that we documented this
somewhere in the first place.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-01-31 15:12 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-27 14:51 [lm-sensors] [w83627ehf] Not all fans are shown (#3) Guenter Roeck
2012-01-27 17:49 ` CC
2012-01-27 22:41 ` Guenter Roeck
2012-01-27 23:52 ` CC
2012-01-28 1:26 ` Guenter Roeck
2012-01-28 8:41 ` Jean Delvare
2012-01-28 12:08 ` CC
2012-01-28 12:53 ` Jean Delvare
2012-01-28 15:14 ` CC
2012-01-31 15:12 ` Jean Delvare
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.