* pwmconfig fix
2005-05-19 6:24 pwmconfig fix rutger
@ 2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Jean Delvare
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
> [little bug report + fix]
>
> On my Asus P4P800 motherboard with a w83627thf sensor chip, pwmconfig
> from lm_sensors-2.8.6 doesn't detect the pwm-files by default
> (2.6.6-rc3, module w83627hf).
> (...)
> As you can see the pwm files are called 'fan[1-9]_pwm'. Likewise for
> the fan inputs, which are called fan[1-9]_input.
>
> After changing this in pwmconfig to take those files into account,
> your script worked. Thanks.
I've changed that, hopefully in the proper way. Thanks for reporting.
Unfortunately I don't have pwm-capable system to test with here. Would
you please be kind enough and checkout the latest CVS version of the
script, and ensure it works OK?
Thanks again.
--
Jean Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 8+ messages in thread* pwmconfig fix
2005-05-19 6:24 pwmconfig fix rutger
2005-05-19 6:24 ` Jean Delvare
@ 2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` rutger
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
> > Care to test again? It should be better.
>
> Ok, doing better now. Output attached.
Great :)
> Found the following PWM controls:
> 1-0290/fan1_pwm
> 1-0290/fan2_pwm
> 1-0290/fan3_pwm
>
> Found the following fan sensors:
> 1-0290/fan1_input current speed: 0 ... skipping!
> 1-0290/fan2_input current speed: 2667 RPM
> 1-0290/fan3_input current speed: 0 ... skipping!
OK, so at least it finds the files. This is what the change was all
about.
> Testing pwm control 1-0290/fan1_pwm ...
> 1-0290/fan2_input ... speed was 2667 now 2700
> no correlation
>
> Testing pwm control 1-0290/fan2_pwm ...
> 1-0290/fan2_input ... speed was 2667 now 0
> It appears that fan 1-0290/fan2_input
> is controlled by pwm 1-0290/fan2_pwm
> Would you like to generate a detailed correlation (y)?
> Would you like to generate a graphical plot using gnuplot (y)?
> PWM 255 FAN 2689
> PWM 240 FAN 2689
> PWM 225 FAN 0
> Fan Stopped at PWM = 225
> Hit return to continue...
>
> Testing pwm control 1-0290/fan3_pwm ...
> 1-0290/fan2_input ... speed was 2667 now 2667
> no correlation
>
> The problem is fan2_pwm, where only 3 samples are taken. This is not
> enough in this case.
Most likely because you have a low fan divisor. Try increasing it and
try again. You need a high divisor to be able to measure low speed fans,
and lowering PWM lowers fan speed.
Maybe the script could take care of this?
> Bug in script:
> Line 242:
> if [ "$S" = "0" -o "S" = "-1" ]
> Shouldn't "S" be "$S" ?
Correct, nice catching. I've fixed it, thanks.
> Problems:
> - at pwm 240, the fan speed reported in 0 while I still hear it
> turning.
Same reason: fan divisor must be too low.
> - at pwm 200, is goes even faster than at 255, and it
> reports 3139 as rpm(!).
Admittedly strange. Possibly some emergency mode of the chip. I don't
know about the W83627HF, but I know similar chips with that
functionality. On alert conditions (overtemperature...) manual PWM is
disabled and fans are forced to full speed.
> It appears the speed is also depending on the speed from which it
> came. Doing
> echo 255 >fan2_pwm; sleep 2; echo 200 >fan2_pwm
> will give me +-3100, while doing
> echo 0 >fan2_pwm; sleep 2; echo 200 >fan2_pwm
> will give me 0. Strange...
No wonder to me. Fans have inertia, it's natural that the "original"
speeds has an influence.
> Where do I report such strange interaction?
Doesn't sound that strange to me. That said, I think that Marius is the
most qualified of us all with PWM issues, so he's the one you want to
address your questions to, if there's really a problem.
Thanks.
--
Jean Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 8+ messages in thread* pwmconfig fix
2005-05-19 6:24 pwmconfig fix rutger
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Jean Delvare
@ 2005-05-19 6:24 ` rutger
2005-05-19 6:24 ` rutger
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rutger @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
On Sat, May 08, 2004 at 09:39:03PM +0200, Jean Delvare wrote:
> > Latest version of lm_sensors2? I did a fresh checkout of lm_sensors2
> > which didn't solve anything (cvs -d
> > :pserver:anon@cvs.lm-sensors.nu:/home/cvs checkout lm_sensors2).
>
> Hm, that's bad :(
>
> That said, I just realized that I fixed only pwmconfig, while fancontrol
> needed a change too. Just changed that. And I had missed some changes in
> pwmconfig as well. I should really have been more careful, sorry.
>
> Care to test again? It should be better.
Ok, doing better now. Output attached.
Found the following PWM controls:
1-0290/fan1_pwm
1-0290/fan2_pwm
1-0290/fan3_pwm
Found the following fan sensors:
1-0290/fan1_input current speed: 0 ... skipping!
1-0290/fan2_input current speed: 2667 RPM
1-0290/fan3_input current speed: 0 ... skipping!
Testing pwm control 1-0290/fan1_pwm ...
1-0290/fan2_input ... speed was 2667 now 2700
no correlation
Testing pwm control 1-0290/fan2_pwm ...
1-0290/fan2_input ... speed was 2667 now 0
It appears that fan 1-0290/fan2_input
is controlled by pwm 1-0290/fan2_pwm
Would you like to generate a detailed correlation (y)?
Would you like to generate a graphical plot using gnuplot (y)?
PWM 255 FAN 2689
PWM 240 FAN 2689
PWM 225 FAN 0
Fan Stopped at PWM = 225
Hit return to continue...
Testing pwm control 1-0290/fan3_pwm ...
1-0290/fan2_input ... speed was 2667 now 2667
no correlation
The problem is fan2_pwm, where only 3 samples are taken. This is not enough in this case.
Bug in script:
Line 242:
if [ "$S" = "0" -o "S" = "-1" ]
Shouldn't "S" be "$S" ?
pwmconfig delivers quite a dull gnuplot, but I do not understand the
relation between the _pwm value and the fan speed myself.
Problems:
- at pwm 240, the fan speed reported in 0 while I still hear it turning.
- at pwm 200, is goes even faster than at 255, and it reports 3139 as rpm(!).
It appears the speed is also depending on the speed from which it came. Doing
echo 255 >fan2_pwm; sleep 2; echo 200 >fan2_pwm
will give me +-3100, while doing
echo 0 >fan2_pwm; sleep 2; echo 200 >fan2_pwm
will give me 0. Strange...
Where do I report such strange interaction?
--
Rutger Nijlunsing ---------------------------- rutger ed tux tmfweb nl
never attribute to a conspiracy which can be explained by incompetence
----------------------------------------------------------------------
^ permalink raw reply [flat|nested] 8+ messages in thread* pwmconfig fix
2005-05-19 6:24 pwmconfig fix rutger
` (2 preceding siblings ...)
2005-05-19 6:24 ` rutger
@ 2005-05-19 6:24 ` rutger
2005-05-19 6:24 ` Jean Delvare
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rutger @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
On Sun, May 09, 2004 at 07:23:31PM +0200, Jean Delvare wrote:
> > The problem is fan2_pwm, where only 3 samples are taken. This is not
> > enough in this case.
>
> Most likely because you have a low fan divisor. Try increasing it and
> try again. You need a high divisor to be able to measure low speed fans,
> and lowering PWM lowers fan speed.
Ok, fan_divisor set to 64 and reran pwmconfig. I get a better curve now:
PWM 255 FAN 2636
PWM 240 FAN 3013
PWM 225 FAN 2343
PWM 210 FAN 2343
PWM 195 FAN 2109
PWM 180 FAN 1917
PWM 165 FAN 1622
PWM 150 FAN 1406
PWM 135 FAN 1917
PWM 120 FAN 1506
PWM 105 FAN 1406
PWM 90 FAN 1240
PWM 75 FAN 0
> Maybe the script could take care of this?
Why not take the highest working divisor? You can check this I think
by re-reading the fan*_div after echoing a new value. At least, that's
what I did...
> > - at pwm 200, is goes even faster than at 255, and it
> > reports 3139 as rpm(!).
>
> Admittedly strange. Possibly some emergency mode of the chip. I don't
> know about the W83627HF, but I know similar chips with that
> functionality. On alert conditions (overtemperature...) manual PWM is
> disabled and fans are forced to full speed.
No, it's not the full speed. Some combinations entered manual give
even higher values: I can get to 3500rpm.
>
> > It appears the speed is also depending on the speed from which it
> > came. Doing
> > echo 255 >fan2_pwm; sleep 2; echo 200 >fan2_pwm
> > will give me +-3100, while doing
> > echo 0 >fan2_pwm; sleep 2; echo 200 >fan2_pwm
> > will give me 0. Strange...
>
> No wonder to me. Fans have inertia, it's natural that the "original"
> speeds has an influence.
No, I monitor the RPMs with
while true; do cat fan2_input; sleep 2; done
Now I echo values in another xterm, and I see the fan stabilizing to
different values depending on the sequence of value which I echo-d. So
there is some kind of state somewhere.
So, in short:
echo 0 >fan2_pwm; sleep 5; echo 199 >fan2_pwm; sleep 5; cat fan2_input
..gives values 1917 and 2109 repeatedly.
echo 255 >fan2_pwm; sleep 5; echo 199 >fan2_pwm; sleep 5; cat fan2_input
..gives values 3013 and 3515 repeatedly. The fan also sounds 'faster'.
I can get to 4218rpm, which is very noisy..
> > Where do I report such strange interaction?
>
> Doesn't sound that strange to me. That said, I think that Marius is the
> most qualified of us all with PWM issues, so he's the one you want to
> address your questions to, if there's really a problem.
Ok, Marius left in the header...
Regards,
Rutger.
--
Rutger Nijlunsing ---------------------------- rutger ed tux tmfweb nl
never attribute to a conspiracy which can be explained by incompetence
----------------------------------------------------------------------
^ permalink raw reply [flat|nested] 8+ messages in thread* pwmconfig fix
2005-05-19 6:24 pwmconfig fix rutger
` (3 preceding siblings ...)
2005-05-19 6:24 ` rutger
@ 2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` rutger
6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
> Why not take the highest working divisor? You can check this I think
> by re-reading the fan*_div after echoing a new value. At least, that's
> what I did...
Because a higher divisor means a poor accuracy at higher speeds. The
divisor is really a range vs. accuracy tradeoff. Read doc/fan-divisor
for details, or doc/chips/pc87366 (in CVS).
> No, it's not the full speed. Some combinations entered manual give
> even higher values: I can get to 3500rpm.
> (...)
> Now I echo values in another xterm, and I see the fan stabilizing to
> different values depending on the sequence of value which I echo-d. So
> there is some kind of state somewhere.
OK, that's strange ;)
PWM isn't as easy as it seems to be. The modulations are made on a base
frequency. Maybe you fan doesn't like this frequency and behaves
strangely because of that. Usually, drivers don't allow the user to
tweak the frequency, but most chips are able to change it. Read the
datasheet for your chip and try changing the value manually (using
isaset or i2cset), maybe it'll help.
--
Jean Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 8+ messages in thread* pwmconfig fix
2005-05-19 6:24 pwmconfig fix rutger
` (4 preceding siblings ...)
2005-05-19 6:24 ` Jean Delvare
@ 2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` rutger
6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
> Latest version of lm_sensors2? I did a fresh checkout of lm_sensors2
> which didn't solve anything (cvs -d
> :pserver:anon@cvs.lm-sensors.nu:/home/cvs checkout lm_sensors2).
Hm, that's bad :(
That said, I just realized that I fixed only pwmconfig, while fancontrol
needed a change too. Just changed that. And I had missed some changes in
pwmconfig as well. I should really have been more careful, sorry.
Care to test again? It should be better.
Thanks.
--
Jean Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 8+ messages in thread* pwmconfig fix
2005-05-19 6:24 pwmconfig fix rutger
` (5 preceding siblings ...)
2005-05-19 6:24 ` Jean Delvare
@ 2005-05-19 6:24 ` rutger
6 siblings, 0 replies; 8+ messages in thread
From: rutger @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
On Sat, May 08, 2004 at 01:32:19PM +0200, Jean Delvare wrote:
> > [little bug report + fix]
> >
> > On my Asus P4P800 motherboard with a w83627thf sensor chip, pwmconfig
> > from lm_sensors-2.8.6 doesn't detect the pwm-files by default
> > (2.6.6-rc3, module w83627hf).
> > (...)
> > As you can see the pwm files are called 'fan[1-9]_pwm'. Likewise for
> > the fan inputs, which are called fan[1-9]_input.
> >
> > After changing this in pwmconfig to take those files into account,
> > your script worked. Thanks.
>
> I've changed that, hopefully in the proper way. Thanks for reporting.
> Unfortunately I don't have pwm-capable system to test with here. Would
> you please be kind enough and checkout the latest CVS version of the
> script, and ensure it works OK?
>
> Thanks again.
Latest version of lm_sensors2? I did a fresh checkout of lm_sensors2
which didn't solve anything (cvs -d
:pserver:anon@cvs.lm-sensors.nu:/home/cvs checkout lm_sensors2).
--
Rutger Nijlunsing ---------------------------- rutger ed tux tmfweb nl
never attribute to a conspiracy which can be explained by incompetence
----------------------------------------------------------------------
^ permalink raw reply [flat|nested] 8+ messages in thread