Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-20 Thread Jean Delvare
Hi Nicolas,

> I confirm that 0x7f is full speed.

So at least the polarity bit is correct, and Gigabyte isn't to blame.

> > Once you know if the polarity is correct, you can try different
> > values of PWM between 0x00 and 0x7F and see how exactly your fan
> > reacts to them.
> 
> That's where things get really really interesting.  As mentioned
> above 0x7f drives the fan full speed (2596 RPM).  Now lowering that
> value slows the CPU fan gradually down to a certain point.  With a
> value of 0x3f the fan turns at 1041 RPM.  But below 0x3f the fan
> starts speeding up again to reach a peak of 2280 RPM with a value
> of 0x31, then it slows  down again toward 0 RPM as the register
> value is decreased down to 0.
> 
> Bit 3 of register 0x14, when set, only modifies the curve so the
> first minimum is instead reached at 0x30 then the peak occurs at 0x1d
> before dropping to 0.
> 
> Changing the PWM base clock select has no effect.

Wow! Unexpected, to say the least. First time I see such a behavior.

Could it be that your CPU fan isn't a simple passive device but one of
these high-tech models with an embedded thermal sensor and automatic
speed adjustment? This would possibly interact with the motherboard PWM
capability and could explain the strange speed curve your obtained.

I would also like you to try a similar test with your case fan. Enable
"smart guardian" mode for this one (by writing 0x73 to register 0x13),
then scan the 0x7f-0x00 range (register 0x16) like you did for your CPU
fan. I wonder if you will obtain the same kind of result or a standard
linear curve.

