From owner-freebsd-acpi@FreeBSD.ORG Wed Oct 22 14:10:12 2008 Return-Path: Delivered-To: acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24341106567E for ; Wed, 22 Oct 2008 14:10:12 +0000 (UTC) (envelope-from gaijin.k@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by mx1.freebsd.org (Postfix) with ESMTP id C67498FC22 for ; Wed, 22 Oct 2008 14:10:11 +0000 (UTC) (envelope-from gaijin.k@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so571726ywe.13 for ; Wed, 22 Oct 2008 07:10:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=1nXAQR4/YLBK6aNY+UV0ToBxhy4+pNSyKawpBiQdxUQ=; b=cQ2RrNmDbmxLiJR2DLyzDL3UbdvdetW4T8NBN/cjiH/+qTdska9X8+ouX/gZytZbH+ y5LIpnCT5noladPIMcazEaYKhLQ0eo9epEwZZXwJrw6y7sSy34AE87wZ3mY2GtxLW+NY XscX4ovzd7lxgJU9FRE2tZVSBFcwKyH3WoBs4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=nZrDKrcLJyz8WTzT4yCRl/iQH5EDyNDTzSm6Jn+qlR77AH+3C50mW2iNj+ZWc8KiE6 nits/7ydfavj2ni+A+NU0055K51MMXqplpvgvmpRDRSfApuhHH+bXaiBz0jPK39Ne3nJ A6qPoiDHiqtEmqxpxv7qolXh4rlVmgKVvt1OQ= Received: by 10.231.19.3 with SMTP id y3mr6020777iba.8.1224683280785; Wed, 22 Oct 2008 06:48:00 -0700 (PDT) Received: from ?10.0.3.231? (pool-70-111-10-128.nwrk.east.verizon.net [70.111.10.128]) by mx.google.com with ESMTPS id 8sm9353078ywg.6.2008.10.22.06.47.59 (version=SSLv3 cipher=RC4-MD5); Wed, 22 Oct 2008 06:48:00 -0700 (PDT) From: "Alexandre \"Sunny\" Kovalenko" To: Lars Engels In-Reply-To: <20081022101506.zfazdtjeskwg8sgc@0x20.net> References: <20081021140617.ejzk8i5wpskksc4w@0x20.net> <48FE121B.3000206@root.org> <20081022101506.zfazdtjeskwg8sgc@0x20.net> Content-Type: text/plain; charset=utf-8 Date: Wed, 22 Oct 2008 09:47:43 -0400 Message-Id: <1224683263.2199.24.camel@RabbitsDen> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 8bit Cc: acpi@FreeBSD.org Subject: Re: acpi_tz1: _CRT value is absurd, ignored (256.0C) X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2008 14:10:12 -0000 On Wed, 2008-10-22 at 10:15 +0200, Lars Engels wrote: > Quoting Nate Lawson : > > > >> hw.acpi.thermal.tz1._CRT: -1 > >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > >> hw.acpi.thermal.tz1._ACx: 89.0C 83.0C 60.0C 50.0C 40.0C -1 -1 -1 -1 -1 > >> hw.acpi.thermal.tz1._TC1: 1 > >> hw.acpi.thermal.tz1._TC2: 2 > >> hw.acpi.thermal.tz1._TSP: 300 > > > > We could try to work around it in the tz poll routine. Or, you could > > set the _CRT value to something reasonable via sysctl. man acpi_thermal > > to see how. You have to specify user_override to unlock the sysctl. > > 105C seems reasonable based on other settings in tz2-3. > > Setting the sysctl doesn't work: > > Oct 22 09:50:15 NB0117232 sudo: engels : TTY=pts/3 ; > PWD=/usr/home/engels ; USER=root ; COMMAND=/sbin/sysctl > hw.acpi.thermal.user_override=1 > Oct 22 09:50:45 NB0117232 kernel: acpi_tz1: _CRT value is absurd, > ignored (256.0C) > Oct 22 09:50:55 NB0117232 sudo: engels : TTY=pts/3 ; > PWD=/usr/home/engels ; USER=root ; COMMAND=/sbin/sysctl > hw.acpi.thermal.tz1._CRT=105C > Oct 22 09:51:03 NB0117232 kernel: acpi_tz1: _CRT value is absurd, > ignored (256.0C) > > hw.acpi.thermal.tz1._CRT: -1 > > It is only set to the overridden value for a moment and is then set > back to -1. I suspect that ASL re-evaluates _CRT and tells FreeBSD to re-read it based on some event. I would have expected 'user_override' to block the update. I might be completely off the mark, though. > > So a workaround in the code would be nice. In the time being you should be able to dump our ASL (see Handbook for instructions), look for something like Scope (\_TZ) { ... ThermalZone (THM1) { ... Method (_CRT, 0, NotSerialized) { Return () } where THM1 is just a name, so it could be different in your case. You need to find one for the zone #1 inside the Scope(\TZ) definition. I think FreeBSD numbers them sequentially, regardless of the name, so this would be the second ThermalZone definition in the scope. If you want 105C, put Return(0xEC6); in there. The value 0xEC6 = 105 * 0xA + 0xAAC. If _CRT method is not there, you should be safe to add one, consisting of the single return statement. You would have to recompile ASL and set it to override on boot (see Handbook). As the side note, thermal chapter of the ACPI spec is both short and readable, so if you'd rather understand where did all of this come from, I would recommend reading through it. HTH, -- Alexandre "Sunny" Kovalenko (Олександр Коваленко)