Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Feb 2008 21:35:36 -0500
From:      "Alexandre \"Sunny\" Kovalenko" <alex.kovalenko@verizon.net>
To:        Ian Smith <smithi@nimnet.asn.au>
Cc:        freebsd-acpi@freebsd.org, Johannes Dieterich <dieterich.joh@googlemail.com>, Hajimu UMEMOTO <ume@freebsd.org>
Subject:   Re: [RFC] Patch to enable temperature ceiling in powerd
Message-ID:  <1203647736.16055.45.camel@RabbitsDen>
In-Reply-To: <Pine.BSF.3.96.1080221151000.1483B-100000@gaia.nimnet.asn.au>
References:  <Pine.BSF.3.96.1080221151000.1483B-100000@gaia.nimnet.asn.au>

next in thread | previous in thread | raw e-mail | index | archive | help

On Thu, 2008-02-21 at 15:48 +1100, Ian Smith wrote:
> On Wed, 20 Feb 2008, Johannes Dieterich wrote:
>  > Hajimu UMEMOTO wrote:
>  > > Hi,
>  > > 
>  > >>>>>> On Tue, 19 Feb 2008 00:19:36 +0100
>  > >>>>>> Johannes Dieterich <dieterich.joh@googlemail.com> said:
>  > > 
>  > > dieterich.joh> # sysctl hw.acpi.thermal.tz1
>  > > dieterich.joh> hw.acpi.thermal.tz1.temperature: 66.0C
>  > > dieterich.joh> hw.acpi.thermal.tz1.active: -1
>  > > dieterich.joh> hw.acpi.thermal.tz1.passive_cooling: 0
>  > > dieterich.joh> hw.acpi.thermal.tz1.thermal_flags: 0
>  > > dieterich.joh> hw.acpi.thermal.tz1._PSV: 92.5C
>  > > dieterich.joh> hw.acpi.thermal.tz1._HOT: -1
>  > > dieterich.joh> hw.acpi.thermal.tz1._CRT: 97.0C
>  > > dieterich.joh> hw.acpi.thermal.tz1._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
>  > > dieterich.joh> hw.acpi.thermal.tz1._TC1: 5
>  > > dieterich.joh> hw.acpi.thermal.tz1._TC2: 4
>  > > dieterich.joh> hw.acpi.thermal.tz1._TSP: 600
>  > > 
>  > > dieterich.joh> is the wanted output without Sunny's patch compiled in.
>  > > 
>  > > Thank you.  It seems good to me.  I've tried following setting on my
>  > > laptop, and it's working well:
>  > > 
>  > > 	sysctl hw.acpi.verbose=1
>  > > 	sysctl hw.acpi.thermal.user_override=1
>  > > 	sysctl hw.acpi.thermal.tz0._TC1=5
>  > > 	sysctl hw.acpi.thermal.tz0._TC2=4
>  > > 	sysctl hw.acpi.thermal.tz0._TSP=600
>  > > 
>  > and now I start to wonder: that is what happens:
>  > 
>  > # sysctl hw.acpi.verbose=1
>  > hw.acpi.verbose: 0 -> 1
>  > # sysctl hw.acpi.thermal.user_override=1
>  > hw.acpi.thermal.user_override: 0 -> 1
>  > # sysctl hw.acpi.thermal.tz0._TC1=5
>  > hw.acpi.thermal.tz0._TC1: -1 -> 5
>  > # sysctl hw.acpi.thermal.tz0._TC2=4
>  > hw.acpi.thermal.tz0._TC2: -1 -> 4
>  > # sysctl hw.acpi.thermal.tz0._TSP=600
>  > hw.acpi.thermal.tz0._TSP: -1 -> 600
>  > 
>  > Shouldn't that be somewhat different? And I didn't change anything in
>  > between but rebooting the machine.
>  > 
>  > > The following was logged into /var/log/messages:
>  > > 
>  > > Feb 19 11:08:26 kasuga kernel: acpi_tz0: temperature 85.8C: decreasing clock speed from 1200 MHz to 1000 MHz
>  > > Feb 19 11:09:26 kasuga kernel: acpi_tz0: temperature 82.8C: resuming previous clock speed (1200 MHz)
>  > > Feb 19 11:10:26 kasuga kernel: acpi_tz0: temperature 86.8C: decreasing clock speed from 1200 MHz to 900 MHz
>  > > Feb 19 11:11:26 kasuga kernel: acpi_tz0: temperature 79.8C: resuming previous clock speed (1200 MHz)
>  > > 
>  > still nothing. Completely nothing.
>  > 
>  > > So, I think the value of _TC1, _TC2 and _TSP is valid.
>  > > 
>  > > Still, I'm not sure why the above message is not logged on your
>  > > laptop.  But, it would be worth to try increasing _TC2 and/or
>  > > decreasing _TSP.
> 
>  > That might be my next test then. Just wanted to let you know about the
>  > IMHO strange output above.
> 
> It seems there's some ongoing confusion here between tz0 and tz1.  At
> least, I know I've been confused :)  It turned out, I understand, that
> Alexandre's laptop had the same original settings as yours - is it just
> the same machine? - and he didn't get any relief until modifying the
> passive cooling settings (_PSV, _TC1, _TC2 and _TSP) for tz1, not tz0. 
My laptop (ThinkPad X60 1709-73U) is similar, but not identical to the
one Johannes has. AFAIK, his is ThinkPad X60s, which has slightly slower
CPU (1.6GHz Core Duo vs. mine 1.8GHz Core Duo) and slightly smaller (or,
for the purpose of this discussion, slightly more densely packed) form
factor. This said, I would not expect much, if any difference in any
kind of the firmware (BIOS, ASL, etc.)

