Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Dec 2003 16:26:46 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Nate Lawson <nate@root.org>
Cc:        acpi-jp@jp.freebsd.org
Subject:   RE: Power profile script
Message-ID:  <XFMail.20031215162646.jhb@FreeBSD.org>
In-Reply-To: <20031213130351.N59162@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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 <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20031215162646.jhb>