* [lm-sensors] fancontrol EeePC,
@ 2010-04-25 7:35 Mildred Ki'Lya
2010-04-25 11:21 ` Jean Delvare
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Mildred Ki'Lya @ 2010-04-25 7:35 UTC (permalink / raw)
To: lm-sensors
[-- Attachment #1.1: Type: text/plain, Size: 1075 bytes --]
Hi,
I am using fancontrol for my new EeePC, and when fancontrol exit (when I
reboot for example) the fans are set to manual mode at full speed.
Aparently, the source code of fancontrol first tries to set the fan to safe
mode, and if it doesn't work, set it to manual at full speed. Apparently,
the EeePC safe mode is the same as automatic mode. So when we write "0" to
pwm1_enable, if we read it again, we'll see "2".
I could find information about EeePC fan control here:
https://patchwork.kernel.org/patch/64435/
To enable automatic mode at exit, I changed fancontrol with the following
patch:
--- /tmp/fancontrol 2010-04-25 09:31:58.394184626 +0200
+++ /usr/sbin/fancontrol 2010-04-25 09:21:24.161183983 +0200
@@ -318,7 +318,7 @@
# Try pwmN_enable=0
echo 0 > $ENABLE 2> /dev/null
- if [ `cat $ENABLE` -eq 0 ]
+ if [ `cat $ENABLE` -ne 1 ]
then
# Success
return 0
Do you think this change is worth including it for the next version of
lm-sensors ?
Thanks.
Mildred
PS: please Cc me for replies as I am not on the list
[-- Attachment #1.2: Type: text/html, Size: 1273 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [lm-sensors] fancontrol EeePC,
2010-04-25 7:35 [lm-sensors] fancontrol EeePC, Mildred Ki'Lya
@ 2010-04-25 11:21 ` Jean Delvare
2010-04-25 14:55 ` Mildred Ki'Lya
2010-04-25 17:02 ` Jean Delvare
2 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2010-04-25 11:21 UTC (permalink / raw)
To: lm-sensors
Hi Mildred,
On Sun, 25 Apr 2010 09:35:58 +0200, Mildred Ki'Lya wrote:
> Hi,
>
> I am using fancontrol for my new EeePC, and when fancontrol exit (when I
> reboot for example) the fans are set to manual mode at full speed.
>
> Aparently, the source code of fancontrol first tries to set the fan to safe
> mode, and if it doesn't work, set it to manual at full speed. Apparently,
> the EeePC safe mode is the same as automatic mode. So when we write "0" to
> pwm1_enable, if we read it again, we'll see "2".
This is a bug in the eeepc driver. If it doesn't support mode 0, it
should return -EINVAL when one tries to set it.
> I could find information about EeePC fan control here:
> https://patchwork.kernel.org/patch/64435/
>
> To enable automatic mode at exit, I changed fancontrol with the following
> patch:
>
>
> --- /tmp/fancontrol 2010-04-25 09:31:58.394184626 +0200
> +++ /usr/sbin/fancontrol 2010-04-25 09:21:24.161183983 +0200
> @@ -318,7 +318,7 @@
>
> # Try pwmN_enable=0
> echo 0 > $ENABLE 2> /dev/null
> - if [ `cat $ENABLE` -eq 0 ]
> + if [ `cat $ENABLE` -ne 1 ]
> then
> # Success
> return 0
>
>
> Do you think this change is worth including it for the next version of
> lm-sensors ?
No. What needs to be fixed is the eeepc driver. We don't want to add
random quirks to user-space applications to work around kernel driver
bugs.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [lm-sensors] fancontrol EeePC,
2010-04-25 7:35 [lm-sensors] fancontrol EeePC, Mildred Ki'Lya
2010-04-25 11:21 ` Jean Delvare
@ 2010-04-25 14:55 ` Mildred Ki'Lya
2010-04-25 17:02 ` Jean Delvare
2 siblings, 0 replies; 4+ messages in thread
From: Mildred Ki'Lya @ 2010-04-25 14:55 UTC (permalink / raw)
To: lm-sensors
[-- Attachment #1.1: Type: text/plain, Size: 1920 bytes --]
On 04/25/2010 01:21 PM, Jean Delvare wrote:
> Hi Mildred,
>
> On Sun, 25 Apr 2010 09:35:58 +0200, Mildred Ki'Lya wrote:
>
>> Hi,
>>
>> I am using fancontrol for my new EeePC, and when fancontrol exit (when I
>> reboot for example) the fans are set to manual mode at full speed.
>>
>> Aparently, the source code of fancontrol first tries to set the fan to safe
>> mode, and if it doesn't work, set it to manual at full speed. Apparently,
>> the EeePC safe mode is the same as automatic mode. So when we write "0" to
>> pwm1_enable, if we read it again, we'll see "2".
>>
> This is a bug in the eeepc driver. If it doesn't support mode 0, it
> should return -EINVAL when one tries to set it.
>
Well, I didn't think this was a bug, from what I read, mode 0
corresponds to safe mode which is the automatic mode on the EeePC, and
of course since this is the same as the mode 2 (automatic), when we read
the file back we get 2.
But you certainly know better about this, so I'm not pressing the issue
further.
If I understand how fancontrol works, when the mode 0 doesn't work, it
set the pwm to mnual mode (1) and maximum speed. Do you think that is a
good choice given that for some laptops where the default mode is the
automatic mode (2) ? That would be a perfectly acceptable fallback when
fancontrol isn't in charge.
Do you think there is possibility in the future that fancontrol reset
the fan state to automatic when it quits (when specified in the
configuration) ? I'd be willing to work on a patch if that were the case.
Mildred
--
Mildred Ki'Lya
╭───────── mildred593@online.fr ──────────
│ Jabber, GoogleTalk: <mildred@jabber.fr>
│ Website: <http://ki.lya.online.fr> GPG ID: 9A7D 2E2B
│ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [lm-sensors] fancontrol EeePC,
2010-04-25 7:35 [lm-sensors] fancontrol EeePC, Mildred Ki'Lya
2010-04-25 11:21 ` Jean Delvare
2010-04-25 14:55 ` Mildred Ki'Lya
@ 2010-04-25 17:02 ` Jean Delvare
2 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2010-04-25 17:02 UTC (permalink / raw)
To: lm-sensors
Hi Mildred,
On Sun, 25 Apr 2010 16:55:09 +0200, Mildred Ki'Lya wrote:
> On 04/25/2010 01:21 PM, Jean Delvare wrote:
> > Hi Mildred,
> >
> > On Sun, 25 Apr 2010 09:35:58 +0200, Mildred Ki'Lya wrote:
> >
> >> Hi,
> >>
> >> I am using fancontrol for my new EeePC, and when fancontrol exit (when I
> >> reboot for example) the fans are set to manual mode at full speed.
> >>
> >> Aparently, the source code of fancontrol first tries to set the fan to safe
> >> mode, and if it doesn't work, set it to manual at full speed. Apparently,
> >> the EeePC safe mode is the same as automatic mode. So when we write "0" to
> >> pwm1_enable, if we read it again, we'll see "2".
> >>
> > This is a bug in the eeepc driver. If it doesn't support mode 0, it
> > should return -EINVAL when one tries to set it.
> >
>
> Well, I didn't think this was a bug, from what I read, mode 0
> corresponds to safe mode which is the automatic mode on the EeePC, and
> of course since this is the same as the mode 2 (automatic), when we read
> the file back we get 2.
Please read Documentation/hwmon/sysfs-interface. Mode 0 doesn't mean
"safe mode" (whatever that means to you), it means "fan at full speed".
> But you certainly know better about this, so I'm not pressing the issue
> further.
>
> If I understand how fancontrol works, when the mode 0 doesn't work, it
> set the pwm to mnual mode (1) and maximum speed.
Correct. Both are almost equivalent (and for some chips, exactly
equivalent.)
> Do you think that is a
> good choice given that for some laptops where the default mode is the
> automatic mode (2) ? That would be a perfectly acceptable fallback when
> fancontrol isn't in charge.
We can't fallback to automatic mode by default because we have no
guarantee that this mode is properly configured.
> Do you think there is possibility in the future that fancontrol reset
> the fan state to automatic when it quits (when specified in the
> configuration) ? I'd be willing to work on a patch if that were the case.
One sensible change would be for fancontrol to restore the mode to what
it was when it was started. This should be the best option in all
cases, and fairly easy to implement, too. If you send a patch doing
this, I'll be happy to apply it.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-04-25 17:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-25 7:35 [lm-sensors] fancontrol EeePC, Mildred Ki'Lya
2010-04-25 11:21 ` Jean Delvare
2010-04-25 14:55 ` Mildred Ki'Lya
2010-04-25 17:02 ` Jean Delvare
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.