* Help/info request (in re trip points)
@ 2016-07-22 8:22 Lucas Levrel
2016-07-26 21:01 ` Lucas Levrel
0 siblings, 1 reply; 4+ messages in thread
From: Lucas Levrel @ 2016-07-22 8:22 UTC (permalink / raw)
To: linux-acpi
Hi,
Is this the right place to request for help and/or information about
thermal zones? If not, please point me to the right place.
I browsed through thermal.c but couldn't find an answer to my question
(it goes without saying I'm not an expert), namely:
how are trip point temperatures set at boot, and how are they reset when
crossed?
I'm aiming at changing the temperatures at which the fan starts and stops.
The kernel parameter thermal.act=XXX did change the "fan on" temperature,
but not the "fan off" one. I expected the hysteresis T(on)-T(off) to be
constant, and thus I thought T(off) would raise as much as I raised T(on),
but this is not the case.
Any help is greatly appreciated.
Lucas Levrel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help/info request (in re trip points)
2016-07-22 8:22 Help/info request (in re trip points) Lucas Levrel
@ 2016-07-26 21:01 ` Lucas Levrel
2016-07-27 1:29 ` Zhang Rui
0 siblings, 1 reply; 4+ messages in thread
From: Lucas Levrel @ 2016-07-26 21:01 UTC (permalink / raw)
To: linux-acpi
Hi (once more),
Isn't there anyone who could spare a few minutes to guide me on this?
I found some references to trip_point_?_hyst files, which seem promising,
but they aren't there in my sysfs, and I cannot create them (e.g. "touch:
cannot touch `trip_point_4_hyst': No such file or directory").
Thanks.
Lucas Levrel
Le 22 juillet 2016, Lucas Levrel a écrit :
> Hi,
>
> Is this the right place to request for help and/or information about thermal
> zones? If not, please point me to the right place.
>
> I browsed through thermal.c but couldn't find an answer to my question (it
> goes without saying I'm not an expert), namely:
> how are trip point temperatures set at boot, and how are they reset when
> crossed?
>
> I'm aiming at changing the temperatures at which the fan starts and stops.
> The kernel parameter thermal.act=XXX did change the "fan on" temperature, but
> not the "fan off" one. I expected the hysteresis T(on)-T(off) to be constant,
> and thus I thought T(off) would raise as much as I raised T(on), but this is
> not the case.
>
> Any help is greatly appreciated.
>
> Lucas Levrel
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help/info request (in re trip points)
2016-07-26 21:01 ` Lucas Levrel
@ 2016-07-27 1:29 ` Zhang Rui
2016-07-27 10:12 ` lucas.levrel
0 siblings, 1 reply; 4+ messages in thread
From: Zhang Rui @ 2016-07-27 1:29 UTC (permalink / raw)
To: Lucas Levrel, linux-acpi
Hi, Lucas,
As you have mentioned thermal.c, I think you are using ACPI thermal
control on your platform, right?
trip_point_?_hyst files are created by thermal core, if the platform
thermal driver supports hysteresis, and ACPI thermal driver, which is
used in your case, does not support hysteresis.
On 二, 2016-07-26 at 23:01 +0200, Lucas Levrel wrote:
> Hi (once more),
>
> Isn't there anyone who could spare a few minutes to guide me on this?
>
> I found some references to trip_point_?_hyst files, which seem
> promising,
> but they aren't there in my sysfs, and I cannot create them (e.g.
> "touch:
> cannot touch `trip_point_4_hyst': No such file or directory").
>
> Thanks.
>
> Lucas Levrel
>
> Le 22 juillet 2016, Lucas Levrel a écrit :
>
> >
> > Hi,
> >
> > Is this the right place to request for help and/or information
> > about thermal
> > zones? If not, please point me to the right place.
> >
> > I browsed through thermal.c but couldn't find an answer to my
> > question (it
> > goes without saying I'm not an expert), namely:
> > how are trip point temperatures set at boot,
ACPI thermal driver gets the trip point temperature information from
ACPI tables.
> > and how are they reset when
> > crossed?
> >
Usually, ACPI trip point is not reset when crossed, but it does
have granularity, which determines when to generate a
temperature change notification.
Say, for a platform that the trip point temperature is 50C, and
granularity is 5C, when the ACPI thermal driver receives a notification
at 50C, it starts to spin the fan.
Then next time when the ACPI thermal driver gets a temperature change
notification, the temperature is either 55C, which means we need to
take further action to cool the system, or the temperature is 45C and
we can turn off the fan.
In some cases, the trip point may get reset. You can refer to section
11.1.2 in ACPI spec 6.1. IN this case, a trip point change notification
will be sent to thermal driver, and ACPI thermal driver will re-
evaluate the trip point control methods to get new trip point
temperature. But AFAICS, this is really rare.
> > I'm aiming at changing the temperatures at which the fan starts and
> > stops.
> > The kernel parameter thermal.act=XXX did change the "fan on"
> > temperature, but
> > not the "fan off" one. I expected the hysteresis T(on)-T(off) to be
> > constant,
> > and thus I thought T(off) would raise as much as I raised T(on),
> > but this is
> > not the case.
> >
Dynamic trip point can only be supported by platform thermal design.
Specifying such values in userspace does not make sense, because it's
not guaranteed that the thermal driver can get notification upon the
values you specified, thus it would screw up the thermal control
entirely.
thanks,
rui
> > Any help is greatly appreciated.
> >
> > Lucas Levrel
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help/info request (in re trip points)
2016-07-27 1:29 ` Zhang Rui
@ 2016-07-27 10:12 ` lucas.levrel
0 siblings, 0 replies; 4+ messages in thread
From: lucas.levrel @ 2016-07-27 10:12 UTC (permalink / raw)
To: linux-acpi
Hi Rui,
First, thank you very much for taking the time to answer!
Le 27 juillet 2016, Zhang Rui a écrit :
> As you have mentioned thermal.c, I think you are using ACPI thermal
> control on your platform, right?
> trip_point_?_hyst files are created by thermal core, if the platform
> thermal driver supports hysteresis, and ACPI thermal driver, which is
> used in your case, does not support hysteresis.
I don't know what my system is using. In fact I know nothing about ACPI. I
couldn't find documentation (which doesn't mean there is no doc, just I
couldn't find it) explaining how this works. So I tried to guess,
gathering pieces of information by observing the behaviour of files in
/sys, and looking into code (but not being sure this code is relevant to
my system!).
What I can say (I still don't know if it is valuable info):
- there is no hwmon/ directory anywhere under /sys,
- the thermal_zone* and cooling_device* directories are in
/sys/devices/virtual/thermal.
>>> how are trip point temperatures set at boot,
>
> ACPI thermal driver gets the trip point temperature information from
> ACPI tables.
So, from some computer firmware.
>>> and how are they reset when crossed?
>>>
> Usually, ACPI trip point is not reset when crossed, but it does
> have granularity, which determines when to generate a
> temperature change notification.
> Say, for a platform that the trip point temperature is 50C, and
> granularity is 5C, when the ACPI thermal driver receives a notification
> at 50C, it starts to spin the fan.
> Then next time when the ACPI thermal driver gets a temperature change
> notification, the temperature is either 55C, which means we need to
> take further action to cool the system, or the temperature is 45C and
> we can turn off the fan.
>
> In some cases, the trip point may get reset. You can refer to section
> 11.1.2 in ACPI spec 6.1. IN this case, a trip point change notification
> will be sent to thermal driver, and ACPI thermal driver will re-
> evaluate the trip point control methods to get new trip point
> temperature. But AFAICS, this is really rare.
Maybe I used the word "reset" inappropriately. Simply, I noticed the
contents of trip_point_4_temp changes from 50000 to 45000 when temp
reaches 50000 and the fan starts to spin. If the initial contents of
trip_point_4_temp is 60000 (thanks to the thermal.act kernel parameter),
it also changes to 45000 when temp reaches 60000 and the fan starts to
spin. So it looks like in my case the turn-off temperature of 45 °C is
chosen independently of the turn-on temperature. (And temp never gets down
to this so low value of 45, so fan spins endlessly...)
>>> I'm aiming at changing the temperatures at which the fan starts and
>>> stops. The kernel parameter thermal.act=XXX did change the "fan on"
>>> temperature, but not the "fan off" one. I expected the hysteresis
>>> T(on)-T(off) to be constant, and thus I thought T(off) would raise as
>>> much as I raised T(on), but this is not the case.
>>>
> Dynamic trip point can only be supported by platform thermal design.
> Specifying such values in userspace does not make sense, because it's
> not guaranteed that the thermal driver can get notification upon the
> values you specified, thus it would screw up the thermal control
> entirely.
Do you mean: if the system has a 5 °C granularity, and I had set
trip_point_4_temp to a value not multiple of 5 °C, say 53 °C, then the
driver would not e.g. turn off the fan when the temperature changes from
e.g. 55 to 50, because the driver does not check "temp <=
trip_point_4_temp" but rather "temp == trip_point_4_temp"?
Your insight and help is much appreciated.
Best regards,
Lucas Levrel
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-27 10:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-22 8:22 Help/info request (in re trip points) Lucas Levrel
2016-07-26 21:01 ` Lucas Levrel
2016-07-27 1:29 ` Zhang Rui
2016-07-27 10:12 ` lucas.levrel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox