From owner-freebsd-current@FreeBSD.ORG Wed Jun 16 15:25:25 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AC101065784; Wed, 16 Jun 2010 15:25:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D272E8FC13; Wed, 16 Jun 2010 15:25:24 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 8346746C0B; Wed, 16 Jun 2010 11:25:24 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7E6568A04F; Wed, 16 Jun 2010 11:25:23 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Wed, 16 Jun 2010 08:05:09 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <4C187778.9060909@FreeBSD.org> In-Reply-To: <4C187778.9060909@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201006160805.09706.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 16 Jun 2010 11:25:23 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_03_06 autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Doug Barton Subject: Re: devd and/or ACPI not reporting a heat problem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jun 2010 15:25:25 -0000 On Wednesday 16 June 2010 3:04:24 am Doug Barton wrote: > Howdy, > > I thought my heat problems were over with this laptop thanks to all the > great suggestions I've received about powerd, no stepping, etc. (I also > propped up both the back and the front to make a nice big air pocket.) > I've always been pretty religious about blowing the dust off the fans > and heat sinks, but I guess it's been dustier than I thought lately > because I finally "caught" my laptop doing what it's been doing for the > last 2 weeks, which is (occasionally) powering down when it was > unattended; and the problem was heat. > > Of course I've been running devd all along, and so I initially ruled out > the heat problem due to this entry in devd.conf: > > # Notify all users before beginning emergency shutdown when we get > # a _CRT or _HOT thermal event and we're going to power down the system > # very soon. > notify 10 { > match "system" "ACPI"; > match "subsystem" "Thermal"; > match "notify" "0xcc"; > action "logger -p kern.emerg 'WARNING: system temperature too > high, shutting down soon!'"; > }; > > I'm not getting any of those notices in the logs, so I was looking other > places. (I do get other ACPI-related activity from devd, such as the > notice that it's going on and off AC power.) > > So, 2-part question, how can I make sure that devd gets the message, and > how do I make sure that the notice comes _before_ the BIOS forces the > system to power off. I.e., I'd like to have some sort of devd notice > that comes in time to do a clean shutdown, or perhaps some other > mitigation strategy prior to the BIOS taking over. Hmm, so the system just polls the temperature every 10 seconds (sys/dev/acpica/acpi_thermal.c has the details) and if it sees a high temperature twice in a row, it sends this event to devd. If it sees it a third time it initiates a shutdown. It may be that the BIOS takes over before those 20 seconds have passed. You can reduce the polling interval by changing hw.acpi.thermal.polling_rate (it is in seconds it seems) to a lower value. -- John Baldwin