All of lore.kernel.org
 help / color / mirror / Atom feed
From: khali@linux-fr.org (Jean Delvare)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] reset=1 required for PWM control on Asus P4P800
Date: Mon, 07 Nov 2005 13:14:50 +0000	[thread overview]
Message-ID: <FQMVorb9.1131364926.0914080.khali@localhost> (raw)
In-Reply-To: <20051106224429.533f13b7@heffalump.sk2.org>


Hi Stephen,

On 2005-11-06, Stephen Kitt wrote:
> I've been using fancontrol for a while to control my CPU fan. I'm using
> an Asus P4P800 Deluxe board with a W83627THF controller which has PWM2
> wired to control the CPU fan (there are two other headers on the board,
> but they only report the fan speed, their PWM isn't connected).
>
> I switched to 2.6.14 yesterday and noticed today that the CPU fan was
> stuck at the speed the BIOS cruise control left it at before the
> w83627hf module was loaded.

I'm a bit surprised by this statement. Cruise control (or Q-fan, as Asus
calls it) supposedly means that the chip dynamically changes the CPU fan
speed depending to the CPU temperature. So the CPU fan shouldn't be
"stuck" as you wrote. It should increase with CPU load. Isn't it the
case?

> Changing the PWM value via /sys/bus/i2c/devices/.../pwm2 had no
> effect. Loading the module with reset=1 fixed things, and I noticed
> in my logs the request to report its usefulness. I compared the code
> from 2.6.13 to 2.6.14 and saw the change (and the comment!).

Thanks a lot for reporting, so that we can go on improving the driver.

> So here's a reason why it's needed ;-)
>
> I hope this is useful; if you need more info (...)

Yes, I'd like you to do some tests.

First, here is what I think is happening. Your BIOS sets the W83627THF
chip in "thermal cruise" mode, where the fan speed is adjusted
depending on CPU temperature. The driver used to reset to the default
settings, thus voiding the BIOS configuration. In the default mode, the
fan speed can be manually controlled using /sys/.../pwm2. However, in
"thermal cruise" mode, you can't, as the speed is automatically
regulated. As the new driver leaves the chip in the mode the BIOS set it
in (unless you use reset=1), manual control is disabled.

I agree that the current situation is inconsistent. When the chip is
found in automatic fan control mode, we should either not present the
pwm files, or provide a way to revert to manual control mode.

But actually there is a patch floating around which adds full support for
the automatic modes of the W83627THF to the w83627hf driver. It wasn't
merged yet because it doesn't follow the standard interface, and would
need to be reviewed. But merging it would solve the issue.

Eric, you were supposed to resend the latest version of the patch on the
sensors-list, but I can't actually find it in the archives. Can you
please send it now, either as a text/plain or text/x-patch attachement,
or inline if you are certain your mailer will not wrap it badly? We need
to start from the latest version of the patch.

One thing I know for sure is that we will have to get rid of all the
"qfan" names. "Q-fan" is a name from Asus. It might even be (R) or
(TM) by them. The driver is for a Winbond chip, so we better use Winbond
names, or generic names.

Stephen, do you have some kernel programming knowledge? We need someone
to put the patch in conformance with the standard sysfs interface before
we can integrate it. If not, can you at least test patches against
recent kernels?

Stephen, can you please do the following tests:

1* In the BIOS setup screen, disable Q-fan, then boot Linux 2.6.14. You
should not need the reset=1 parameter, pwm2 should work out of the box,
because the BIOS will have left the chip in default configuration.

2* In the BIOS setup screen, enable Q-fan, and set the "fan speed
ratio" to, say, 13/16. Then boot Linux and report the output of
"isadump 0x295 0x296". Try again with a different value, say 11/16,
and report the output of the same dump. I want to know what register it
affects. I'd guess 0x09, but a confirmation would be welcome.

Thanks,
--
Jean Delvare

  reply	other threads:[~2005-11-07 13:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-06 22:45 [lm-sensors] reset=1 required for PWM control on Asus P4P800 Deluxe Stephen Kitt
2005-11-07 13:14 ` Jean Delvare [this message]
2005-11-07 22:12 ` [lm-sensors] reset=1 required for PWM control on Asus P4P800 Stephen Kitt
2005-11-08  1:51 ` Jacques Facquet
2005-11-08  9:23 ` Eric Pascal
2005-11-09 12:15 ` Jean Delvare
2005-11-09 14:40 ` Jacques Facquet
2005-11-10 13:51 ` Stephen Kitt
2005-11-10 16:03 ` Jean Delvare
2005-11-10 16:54 ` Eric Pascal
2005-12-26 18:42 ` [lm-sensors] reset=1 required for PWM control on Asus P4P800 Deluxe M Rachao

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=FQMVorb9.1131364926.0914080.khali@localhost \
    --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.