From owner-freebsd-mobile@FreeBSD.ORG Fri Jan 6 19:30:24 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2ACCA1065705 for ; Fri, 6 Jan 2012 19:30:24 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id A53E38FC08 for ; Fri, 6 Jan 2012 19:30:23 +0000 (UTC) Received: by werb13 with SMTP id b13so1958530wer.13 for ; Fri, 06 Jan 2012 11:30:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=vzOYYXkajou8JdfonQomYqbf/bJdC8QNabVkApVdgbk=; b=bVhr05admjHunXxiTRP9SIYLjyq7M2lfiJWzjOzF2LzvS/hQkOo3HC5RH7ECjx5Mg7 ipfcVhHhgXXDPTH3b7vxMM+gurRHWx7XIxZMi7MfjRpjWqluf5onG6Q/5amdnTgg2UF4 OjS20QQoRcCk5UCc9TVLE8JuBC2T9b7gQt5f4= MIME-Version: 1.0 Received: by 10.216.143.66 with SMTP id k44mr3997399wej.56.1325876342850; Fri, 06 Jan 2012 10:59:02 -0800 (PST) Received: by 10.223.158.129 with HTTP; Fri, 6 Jan 2012 10:59:02 -0800 (PST) In-Reply-To: <20120105193905.S62686@sola.nimnet.asn.au> References: <201201030332.q033WRLE064421@fire.js.berklix.net> <20120105020833.U62686@sola.nimnet.asn.au> <20120105193905.S62686@sola.nimnet.asn.au> Date: Fri, 6 Jan 2012 10:59:02 -0800 Message-ID: From: Kevin Oberman To: Ian Smith Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "Julian H. Stacey" , "Alexandre \"Sunny\" Kovalenko" , mobile@freebsd.org Subject: Re: powerd to use sysctl to import temps to drop freq to avoid heat crash X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2012 19:30:24 -0000 On Thu, Jan 5, 2012 at 2:40 AM, Ian Smith wrote: > On Thu, 5 Jan 2012, Ian Smith wrote: > > ======= > > #!/bin/sh > > # temp_t23 smithi v0 7/11/11, tidy 12/11/11, v2 fan read delay 22/11/11 > > + # Credit to Alexandre "Sunny" Kovalenko whose > + # earlier scripts for managing acpi_ibm resources inspired this one. > > > # v3 18/12/11 suspend / resume resets dev.acpi_ibm.0.fan=1 (ie auto) > > none=0; slow=1; fast=3 # Thinkpad T23 fan levels (1-2, 3-7 same) > > And of course it was also Alexandre who (I think originally) proposed > monitoring temperature to directly implement cooling via lower powerd > freqs, according to old email, in Feb 2006. I'd even forgotten having > reviewed and added a line or two to that patch .. if I lost my archives > I'd probably have no memory left at all :) > > This post: > http://lists.freebsd.org/pipermail/freebsd-acpi/2008-February/004521.html > points to this PR: > http://www.freebsd.org/cgi/query-pr.cgi?pr=bin%2F120336&cat= > which was closed with reference to this post: > http://docs.FreeBSD.org/cgi/mid.cgi?1203126071.833.19.camel > > Useless trying to apply anything like this to recent powerd sources, > though. Good luck with getting its fan to go, or a warranty claim! > First of all, I am highly suspicious of hardware issues. Like Ian says, the temperature measured in the chip and quite a bit higher than those measured on the motherboard. Beyond that, if the die temperature gets too high, all modern CPUs kill the power supply and the system dies almost instantly. I suspect this may be what is happening to you due to poor heat transfer from the die to the heatsink from poor attachment of the heatsink or a flaw in the CPU thermal connection between the die and the thermal transfer plate on the top of the case. (The former is FAR more likely.) Beyond this, I don't think the OS should be trying to deal with this. All "modern" CPUs, Intel or AMD, support some form of TCC and, if not interfered with, it will slow the clock in increments of 12.5% as needed to keep the temperature below PSV. This is done in a combination of hardware and BIOS and is supported by FreeBSD, but FreeBSD also tries to use it to do power management and as test both by myself and, more recently by mav@, this is a bad idea. Both throttling and TCC should be disabled and I would love to see them completely removed from power management. I have read papers which make it clear that only EST and sleep (Cx) states are really useful for power management and that Cx is by far and away the most significant, but enabling deep sleep states can cause the system to lock up when combined with TCC or throttling. If you want to keep a system cool, add: performance_cx_lowest="LOW" economy_cx_lowest="LOW" to /etc/rc.conf and disable TCC and throttling in /boot/loader.conf. -- R. Kevin Oberman, Network Engineer E-mail: kob6558@gmail.com