From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [Bug?] W83697: Broken readings for fan speed 10%
Date: Mon, 02 Jun 2008 10:32:18 +0000 [thread overview]
Message-ID: <20080602123218.0a59895b@hyperion.delvare> (raw)
In-Reply-To: <20080531220339.05dc83fd@neptune.home>
Hi Bruno,
On Sat, 31 May 2008 22:03:39 +0200, Bruno Prémont wrote:
> On a Commell LE-365 I get readings for fan speed that are broken about
> 10% of the time.
> The board has a Winbond W83697 chip (I can't check the exact chip name
> on the board as it's hidden by a heatsink, the photo from Commell, as
> as well as the manual indicate a HG, the kenrel reports:
> [ 3.572831] w83627hf: Found W83697HF chip at 0x290
> [ 3.572831] WDT driver for the Winbond(TM) W83627HF/THF/HG Super I/O chip initialising.
> [ 3.572831] w83627hf/thf/hg WDT: Watchdog already running. Resetting timeout to 60 sec
> [ 3.572831] w83627hf/thf/hg WDT: initialized. timeout` sec (nowayout=0)
> )
>
> Below a sample (reformatted) output of
> while sleep 1; do
> date;
> cat /sys/class/hwmon/hwmon0/device/fan1_input;
> done
> :
> Sat May 31 21:11:23 CEST 2008 2070
> Sat May 31 21:11:24 CEST 2008 2070
> Sat May 31 21:11:25 CEST 2008 2070
> Sat May 31 21:11:26 CEST 2008 2070
> Sat May 31 21:11:27 CEST 2008 2070
> Sat May 31 21:11:28 CEST 2008 2070
> Sat May 31 21:11:29 CEST 2008 2057
> Sat May 31 21:11:30 CEST 2008 2057
> Sat May 31 21:11:31 CEST 2008 2070
> Sat May 31 21:11:32 CEST 2008 2070
> Sat May 31 21:11:33 CEST 2008 -1
> Sat May 31 21:11:34 CEST 2008 -1
> Sat May 31 21:11:35 CEST 2008 -1
> Sat May 31 21:11:36 CEST 2008 -1
> Sat May 31 21:11:37 CEST 2008 2057
> Sat May 31 21:11:38 CEST 2008 2057
> Sat May 31 21:11:39 CEST 2008 2057
> Sat May 31 21:11:40 CEST 2008 2057
> Sat May 31 21:11:41 CEST 2008 2070
> Sat May 31 21:11:42 CEST 2008 2070
> Sat May 31 21:11:43 CEST 2008 2070
> Sat May 31 21:11:44 CEST 2008 2070
> Sat May 31 21:11:45 CEST 2008 2057
> Sat May 31 21:11:46 CEST 2008 2057
> Sat May 31 21:11:47 CEST 2008 -1
> Sat May 31 21:11:48 CEST 2008 -1
> Sat May 31 21:11:49 CEST 2008 2070
> Sat May 31 21:11:50 CEST 2008 2070
> Sat May 31 21:11:51 CEST 2008 2057
> Sat May 31 21:11:52 CEST 2008 2057
> Sat May 31 21:11:53 CEST 2008 2057
> Sat May 31 21:11:54 CEST 2008 2057
> Sat May 31 21:11:55 CEST 2008 2057
> Sat May 31 21:11:56 CEST 2008 2057
> Sat May 31 21:11:58 CEST 2008 2057
> Sat May 31 21:11:59 CEST 2008 2057
> Sat May 31 21:12:00 CEST 2008 2070
> Sat May 31 21:12:01 CEST 2008 2070
> Sat May 31 21:12:02 CEST 2008 2057
> Sat May 31 21:12:03 CEST 2008 2057
> Sat May 31 21:12:04 CEST 2008 2083
> Sat May 31 21:12:05 CEST 2008 2083
> Sat May 31 21:12:06 CEST 2008 2057
> Sat May 31 21:12:07 CEST 2008 2057
> Sat May 31 21:12:08 CEST 2008 2070
> Sat May 31 21:12:09 CEST 2008 2070
> Sat May 31 21:12:10 CEST 2008 2070
> Sat May 31 21:12:11 CEST 2008 2070
> Sat May 31 21:12:12 CEST 2008 337500
> Sat May 31 21:12:13 CEST 2008 337500
> Sat May 31 21:12:14 CEST 2008 337500
> Sat May 31 21:12:15 CEST 2008 337500
> Sat May 31 21:12:16 CEST 2008 337500
> Sat May 31 21:12:17 CEST 2008 337500
> Sat May 31 21:12:18 CEST 2008 2070
> Sat May 31 21:12:19 CEST 2008 2070
> Sat May 31 21:12:20 CEST 2008 2070
> Sat May 31 21:12:21 CEST 2008 2070
> Sat May 31 21:12:22 CEST 2008 2070
> Sat May 31 21:12:23 CEST 2008 2070
> Sat May 31 21:12:24 CEST 2008 2070
> Sat May 31 21:12:25 CEST 2008 2070
> Sat May 31 21:12:26 CEST 2008 2057
> Sat May 31 21:12:27 CEST 2008 2057
> Sat May 31 21:12:28 CEST 2008 2070
> Sat May 31 21:12:29 CEST 2008 2070
> Sat May 31 21:12:30 CEST 2008 2070
> Sat May 31 21:12:31 CEST 2008 2070
> Sat May 31 21:12:32 CEST 2008 -1
>
> The 337k RPM and -1 RPM do not make any sense.
> I can't tell if this is a regression as I just started monitoring
> a few sensor values (with older kernels I just did a few manual
> checks but never noticed broken fan speeds)
I do not think this is a regression, most likely a hardware issue.
Is the fan's speed controlled in any way, either by the W83697HG chip,
or maybe it is a self-regulated fan? Just check if the fan's speed
increases with the temperature (i.e. with CPU load).
If this is the case, then please read this recent discussion the
lm-sensors list:
http://marc.info/?l=lm-sensors&m\x121196069612940&w=2
I suspect that your problem is similar.
If the fan is not controlled and is running at full speed, then all I
can think of is defective hardware (either the fan or the monitoring
chip.)
> In case there is more data I can provide, please ask.
> As the board is not in production use I can easily try out patches.
One patch you may want to apply it this one:
http://lists.lm-sensors.org/pipermail/lm-sensors/2008-May/023189.html
It will let you switch the W83697HG chip from automatic fan speed
control to manual control and back - might be useful to investigate the
issue you have.
You can also give a try to the following patch, which is the equivalent
of the one I just posted for the it87 driver, but for the w83627hf
driver:
Subject: hwmon: (w83627hf) Filter out unlikely fan speed values
Filter out very large fan speed values. These can be reported by the
chip when a fan is being controlled at low speed. The tachometer
signal gets too weak and the chip fails to monitor the speed properly,
but unfortunately it reports unreasonably high values instead of 0
RPM, which is quite confusing.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
---
drivers/hwmon/w83627hf.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- linux-2.6.26-rc4.orig/drivers/hwmon/w83627hf.c 2008-06-02 12:14:00.000000000 +0200
+++ linux-2.6.26-rc4/drivers/hwmon/w83627hf.c 2008-06-02 12:20:57.000000000 +0200
@@ -259,7 +259,7 @@ static inline u8 FAN_TO_REG(long rpm, in
if (rpm = 0)
return 255;
rpm = SENSORS_LIMIT(rpm, 1, 1000000);
- return SENSORS_LIMIT((1350000 + rpm * div / 2) / (rpm * div), 1,
+ return SENSORS_LIMIT((1350000 + rpm * div / 2) / (rpm * div), 2,
254);
}
@@ -280,7 +280,8 @@ static int TEMP_FROM_REG(u8 reg)
return (s8)reg * 1000;
}
-#define FAN_FROM_REG(val,div) ((val)=0?-1:(val)=255?0:1350000/((val)*(div)))
+#define FAN_FROM_REG(val,div) ((val) <= 1 || (val) = 255 ? 0 : \
+ 1350000 / ((val) * (div)))
#define PWM_TO_REG(val) (SENSORS_LIMIT((val),0,255))
It will report the missing fan speed values as 0, which is probably
slightly better than -1 and 337500, even though it doesn't really solve
the problem.
--
Jean Delvare
http://khali.linux-fr.org/wishlist.html
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2008-06-02 10:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-31 20:03 [lm-sensors] [Bug?] W83697: Broken readings for fan speed 10% of Bruno Prémont
2008-05-31 20:17 ` [lm-sensors] [Bug?] W83697: Broken readings for fan speed 10% Grant Coady
2008-05-31 20:30 ` Bruno Prémont
2008-06-02 10:32 ` Jean Delvare [this message]
2008-06-02 19:09 ` Bruno Prémont
2008-06-02 19:35 ` Jean Delvare
2008-06-02 20:04 ` Bruno Prémont
2008-06-08 20:30 ` Bruno Prémont
2008-06-09 0:35 ` Matt Roberds
2008-06-11 15:59 ` Jean Delvare
2008-06-11 21:09 ` Bruno Prémont
2008-06-12 8:22 ` Jean Delvare
2008-06-12 18:37 ` Bruno Prémont
2008-06-13 12:04 ` Jean Delvare
2008-06-13 21:31 ` Bruno Prémont
2008-06-14 20:57 ` Jean Delvare
2008-06-14 21:24 ` Bruno Prémont
2008-06-15 7:35 ` Jean Delvare
2008-06-15 10:02 ` Bruno Prémont
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080602123218.0a59895b@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=lm-sensors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.