Gentoo Archives: gentoo-laptop

From: Thomas Tuttle <tom@×××××××××××××××××××××××.org>
To: gentoo-laptop@l.g.o
Subject: Re: [gentoo-laptop] powermgr: Unified power management for Gentoo
Date: Wed, 27 Jul 2005 14:48:44
Message-Id: 1122475673.18402.5.camel@localhost
In Reply to: Re: [gentoo-laptop] powermgr: Unified power management for Gentoo by Devon Miller
1 Okay, the best way to do that would be to (using powermgr) create a
2 profile named "hot" and then write your script like so:
3
4 #!/bin/pseudocode-interpreter
5 if (TEMP > $HOT) {
6 echo "System is actually hot, slowing everything down.";
7 powermgr --profile hot;
8 sleep 5;
9 if (TEMP > $HOT) {
10 echo "System is about to explode, shutting down.";
11 poweroff;
12 } else {
13 echo "System has cooled down, returning to normal."
14 powermgr --auto;
15 }
16 } else {
17 echo "System is just being foolish and is not hot.";
18 }
19
20 The "hot" profile would probably look like this:
21
22 Profile hot
23 cpu frequency = 0%
24 EndProfile
25
26 That way it would slow down the CPU frequency without playing with other
27 stuff like brightness.
28
29 On Wed, 2005-07-27 at 10:33 -0400, Devon Miller wrote:
30 > Thanks Thomas, I'll definitely check it out. One feature I would like
31 > to see is the ability to throttle the cpu to manage temperature.
32 >
33 > My laptop occasionally reports spurious high temperatures. Within 3
34 > polls the temperature might be reported as 70C, 97C, 70C. When the
35 > kernel sees the 97C it powers off the system.
36 >
37 > I've hacked around this by patching the kernel to run /sbin/overheat
38 > instead of /sbin/poweroff. Overheat checks the temp again and if it's
39 > still hot, shuts down powernowd and sets the cpufreq to its minimum
40 > value It then sleeps for 5 seconds and if the temp is still 90C+,
41 > calls poweroff.
42 >
43 > The downside is the system is now left in a very slow state. I have
44 > not written something to bring it back to a dynamic clocking state. A
45 > daemon that would manage all of this would be really appreciated! (Of
46 > course, the kernel would still need to be patched to not poweroff
47 > until the daemon has had a chance to try cooling things down.)
48 >
49 > <dcm>
50 >
51 >
52 > On 7/13/05, Thomas Tuttle <tom@×××××××××××××××××××××××.org> wrote:
53 > I've been working on a program called powermgr. It's a daemon
54 > written
55 > in Perl that can control many power management functions on
56 > Linux,
57 > including CPU frequency and/or governor, screen brightness,
58 > laptop mode,
59 > fan speed, wireless power management, as well as runlevel and
60 > services,
61 > based on the state of the system.
62 >

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-laptop] powermgr: Unified power management for Gentoo Fernando Meira <fmeira@×××××.com>