From: Guenter Roeck <linux@roeck-us.net>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] fancontrol aborts after suspend/resume
Date: Thu, 03 Apr 2014 15:10:04 +0000 [thread overview]
Message-ID: <533D79CC.1080901@roeck-us.net> (raw)
In-Reply-To: <201404021253.49647.l.lunak@centrum.cz>
On 04/03/2014 12:42 AM, Jean Delvare wrote:
> Hi Lubos,
>
> On Wed, 2 Apr 2014 12:53:49 +0200, Lubos Lunak wrote:
>> if system running fancontrol is suspended and resumed, fancontrol will abort,
>> as writing the pwm value will fail because of pwm control being set to
>> automatic control after the resume (google for 'fancontrol suspend' for
>> various discussions about this). The attached patch fixes the problem.
>
> I'm afraid this is fixing the problem in the wrong place. The BIOS is
> responsible for restoring the hardware settings at resume time. Failing
> that, the kernel should do it.
>
> So you should first look for a BIOS update, even though the chances
> that it fixes this specific problem are rather low. Then you should
> tell us which hwmon driver you are using, so that we can add proper
> suspend/resume code to it. If fan speed control mode settings are lost,
> other settings may be lost as well and would need to be saved and
> restored too.
>
> That being said I have to admit that your approach, although not clean,
> has the merit to work around the problem regardless of the BIOS or
> hwmon chip in use. This is certainly attractive. My only worry is that
> it _assumes_ that problem comes from an improperly handled
> suspend/resume cycle, which may or may not be the case. It might as
> well be the BIOS/ACPI changing the settings at run-time, or another fan
> monitoring application running in parallel, or a driver bug. In which
> case failing with an error is the right thing to do.
>
> Guenter, do you have an opinion on this?
>
I am never a friend of patching over a problem. Yes, it is kind of
attractive, but on the downside the impact will be that we won't even
hear about such problems. This also solves only part of the problem -
if fan data is not restored, we have to assume that limits are not
restored either. And it won't solve the problem if automatic fan speed
control is used.
So my first choice would be to fix it in the driver.
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2014-04-03 15:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 10:53 [lm-sensors] [PATCH] fancontrol aborts after suspend/resume Lubos Lunak
2014-04-03 7:42 ` Jean Delvare
2014-04-03 14:31 ` Lubos Lunak
2014-04-03 15:07 ` Guenter Roeck
2014-04-03 15:10 ` Guenter Roeck [this message]
2014-04-03 15:25 ` Lubos Lunak
2014-04-03 15:33 ` Guenter Roeck
2014-04-03 15:46 ` Jean Delvare
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=533D79CC.1080901@roeck-us.net \
--to=linux@roeck-us.net \
--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.