> 
> Alex said elsewhere that he suspected his tz0 might be the GPU rather
> than CPU, or perhaps it's CPU0 but the passive parameters are applied
> instead to CPU1, that's still unclear to me, but in either case his
> .tz0._CRT also said 127C and his .tz1._PSV was around yours, ie 92.5C. 
I do not know whether tz0 is the GPU, but overriding passive cooling
setting for it on my laptop accomplished precisely nothing. Looking into
my ASL, I can also see that tz0 has no _TC1, _TC2 or _TSP values
associated with it. Neither it has _PSL, which would normally indicate
which device needs to be throttled to achieve passive cooling in this
zone. It's _CRT (0x7F) and conditional returns of 0x80 from its _TMP
method also suggest that this is unlikely the CPU thermal sensor.

Second thermal zone (tz1) has _TC1, _TC2 and _TSP as well as _PSL
encompassing both CPU devices. Setting
hw.acpi.thermal.tz1.passive_cooling=1 and experimenting with
hw.acpi.thermal.tz1._PSV values, I can say that passive cooling in this
zone works well. 

With the patch, Umemoto-san has provided, there is no obvious need to
override, but since passive cooling has some hysteresis, and the
difference between tz1._PSV and tz1._CRT is only 4.5C, I would recommend
lowering tz1._PSV anyway.

> Quoting yours from an earlier post: 
> 
>  > hw.acpi.cpu.cx_lowest: C2
>  > hw.acpi.thermal.min_runtime: 0
>  > hw.acpi.thermal.polling_rate: 10
>  > hw.acpi.thermal.user_override: 0
>  > hw.acpi.thermal.tz0.temperature: 62.0C
>  > hw.acpi.thermal.tz0.active: -1
>  > hw.acpi.thermal.tz0.passive_cooling: 0
>  > hw.acpi.thermal.tz0.thermal_flags: 0
>  > hw.acpi.thermal.tz0._PSV: -1
>  > hw.acpi.thermal.tz0._HOT: -1
>  > hw.acpi.thermal.tz0._CRT: 127.0C
>  > hw.acpi.thermal.tz0._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
>  > hw.acpi.thermal.tz1.temperature: 63.0C
>  > hw.acpi.thermal.tz1.active: -1
>  > hw.acpi.thermal.tz1.passive_cooling: 0
>  > hw.acpi.thermal.tz1.thermal_flags: 0
>  > hw.acpi.thermal.tz1._PSV: 92.5C
>  > hw.acpi.thermal.tz1._HOT: -1
>  > hw.acpi.thermal.tz1._CRT: 97.0C
>  > hw.acpi.thermal.tz1._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
> 
> which, I think, is as Alex's was before any .user_override values.
> 
> But above, you showed applying the overrides to tz0, not tz1, perhaps
> because Hajimu showed those values applied to _his_ tz0, which would be
> right for his (and most) laptops, but not, it seems, Alex's and likely
> yours too?
> 
> So could you try applying the .user_override=1, .verbose=1 but those
> _PSV, _TC1, _TC2 and _TSP values to tz1 rather than to tz0, and set
> .tz1._PSV to some lower value that will be reached, and see if that
> works, or makes a difference, doing the expected logging to messages?
I would recommend leaving _TC1, _TC2 and _TSP alone for now and only
set 

sysctl hw.acpi.thermal.user_override=1
sysctl hw.acpi.thermal.tz1.passive_cooling=1
sysctl hw.acpi.thermal.tz1._PSV=80C

for now.
> 
> cheers, Ian
> 
-- 
Alexandre "Sunny" Kovalenko (Олександр Коваленко)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1203647736.16055.45.camel>