From owner-freebsd-arch@FreeBSD.ORG Mon Dec 15 13:26:48 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 97DC016A4CE for ; Mon, 15 Dec 2003 13:26:48 -0800 (PST) Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F61D43D1F for ; Mon, 15 Dec 2003 13:26:47 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 1811 invoked from network); 15 Dec 2003 21:26:46 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 15 Dec 2003 21:26:46 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id hBFLQiM0008267; Mon, 15 Dec 2003 16:26:44 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20031213130351.N59162@root.org> Date: Mon, 15 Dec 2003 16:26:46 -0500 (EST) From: John Baldwin To: Nate Lawson X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: arch@freebsd.org cc: acpi-jp@jp.freebsd.org Subject: RE: Power profile script X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2003 21:26:48 -0000 On 13-Dec-2003 Nate Lawson wrote: > I've implemented a script for changing power profiles in userland when you > go on or off AC power. The defaults will just change the CPU idle states > to the lowest power ones when off AC power. Throttling will stay at 100%. > Of course, the user can override these in rc.conf. In the future, other > power profile features will be maintained by the same script. You have to > be running devd to use this. > > The special values LOW and HIGH refer to the lowest and highest performing > settings for a given sysctl. So if a system has 8 throttling values, from > 1 to 8, HIGH would be 8 and LOW would be 1. You can also specify a > particular value ("2") if you know what you want. > > I'm mostly looking for style input on the /etc/power_profile script since > I'm not familiar with our scripting guidelines. Note that it's called > from devd (or manually by the user) and is not an rc.d boot-time thing. This looks really cool! I do think Mike's suggestions on moving this to /etc/rc.d/ and using functions from /etc/rc.subr might be a good thing to do. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/