From owner-freebsd-acpi@FreeBSD.ORG Thu Nov 22 09:25:23 2007 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0BE916A49C for ; Thu, 22 Nov 2007 09:25:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id AE13A13C4D5 for ; Thu, 22 Nov 2007 09:25:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8p) with ESMTP id 220788155-1834499 for multiple; Wed, 21 Nov 2007 18:05:24 -0500 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id lALN5CAQ055294; Wed, 21 Nov 2007 18:05:12 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-acpi@freebsd.org Date: Wed, 21 Nov 2007 15:54:19 -0500 User-Agent: KMail/1.9.6 References: <1195536301.1271.11.camel@localhost> <1195675813.56779.42.camel@RabbitsDen> <4744936A.6090002@root.org> In-Reply-To: <4744936A.6090002@root.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200711211554.20024.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 21 Nov 2007 18:05:12 -0500 (EST) X-Virus-Scanned: ClamAV 0.91.2/4874/Wed Nov 21 15:33:19 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00, SUBJECT_EXCESS_QP autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Subject: Re: acpi_thermal User Overriden Parameters Reset on Power State Change 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: Thu, 22 Nov 2007 09:25:24 -0000 On Wednesday 21 November 2007 03:22:02 pm Nate Lawson wrote: > Alexandre "Sunny" Kovalenko wrote: > > On Tue, 2007-11-20 at 16:25 +1100, Nick Withers wrote: > >> Hi y'all, > >> > >> Firstly, sorry if this isn't entirely the correct place to post this, > > I think acpi@ would be the better place (forwarded). > > > >> for starters I'm not sure whether this problem is limited to -CURRENT > >> and / or 7.0 or not. Tried to have a look at fixing it myself, but I'm > >> not l33t enough! :-) > >> > >> On my Compaq Presario B3820 (PV142PA#ABG) laptop, I override the > >> hw.acpi.thermal.tz0._PSV value because the default is the temperature at > >> which the CPU is halted by the hardware until the temperature settles > >> down. Since this gets triggered fairly often and is pretty annoying, I > >> lower the trigger temperature level and have powerd(8) work > >> passive-cooling-shaped magic. > >> > >> However, disconnecting or reconnecting AC power resets the value to the > >> BIOS provided level. > >> > >> Would anyone be able to offer assistance with this? It's not too big a > >> deal, I just have to remember to set the appropriate value again if the > >> power state changes. > >> > > At the very least, you do not have to remember to do this: at the bottom > > of /etc/devd.conf there is an example on how to associate your custom > > script with AC state changes. Look for something like: > > > > # This example calls a script when the AC state changes, passing the > > # notify value as the first argument. If the state is 0x00, it might > > # call some sysctls to implement economy mode. If 0x01, it might set > > # the mode to performance. > > notify 10 { > > match "system" "ACPI"; > > match "subsystem" "ACAD"; > > action "/etc/acpi_ac $notify"; > > }; > > > > As to changing _PSV value for good: you can dump your ASL (look for > > instructions in the Handbook), then look for something like > > > > Method (_PSV, 0, NotSerialized) > > { > > Return (0xE30) > > } > > > > modify value, remembering that = * 10 + 2732, > > recompile your ASL and override it on boot (handbook comes handy there as well). > > Alexandre, thank you for your detailed and accurate reply. I really > appreciate the work of users in helping share information about acpi. > If you ever want to submit examples for the acpi section of the > handbook, this kind of FAQ would be useful. One issue, btw, with the "ACAD" example is that you can't easily hook multiple actions to a single event. For example, it would be nice if I could have ataidle change the power settings for my hard drive when I was on battery, but I'd have to have my script call /etc/rc.d/power_profile to not lose the existing power profile stuff, and that doesn't allow for scaling in an automated way (i.e. having ports add a file under /usr/local/etc somewhere to hook into the power profile stuff). -- John Baldwin