(Note that PWM2 might not be wired at all on your motherboard, so don't
be surprised if the case fan speed doesn't change at all.)

Thanks,
-- 
Jean Delvare
http://khali.linux-fr.org/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-20 Thread Nicolas Pitre
On Thu, 20 Jan 2005, Jean Delvare wrote:

> > In the mean time I'm willing to try out things
> > with isaset if you can suggest basic tests (easier than upgrading kernel
> > for the time being).
> 
> The best test I can think of is to switch your CPU fan to manual PWM
> mode. To do that, write 0x40 to register 0x15. CPU fan should go to half
> speed. Write 0x7F and if should go to full speed, except if the polarity
> is not correct in which case 0x00 will do (and 0x7F will stop the fan
> completely so you don't want to keep it that way).

I confirm that 0x7f is full speed.

> Once you know if the polarity is correct, you can try different values of
> PWM between 0x00 and 0x7F and see how exactly your fan reacts to them.

That's where things get really really interesting.  As mentioned above 
0x7f drives the fan full speed (2596 RPM).  Now lowering that value 
slows the CPU fan gradually down to a certain point.  With a value of 
0x3f the fan turns at 1041 RPM.  But below 0x3f the fan starts speeding 
up again to reach a peak of 2280 RPM with a value of 0x31, then it slows 
down again toward 0 RPM as the register value is decreased down to 0.

Bit 3 of register 0x14, when set, only modifies the curve so the first 
minimum is instead reached at 0x30 then the peak occurs at 0x1d before 
dropping to 0.

Changing the PWM base clock select has no effect.


Nicolas
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-20 Thread Jean Delvare

Hi Nicolas,

> It looks like only temp3 is used for the CPU temperature, fan1 is the
> CPU fan and fan2 the case fan.

This is coherent with your chip configuration.

> I experimented with isaset tweaking individual bits in register 0x14
> (blindly I confess, haven't read the datasheet) and flipping bit 3 from
> 0 to 1 (writing 0xdf) apparently reverses the behavior, i.e. the CPU fan
> speed now increases with the CPU temperature.

That's odd. This bit isn't supposed to significantly change the
behavior. When cleared (default), possible duty cycles range from 0 to
100%. When set, the possible duty cycles range from 20% to 100% (except
for PWM=0 which still results in a 0% duty cycle). I hardly understand
how setting this bit can result in the change you describe.

> In the mean time I'm willing to try out things
> with isaset if you can suggest basic tests (easier than upgrading kernel
> for the time being).

OK. Remember you better keep an eye on the CPU fan in case your tests
stop it. I would also suggest that you take a look at the datasheet so
that you better understand what you are doing:
http://www.iteusa.com/product_info/file/pc/IT8712F_V0.81.pdf
(page 79 of the document, which is 97 of the PDF file - don't ask)

The best test I can think of is to switch your CPU fan to manual PWM
mode. To do that, write 0x40 to register 0x15. CPU fan should go to half
speed. Write 0x7F and if should go to full speed, except if the polarity
is not correct in which case 0x00 will do (and 0x7F will stop the fan
completely so you don't want to keep it that way).

I suggest that you use the -y flag of isaset so that you can overwrite
register values quickly if things turn bad.

Once you know if the polarity is correct, you can try different values of
PWM between 0x00 and 0x7F and see how exactly your fan reacts to them.
You can also study more precisely how bit 3 of register 0x14 (the one
you played with already) affects the PWM vs speed curve.

Thanks,
--
Jean Delvare
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-20 Thread Nicolas Pitre
On Thu, 20 Jan 2005, Jean Delvare wrote:

> 
> Hi Nicolas,
> 
> > > I would also appreciate a dump of the chip (isadump 0x295 0x296 unless
> > > it lives at some uncommon address) to confirm the guess.
> >
> >  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
> > 00: 11 10 80 00 37 ff 00 37 ff 07 13 5b 00 51 40 ff
> > 10: fe fe ff 71 d7 fe 7f fe 00 00 ff ff ff ff ff ff
> 
> Interesting. Your chip does seem to be configured (i.e. pwm polarity is
> high), so whatever your problem is, it is probably different from what
> Simone experienced.
> 
> Your configuration is as follow:
> * PWM outputs active high.
> * PWM 2 and 3 in on/off mode, set to on.
> * PWM 1 in "smart guardian" mode, set to automatic PWM depending on
> temp3.

Sensible.

> I would like to know how temperature channels are used by your
> motherboard, and how fans are used as well. Which temperature and fan
> channels correspond to your CPU? What other temperature sensors and fans
> are present?

It looks like only temp3 is used for the CPU temperature, fan1 is the 
CPU fan and fan2 the case fan.

> The values dumped here make me believe that the PWM outputs were
> configured by the BIOS. Now maybe not the correct way, at least for you.

I experimented with isaset tweaking individual bits in register 0x14 
(blindly I confess, haven't read the datasheet) and flipping bit 3 from 
0 to 1 (writing 0xdf) apparently reverses the behavior, i.e. the CPU fan 
speed now increases with the CPU temperature.

> I would like you to give a try to a recent version of the it87 driver (as
> found in 2.6.11-rc1-bk7 or 2.6.11-rc1-mm2).

Will try to do soon.  In the mean time I'm willing to try out things 
with isaset if you can suggest basic tests (easier than upgrading kernel 
for the time being).


Nicolas
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-20 Thread Jean Delvare

Hi Nicolas,

> > I would also appreciate a dump of the chip (isadump 0x295 0x296 unless
> > it lives at some uncommon address) to confirm the guess.
>
>  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
> 00: 11 10 80 00 37 ff 00 37 ff 07 13 5b 00 51 40 ff
> 10: fe fe ff 71 d7 fe 7f fe 00 00 ff ff ff ff ff ff

Interesting. Your chip does seem to be configured (i.e. pwm polarity is
high), so whatever your problem is, it is probably different from what
Simone experienced.

Your configuration is as follow:
* PWM outputs active high.
* PWM 2 and 3 in on/off mode, set to on.
* PWM 1 in "smart guardian" mode, set to automatic PWM depending on
temp3.

I would like to know how temperature channels are used by your
motherboard, and how fans are used as well. Which temperature and fan
channels correspond to your CPU? What other temperature sensors and fans
are present?

The values dumped here make me believe that the PWM outputs were
configured by the BIOS. Now maybe not the correct way, at least for you.

> I guess the BIOS setting will simply be overwritten so changing the BIOS
> should not affect subsequent use, no?

Changing the BIOS configuration affects the initial register
configuration, from which the it87 driver decides whether using PWM or
reconfiguring the chip (changing polarity) is safe or not. This is why
it might help. With the dump you provided, we now know that the (new)
it87 driver will accept PWM operations even when your BIOS was left in
"smart guardian" mode.

I would like you to give a try to a recent version of the it87 driver (as
found in 2.6.11-rc1-bk7 or 2.6.11-rc1-mm2). This will let us know which
revision of the IT8712F you have (in case it matters), and will also let
you experiment with manual PWM.

If manual PWM works, then the problem is in the way temperature interacts
with PWM in automatic mode.

If manual PWM works the wrong way around (like it did for Simone) then it
is a polarity issue (after all, maybe *you* need active low).

If manual PWM half works (fan speed changes but not as much as it should)
it might be a problem of picking the correct base frequency for PWM.

So please let us know how manual PWM behaves, and I'll tell you what I
think the problem is, and how I think it can be tinkered with (providing
it can).

In the meantime, you could contact Gigabyte and explain about the
problem. They better learn about the problem and fix their BIOS is
needed.

Thanks,
--
Jean Delvare
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-20 Thread Jean Delvare

Hi Nicolas,

  I would also appreciate a dump of the chip (isadump 0x295 0x296 unless
  it lives at some uncommon address) to confirm the guess.

  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
 00: 11 10 80 00 37 ff 00 37 ff 07 13 5b 00 51 40 ff
 10: fe fe ff 71 d7 fe 7f fe 00 00 ff ff ff ff ff ff

Interesting. Your chip does seem to be configured (i.e. pwm polarity is
high), so whatever your problem is, it is probably different from what
Simone experienced.

Your configuration is as follow:
* PWM outputs active high.
* PWM 2 and 3 in on/off mode, set to on.
* PWM 1 in smart guardian mode, set to automatic PWM depending on
temp3.

I would like to know how temperature channels are used by your
motherboard, and how fans are used as well. Which temperature and fan
channels correspond to your CPU? What other temperature sensors and fans
are present?

The values dumped here make me believe that the PWM outputs were
configured by the BIOS. Now maybe not the correct way, at least for you.

 I guess the BIOS setting will simply be overwritten so changing the BIOS
 should not affect subsequent use, no?

Changing the BIOS configuration affects the initial register
configuration, from which the it87 driver decides whether using PWM or
reconfiguring the chip (changing polarity) is safe or not. This is why
it might help. With the dump you provided, we now know that the (new)
it87 driver will accept PWM operations even when your BIOS was left in
smart guardian mode.

I would like you to give a try to a recent version of the it87 driver (as
found in 2.6.11-rc1-bk7 or 2.6.11-rc1-mm2). This will let us know which
revision of the IT8712F you have (in case it matters), and will also let
you experiment with manual PWM.

If manual PWM works, then the problem is in the way temperature interacts
with PWM in automatic mode.

If manual PWM works the wrong way around (like it did for Simone) then it
is a polarity issue (after all, maybe *you* need active low).

If manual PWM half works (fan speed changes but not as much as it should)
it might be a problem of picking the correct base frequency for PWM.

So please let us know how manual PWM behaves, and I'll tell you what I
think the problem is, and how I think it can be tinkered with (providing
it can).

In the meantime, you could contact Gigabyte and explain about the
problem. They better learn about the problem and fix their BIOS is
needed.

Thanks,
--
Jean Delvare
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-20 Thread Nicolas Pitre
On Thu, 20 Jan 2005, Jean Delvare wrote:

 
 Hi Nicolas,
 
   I would also appreciate a dump of the chip (isadump 0x295 0x296 unless
   it lives at some uncommon address) to confirm the guess.
 
   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
  00: 11 10 80 00 37 ff 00 37 ff 07 13 5b 00 51 40 ff
  10: fe fe ff 71 d7 fe 7f fe 00 00 ff ff ff ff ff ff
 
 Interesting. Your chip does seem to be configured (i.e. pwm polarity is
 high), so whatever your problem is, it is probably different from what
 Simone experienced.
 
 Your configuration is as follow:
 * PWM outputs active high.
 * PWM 2 and 3 in on/off mode, set to on.
 * PWM 1 in smart guardian mode, set to automatic PWM depending on
 temp3.

Sensible.

 I would like to know how temperature channels are used by your
 motherboard, and how fans are used as well. Which temperature and fan
 channels correspond to your CPU? What other temperature sensors and fans
 are present?

It looks like only temp3 is used for the CPU temperature, fan1 is the 
CPU fan and fan2 the case fan.

 The values dumped here make me believe that the PWM outputs were
 configured by the BIOS. Now maybe not the correct way, at least for you.

I experimented with isaset tweaking individual bits in register 0x14 
(blindly I confess, haven't read the datasheet) and flipping bit 3 from 
0 to 1 (writing 0xdf) apparently reverses the behavior, i.e. the CPU fan 
speed now increases with the CPU temperature.

 I would like you to give a try to a recent version of the it87 driver (as
 found in 2.6.11-rc1-bk7 or 2.6.11-rc1-mm2).

Will try to do soon.  In the mean time I'm willing to try out things 
with isaset if you can suggest basic tests (easier than upgrading kernel 
for the time being).


Nicolas
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-20 Thread Jean Delvare

Hi Nicolas,

 It looks like only temp3 is used for the CPU temperature, fan1 is the
 CPU fan and fan2 the case fan.

This is coherent with your chip configuration.

 I experimented with isaset tweaking individual bits in register 0x14
 (blindly I confess, haven't read the datasheet) and flipping bit 3 from
 0 to 1 (writing 0xdf) apparently reverses the behavior, i.e. the CPU fan
 speed now increases with the CPU temperature.

That's odd. This bit isn't supposed to significantly change the
behavior. When cleared (default), possible duty cycles range from 0 to
100%. When set, the possible duty cycles range from 20% to 100% (except
for PWM=0 which still results in a 0% duty cycle). I hardly understand
how setting this bit can result in the change you describe.

 In the mean time I'm willing to try out things
 with isaset if you can suggest basic tests (easier than upgrading kernel
 for the time being).

OK. Remember you better keep an eye on the CPU fan in case your tests
stop it. I would also suggest that you take a look at the datasheet so
that you better understand what you are doing:
http://www.iteusa.com/product_info/file/pc/IT8712F_V0.81.pdf
(page 79 of the document, which is 97 of the PDF file - don't ask)

The best test I can think of is to switch your CPU fan to manual PWM
mode. To do that, write 0x40 to register 0x15. CPU fan should go to half
speed. Write 0x7F and if should go to full speed, except if the polarity
is not correct in which case 0x00 will do (and 0x7F will stop the fan
completely so you don't want to keep it that way).

I suggest that you use the -y flag of isaset so that you can overwrite
register values quickly if things turn bad.

Once you know if the polarity is correct, you can try different values of
PWM between 0x00 and 0x7F and see how exactly your fan reacts to them.
You can also study more precisely how bit 3 of register 0x14 (the one
you played with already) affects the PWM vs speed curve.

Thanks,
--
Jean Delvare
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-20 Thread Jean Delvare
Hi Nicolas,

 I confirm that 0x7f is full speed.

So at least the polarity bit is correct, and Gigabyte isn't to blame.

  Once you know if the polarity is correct, you can try different
  values of PWM between 0x00 and 0x7F and see how exactly your fan
  reacts to them.
 
 That's where things get really really interesting.  As mentioned
 above 0x7f drives the fan full speed (2596 RPM).  Now lowering that
 value slows the CPU fan gradually down to a certain point.  With a
 value of 0x3f the fan turns at 1041 RPM.  But below 0x3f the fan
 starts speeding up again to reach a peak of 2280 RPM with a value
 of 0x31, then it slows  down again toward 0 RPM as the register
 value is decreased down to 0.
 
 Bit 3 of register 0x14, when set, only modifies the curve so the
 first minimum is instead reached at 0x30 then the peak occurs at 0x1d
 before dropping to 0.
 
 Changing the PWM base clock select has no effect.

Wow! Unexpected, to say the least. First time I see such a behavior.

Could it be that your CPU fan isn't a simple passive device but one of
these high-tech models with an embedded thermal sensor and automatic
speed adjustment? This would possibly interact with the motherboard PWM
capability and could explain the strange speed curve your obtained.

I would also like you to try a similar test with your case fan. Enable
smart guardian mode for this one (by writing 0x73 to register 0x13),
then scan the 0x7f-0x00 range (register 0x16) like you did for your CPU
fan. I wonder if you will obtain the same kind of result or a standard
linear curve.

(Note that PWM2 might not be wired at all on your motherboard, so don't
be surprised if the case fan speed doesn't change at all.)

Thanks,
-- 
Jean Delvare
http://khali.linux-fr.org/
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-19 Thread Nicolas Pitre
On Wed, 19 Jan 2005, Jean Delvare wrote:

> Hi Nicolas,
> 
> > FWIW, I have a Gigabyte motherboard with an it87 chip too.  Reading 
> > about this it87 polarity thing I'm suspecting something is really
> > wrong  here:
> > 
> > When system is idle, the sensors report shows:
> > CPU temp = +25°C and CPU fan = 2136 RPM (and rather noisy)
> > 
> > When system is 100% busy (with dd if=/dev/urandom of=/dev/null):
> > CPU temp = +41°C and CPU fan =   1288 RPM (and obviously much quieter)
> > 
> > I'm running a 2.6.10 kernel (not -mm) so I guess the BIOS settings for
> > fan control are not altered.  And incidentally the BIOS has a setting 
> > called "smart fan control" set to "enabled" which maps to the ITxxF 
> > automatic PWM control mode I suppose.  So if the BIOS actually set the
> > fan polarity wrong then the fan would slow down when the temperature 
> > rises and vice versa, right?
> 
> That's right, what you describe really sounds like a wrong polarity
> setting.
> 
> Could you please tell us what model it is, with what BIOS revision?

>From dmidecode:

BIOS Information
Vendor: Award Software International, Inc.
Version: F5
Release Date: 11/01/2004

Base Board Information
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: 8I915GMF
Version: x.x
Serial Number:

> I would also appreciate a dump of the chip (isadump 0x295 0x296 unless 
> it lives at some uncommon address) to confirm the guess.

 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: 11 10 80 00 37 ff 00 37 ff 07 13 5b 00 51 40 ff
10: fe fe ff 71 d7 fe 7f fe 00 00 ff ff ff ff ff ff
20: 53 a4 cc b9 b9 89 8b ff c9 c9 fe 19 60 f7 f7 f7
30: ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00
40: 7f 7f 7f 7f 46 7f ff ff 2d ff ff ff ff ff ff ff
50: ff 1c 7f 7f 7f ff 5f 5f 90 5f f9 12 55 00 00 00
60: ff 14 41 23 82 23 ff ff 7f 7f 7f 00 00 7f ff ff
70: ff 14 41 23 82 23 ff ff ff ff ff ff ff ff ff ff
80: 00 00 00 00 ff ff ff ff 40 40 ff ff ff ff ff ff
90: 7f 7f 7f 00 00 7f ff ff 7f 7f 7f 00 00 7f ff ff
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

> The code Jonas and I have been adding to the it87 driver recently will
> probably not work for you if you leave the "smart fan control" enabled
> in your BIOS setup screen (because we supposed that no reponsible
> motherboard maker would enable this mode without properly configuring
> the polarity beforehand - wrong guess in your case - and are not
> allowing a polarity inversion in this case).

Heh... and it's the default value.

> However, by disabling this
> mode in the BIOS setup screen, you should be able to use the new
> fix_pwm_polarity module register to get the polarity fixed, with manual
> PWM control (no auto mode yet).

I guess the BIOS setting will simply be overwritten so changing the BIOS 
should not affect subsequent use, no?

> You might also search for a BIOS update for your board. I consider the
> behavior your describe a major problem and would expect Gigabyte to fix
> it at some point in time.

Well... I can't find a straight BIOS update for this board.  There is a 
Windows application to fetch and install a new BIOS from the net but 
installing Windows on this machine just for that is not really 
practical.


Nicolas

Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-19 Thread Jean Delvare
Hi Nicolas,

> FWIW, I have a Gigabyte motherboard with an it87 chip too.  Reading 
> about this it87 polarity thing I'm suspecting something is really
> wrong  here:
> 
> When system is idle, the sensors report shows:
> CPU temp = +25°C and CPU fan = 2136 RPM (and rather noisy)
> 
> When system is 100% busy (with dd if=/dev/urandom of=/dev/null):
> CPU temp = +41°C and CPU fan =   1288 RPM (and obviously much quieter)
> 
> I'm running a 2.6.10 kernel (not -mm) so I guess the BIOS settings for
> fan control are not altered.  And incidentally the BIOS has a setting 
> called "smart fan control" set to "enabled" which maps to the ITxxF 
> automatic PWM control mode I suppose.  So if the BIOS actually set the
> fan polarity wrong then the fan would slow down when the temperature 
> rises and vice versa, right?

That's right, what you describe really sounds like a wrong polarity
setting.

Could you please tell us what model it is, with what BIOS revision? I
would also appreciate a dump of the chip (isadump 0x295 0x296 unless it
lives at some uncommon address) to confirm the guess.

The code Jonas and I have been adding to the it87 driver recently will
probably not work for you if you leave the "smart fan control" enabled
in your BIOS setup screen (because we supposed that no reponsible
motherboard maker would enable this mode without properly configuring
the polarity beforehand - wrong guess in your case - and are not
allowing a polarity inversion in this case). However, by disabling this
mode in the BIOS setup screen, you should be able to use the new
fix_pwm_polarity module register to get the polarity fixed, with manual
PWM control (no auto mode yet).

You might also search for a BIOS update for your board. I consider the
behavior your describe a major problem and would expect Gigabyte to fix
it at some point in time.

Thanks,
-- 
Jean Delvare
http://khali.linux-fr.org/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-19 Thread Nicolas Pitre
On Mon, 10 Jan 2005, Jean Delvare wrote:

> When I get this, I'll compare with the datasheets so as to understand
> how your chip is configured (or left unconfigured) by your BIOS. This
> will both help me propose a workaround in the it87 driver and explain
> the Gigabyte support what I think they should do.

FWIW, I have a Gigabyte motherboard with an it87 chip too.  Reading 
about this it87 polarity thing I'm suspecting something is really wrong 
here:

When system is idle, the sensors report shows:
CPU temp = +25°C and CPU fan = 2136 RPM (and rather noisy)

When system is 100% busy (with dd if=/dev/urandom of=/dev/null):
CPU temp = +41°C and CPU fan =   1288 RPM (and obviously much quieter)

I'm running a 2.6.10 kernel (not -mm) so I guess the BIOS settings for 
fan control are not altered.  And incidentally the BIOS has a setting 
called "smart fan control" set to "enabled" which maps to the ITxxF 
automatic PWM control mode I suppose.  So if the BIOS actually set the 
fan polarity wrong then the fan would slow down when the temperature 
rises and vice versa, right?


Nicolas

Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-19 Thread Nicolas Pitre
On Mon, 10 Jan 2005, Jean Delvare wrote:

 When I get this, I'll compare with the datasheets so as to understand
 how your chip is configured (or left unconfigured) by your BIOS. This
 will both help me propose a workaround in the it87 driver and explain
 the Gigabyte support what I think they should do.

FWIW, I have a Gigabyte motherboard with an it87 chip too.  Reading 
about this it87 polarity thing I'm suspecting something is really wrong 
here:

When system is idle, the sensors report shows:
CPU temp = +25°C and CPU fan = 2136 RPM (and rather noisy)

When system is 100% busy (with dd if=/dev/urandom of=/dev/null):
CPU temp = +41°C and CPU fan =   1288 RPM (and obviously much quieter)

I'm running a 2.6.10 kernel (not -mm) so I guess the BIOS settings for 
fan control are not altered.  And incidentally the BIOS has a setting 
called smart fan control set to enabled which maps to the ITxxF 
automatic PWM control mode I suppose.  So if the BIOS actually set the 
fan polarity wrong then the fan would slow down when the temperature 
rises and vice versa, right?


Nicolas

Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-19 Thread Jean Delvare
Hi Nicolas,

 FWIW, I have a Gigabyte motherboard with an it87 chip too.  Reading 
 about this it87 polarity thing I'm suspecting something is really
 wrong  here:
 
 When system is idle, the sensors report shows:
 CPU temp = +25°C and CPU fan = 2136 RPM (and rather noisy)
 
 When system is 100% busy (with dd if=/dev/urandom of=/dev/null):
 CPU temp = +41°C and CPU fan =   1288 RPM (and obviously much quieter)
 
 I'm running a 2.6.10 kernel (not -mm) so I guess the BIOS settings for
 fan control are not altered.  And incidentally the BIOS has a setting 
 called smart fan control set to enabled which maps to the ITxxF 
 automatic PWM control mode I suppose.  So if the BIOS actually set the
 fan polarity wrong then the fan would slow down when the temperature 
 rises and vice versa, right?

That's right, what you describe really sounds like a wrong polarity
setting.

Could you please tell us what model it is, with what BIOS revision? I
would also appreciate a dump of the chip (isadump 0x295 0x296 unless it
lives at some uncommon address) to confirm the guess.

The code Jonas and I have been adding to the it87 driver recently will
probably not work for you if you leave the smart fan control enabled
in your BIOS setup screen (because we supposed that no reponsible
motherboard maker would enable this mode without properly configuring
the polarity beforehand - wrong guess in your case - and are not
allowing a polarity inversion in this case). However, by disabling this
mode in the BIOS setup screen, you should be able to use the new
fix_pwm_polarity module register to get the polarity fixed, with manual
PWM control (no auto mode yet).

You might also search for a BIOS update for your board. I consider the
behavior your describe a major problem and would expect Gigabyte to fix
it at some point in time.

Thanks,
-- 
Jean Delvare
http://khali.linux-fr.org/
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-19 Thread Nicolas Pitre
On Wed, 19 Jan 2005, Jean Delvare wrote:

 Hi Nicolas,
 
  FWIW, I have a Gigabyte motherboard with an it87 chip too.  Reading 
  about this it87 polarity thing I'm suspecting something is really
  wrong  here:
  
  When system is idle, the sensors report shows:
  CPU temp = +25°C and CPU fan = 2136 RPM (and rather noisy)
  
  When system is 100% busy (with dd if=/dev/urandom of=/dev/null):
  CPU temp = +41°C and CPU fan =   1288 RPM (and obviously much quieter)
  
  I'm running a 2.6.10 kernel (not -mm) so I guess the BIOS settings for
  fan control are not altered.  And incidentally the BIOS has a setting 
  called smart fan control set to enabled which maps to the ITxxF 
  automatic PWM control mode I suppose.  So if the BIOS actually set the
  fan polarity wrong then the fan would slow down when the temperature 
  rises and vice versa, right?
 
 That's right, what you describe really sounds like a wrong polarity
 setting.
 
 Could you please tell us what model it is, with what BIOS revision?

From dmidecode:

BIOS Information
Vendor: Award Software International, Inc.
Version: F5
Release Date: 11/01/2004

Base Board Information
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: 8I915GMF
Version: x.x
Serial Number:

 I would also appreciate a dump of the chip (isadump 0x295 0x296 unless 
 it lives at some uncommon address) to confirm the guess.

 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: 11 10 80 00 37 ff 00 37 ff 07 13 5b 00 51 40 ff
10: fe fe ff 71 d7 fe 7f fe 00 00 ff ff ff ff ff ff
20: 53 a4 cc b9 b9 89 8b ff c9 c9 fe 19 60 f7 f7 f7
30: ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00
40: 7f 7f 7f 7f 46 7f ff ff 2d ff ff ff ff ff ff ff
50: ff 1c 7f 7f 7f ff 5f 5f 90 5f f9 12 55 00 00 00
60: ff 14 41 23 82 23 ff ff 7f 7f 7f 00 00 7f ff ff
70: ff 14 41 23 82 23 ff ff ff ff ff ff ff ff ff ff
80: 00 00 00 00 ff ff ff ff 40 40 ff ff ff ff ff ff
90: 7f 7f 7f 00 00 7f ff ff 7f 7f 7f 00 00 7f ff ff
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

 The code Jonas and I have been adding to the it87 driver recently will
 probably not work for you if you leave the smart fan control enabled
 in your BIOS setup screen (because we supposed that no reponsible
 motherboard maker would enable this mode without properly configuring
 the polarity beforehand - wrong guess in your case - and are not
 allowing a polarity inversion in this case).

Heh... and it's the default value.

 However, by disabling this
 mode in the BIOS setup screen, you should be able to use the new
 fix_pwm_polarity module register to get the polarity fixed, with manual
 PWM control (no auto mode yet).

I guess the BIOS setting will simply be overwritten so changing the BIOS 
should not affect subsequent use, no?

 You might also search for a BIOS update for your board. I consider the
 behavior your describe a major problem and would expect Gigabyte to fix
 it at some point in time.

Well... I can't find a straight BIOS update for this board.  There is a 
Windows application to fetch and install a new BIOS from the net but 
installing Windows on this machine just for that is not really 
practical.


Nicolas

Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-17 Thread Jean Delvare
Hi Simone,

> While we're at it, the fan speed sensor reports an absurd speed when
> the fan  is driven with very low but non-zero pwm values.  For
> example, driving it  with pwm=2 I get speeds over 50K rpms, while of
> course the fan is stopped  (almost?).  This could be just an hardware
> sensitivity problem in the sensor  chip, or a false measure triggered
> by fan vibration, but maybe you know  better.

This is a frequent problem with PWM. In order to estimate the fan
rotation speed, chips sample a signal that comes from the fan on its
third wire (typically two pulses per revolution). Since the fan is not a
power source by itself, the pulses are powered from the fan header's
+12V pin. When you start using PWM, you affect the +12V pin duty cycle,
and as a result you affect the speed signal duty cycle. The lower the
duty cycle, the harder for the chip to correctly determine the speed.

Newer chips have the capability to correct the effects of PWM at
reasonable duty cycles. It however supposes that it knows which fan
corresponds to which PWM output. Motherboard manufacturers will have to
take this information into account when designing their boards. And at
any rate, very low PWM duty cycles cannot possibly corrected.

It is possible to affect the fan speed vs. PWM curve by changing the
base frequency of the PWM signal. This can help achieve lower fan speeds
with higher PWM duty cycles (and thus better speed readings). Most chips
support frequency adjustment, but our drivers don't, because it wasn't
realized until very recently that this could be of any benefit to the
user.

-- 
Jean Delvare
http://khali.linux-fr.org/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-17 Thread Jean Delvare
Hi Simone,

 While we're at it, the fan speed sensor reports an absurd speed when
 the fan  is driven with very low but non-zero pwm values.  For
 example, driving it  with pwm=2 I get speeds over 50K rpms, while of
 course the fan is stopped  (almost?).  This could be just an hardware
 sensitivity problem in the sensor  chip, or a false measure triggered
 by fan vibration, but maybe you know  better.

This is a frequent problem with PWM. In order to estimate the fan
rotation speed, chips sample a signal that comes from the fan on its
third wire (typically two pulses per revolution). Since the fan is not a
power source by itself, the pulses are powered from the fan header's
+12V pin. When you start using PWM, you affect the +12V pin duty cycle,
and as a result you affect the speed signal duty cycle. The lower the
duty cycle, the harder for the chip to correctly determine the speed.

Newer chips have the capability to correct the effects of PWM at
reasonable duty cycles. It however supposes that it knows which fan
corresponds to which PWM output. Motherboard manufacturers will have to
take this information into account when designing their boards. And at
any rate, very low PWM duty cycles cannot possibly corrected.

It is possible to affect the fan speed vs. PWM curve by changing the
base frequency of the PWM signal. This can help achieve lower fan speeds
with higher PWM duty cycles (and thus better speed readings). Most chips
support frequency adjustment, but our drivers don't, because it wasn't
realized until very recently that this could be of any benefit to the
user.

-- 
Jean Delvare
http://khali.linux-fr.org/
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-16 Thread Simone Piunno

Hi,

While we're at it, the fan speed sensor reports an absurd speed when the fan 
is driven with very low but non-zero pwm values.  For example, driving it 
with pwm=2 I get speeds over 50K rpms, while of course the fan is stopped 
(almost?).  This could be just an hardware sensitivity problem in the sensor 
chip, or a false measure triggered by fan vibration, but maybe you know 
better.

/Simone

-- 
http://thisurlenablesemailtogetthroughoverzealousspamfilters.org
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-16 Thread Simone Piunno

Hi,

While we're at it, the fan speed sensor reports an absurd speed when the fan 
is driven with very low but non-zero pwm values.  For example, driving it 
with pwm=2 I get speeds over 50K rpms, while of course the fan is stopped 
(almost?).  This could be just an hardware sensitivity problem in the sensor 
chip, or a false measure triggered by fan vibration, but maybe you know 
better.

/Simone

-- 
http://thisurlenablesemailtogetthroughoverzealousspamfilters.org
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-15 Thread Jean Delvare
Hi Simone,

> > 2* In the logs, you should see an information line with the chip
> > type, address and revision.
> > 3* Still in the logs, you should see a warning about your BIOS being
> > broken and PWM being disabled as a consequence.
> 
> Confirmed, but it looks like there's a missing linefeed in the
> warning.
> 
> [EMAIL PROTECTED] ~ $ uname -a
> Linux roentgen 2.6.11-rc1-mm1 #1 Sat Jan 15 16:23:34 CET 2005 x86_64
> AMD  Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux
> [EMAIL PROTECTED] ~ $ dmesg|grep it87
> it87: Found IT8705F chip at 0x290, revision 2
> it87 0-0290: detected broken BIOS defaults, disabling pwm
> interface<6>8139too  Fast Ethernet driver 0.9.27

True. The additional patch I posted earlier today fixes it though. You
can now test this one, which adds the "fix_pwm_polarity" module
parameter which will let you - at last - to use PWM the way it is meant
to be.

Let us know how it goes! :)

-- 
Jean Delvare
http://khali.linux-fr.org/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-15 Thread Simone Piunno
On Friday 14 January 2005 15:40, Jean Delvare wrote:

> Kernel 2.6.11-rc1-mm1 is just out, which does contain the latest updates
> to the it87 driver. I would like you to test them. What you should see:
> 1* When loading the it87 driver, the fans should not change speeds.

confirmed.

> 2* In the logs, you should see an information line with the chip type,
> address and revision.
> 3* Still in the logs, you should see a warning about your BIOS being
> broken and PWM being disabled as a consequence.

Confirmed, but it looks like there's a missing linefeed in the warning.

[EMAIL PROTECTED] ~ $ uname -a
Linux roentgen 2.6.11-rc1-mm1 #1 Sat Jan 15 16:23:34 CET 2005 x86_64 AMD 
Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux
[EMAIL PROTECTED] ~ $ dmesg|grep it87
it87: Found IT8705F chip at 0x290, revision 2
it87 0-0290: detected broken BIOS defaults, disabling pwm interface<6>8139too 
Fast Ethernet driver 0.9.27

> 4* PWM interface should NOT be available in sysfs.

confirmed.

[EMAIL PROTECTED] ~ $ ls /sys/devices/platform/i2c-0/0-0290
alarmsfan3_divin2_input  in5_input  in8_inputtemp2_min
detach_state  fan3_input  in2_maxin5_maxname temp2_type
driverfan3_minin2_minin5_minpowertemp3_input
fan1_div  in0_input   in3_input  in6_input  temp1_input  temp3_max
fan1_inputin0_max in3_maxin6_maxtemp1_maxtemp3_min
fan1_min  in0_min in3_minin6_mintemp1_mintemp3_type
fan2_div  in1_input   in4_input  in7_input  temp1_type
fan2_inputin1_max in4_maxin7_maxtemp2_input
fan2_min  in1_min in4_minin7_mintemp2_max

/Simone

-- 
http://thisurlenablesemailtogetthroughoverzealousspamfilters.org
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-15 Thread Simone Piunno
On Friday 14 January 2005 15:40, Jean Delvare wrote:

 Kernel 2.6.11-rc1-mm1 is just out, which does contain the latest updates
 to the it87 driver. I would like you to test them. What you should see:
 1* When loading the it87 driver, the fans should not change speeds.

confirmed.

 2* In the logs, you should see an information line with the chip type,
 address and revision.
 3* Still in the logs, you should see a warning about your BIOS being
 broken and PWM being disabled as a consequence.

Confirmed, but it looks like there's a missing linefeed in the warning.

[EMAIL PROTECTED] ~ $ uname -a
Linux roentgen 2.6.11-rc1-mm1 #1 Sat Jan 15 16:23:34 CET 2005 x86_64 AMD 
Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux
[EMAIL PROTECTED] ~ $ dmesg|grep it87
it87: Found IT8705F chip at 0x290, revision 2
it87 0-0290: detected broken BIOS defaults, disabling pwm interface68139too 
Fast Ethernet driver 0.9.27

 4* PWM interface should NOT be available in sysfs.

confirmed.

[EMAIL PROTECTED] ~ $ ls /sys/devices/platform/i2c-0/0-0290
alarmsfan3_divin2_input  in5_input  in8_inputtemp2_min
detach_state  fan3_input  in2_maxin5_maxname temp2_type
driverfan3_minin2_minin5_minpowertemp3_input
fan1_div  in0_input   in3_input  in6_input  temp1_input  temp3_max
fan1_inputin0_max in3_maxin6_maxtemp1_maxtemp3_min
fan1_min  in0_min in3_minin6_mintemp1_mintemp3_type
fan2_div  in1_input   in4_input  in7_input  temp1_type
fan2_inputin1_max in4_maxin7_maxtemp2_input
fan2_min  in1_min in4_minin7_mintemp2_max

/Simone

-- 
http://thisurlenablesemailtogetthroughoverzealousspamfilters.org
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: 2.6.10-mm2: it87 sensor driver stops CPU fan

2005-01-15 Thread Jean Delvare
Hi Simone,

  2* In the logs, you should see an information line with the chip
  type, address and revision.
  3* Still in the logs, you should see a warning about your BIOS being
  broken and PWM being disabled as a consequence.
 
 Confirmed, but it looks like there's a missing linefeed in the
 warning.
 
 [EMAIL PROTECTED] ~ $ uname -a
 Linux roentgen 2.6.11-rc1-mm1 #1 Sat Jan 15 16:23:34 CET 2005 x86_64
 AMD  Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux
 [EMAIL PROTECTED] ~ $ dmesg|grep it87
 it87: Found IT8705F chip at 0x290, revision 2
 it87 0-0290: detected broken BIOS defaults, disabling pwm
 interface68139too  Fast Ethernet driver 0.9.27

True. The additional patch I posted earlier today fixes it though. You
can now test this one, which adds the fix_pwm_polarity module
parameter which will let you - at last - to use PWM the way it is meant
to be.

Let us know how it goes! :)

-- 
Jean Delvare
http://khali.linux-fr.org/
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/