1 |
Thanks to everybody who answered my questions; I've got it working. |
2 |
This mailing list seems to reject emails with executable attachments, |
3 |
so I had to convert it to a .txt file before attaching the script to |
4 |
this post. Instructions for making it runnable... |
5 |
1) gunzip or zcat the attachment to extract cpugov.txt |
6 |
2) rename it to cpugov |
7 |
3) insert the line... |
8 |
|
9 |
#!/bin/bash |
10 |
|
11 |
...as the first line at the top of the file |
12 |
4) chmod 755 cpugov |
13 |
5) move it to /usr/local/bin or other appropriate subdirectory |
14 |
|
15 |
The script understands 2 options... |
16 |
cpugov list |
17 |
cpugov set |
18 |
|
19 |
The "list" option can be run by an ordinary user. It lists available |
20 |
options. |
21 |
|
22 |
The "set" option needs to write to /sys pseudo-file space, and |
23 |
therefore requires root or su/sudo permissions. It lists available |
24 |
options, and waits for you to enter a number and hit <ENTER> to select |
25 |
that option. |
26 |
|
27 |
If the current governor is "userspace", available speeds will be |
28 |
listed as well. If you don't see speeds listed, you need to first... |
29 |
|
30 |
cpugov set |
31 |
|
32 |
...and select the number corresponding to "userspace". Then run cpugov |
33 |
again. I don't see a major need for specific speed selection, but I |
34 |
included it for completeness. The governors should handle your needs as |
35 |
follows... |
36 |
|
37 |
* powersave - runs CPUs at slowest speeds for longest battery life |
38 |
|
39 |
* performance - runs CPUs at maximum speeds. Work gets done faster |
40 |
but the battery discharges faster, too. |
41 |
|
42 |
* conservative - this is the recommended governor. It gradually adjusts |
43 |
speeds to match workload |
44 |
|
45 |
For completeness, the remaining 2 governors are... |
46 |
|
47 |
* ondemand - similar to conservative, but reacts faster. |
48 |
|
49 |
* userspace - you're in charge. You get to pick-n-choose the speeds you |
50 |
want when you want them. |
51 |
|
52 |
-- |
53 |
Walter Dnes <waltdnes@××××××××.org> |
54 |
I don't run "desktop environments"; I run useful applications |