1 |
On Feb 19, 2008 12:09 PM, Florian Philipp <lists@f_philipp.fastmail.net> |
2 |
wrote: |
3 |
|
4 |
> |
5 |
> On Tue, 2008-02-19 at 11:28 +0100, b.n. wrote: |
6 |
> > Lowe Schmidt ha scritto: |
7 |
> > > Hi. |
8 |
> > > |
9 |
> > > I'm planning on buying myself a MacBook and I'm just wondering if |
10 |
> anyone |
11 |
> > > knows how many hours I will get out of it if I run Gentoo. I mainly |
12 |
> use |
13 |
> > > a bunch |
14 |
> > > of terminals, gvim and some lightweigth gtk app so nothing heavy going |
15 |
> on. |
16 |
> > > |
17 |
> > > All input appreciated |
18 |
> > |
19 |
> > My Macbook Pro with light, normal usage lasts about three hours (OS X |
20 |
> > lasts at least one hour more). |
21 |
> > |
22 |
> > m. |
23 |
> |
24 |
> Have you found any reason for this discrepancy? I'd suspect them to be |
25 |
> on par with the right tuning. |
26 |
> |
27 |
|
28 |
Are you doing any kind of CPU frequency scaling? In the kernel (I use gentoo |
29 |
sources) configuration enable |
30 |
|
31 |
Power Management |
32 |
- CPU frequency scaling |
33 |
- performance (is selected as default) |
34 |
- ondemand governor |
35 |
- conservative |
36 |
- ACPI Processor P-States driver |
37 |
- Intel Enhanced SpeedStep |
38 |
|
39 |
This enables frequency scaling... this works for my Core2 desktop so I |
40 |
suspect it should work for the mac book too. |
41 |
|
42 |
To select the actual cpu scaling governor to use, you can do the following |
43 |
(as root) |
44 |
|
45 |
echo ondemand > /sys/devices/system/cpu/cpu(n)/cpufreq/scaling_governor |
46 |
|
47 |
where you need to this for all the cores... for my Core 2 desktop I have |
48 |
cpu0 and cpu1. |
49 |
You can select between ondemand, conservative and performance. Try both |
50 |
ondemand and conservative... My guess is there will be little difference in |
51 |
power consumption between the two and ondemand may be better for response |
52 |
time sensitive loads (typical desktop usage). |
53 |
|
54 |
I keep the above command in /etc/conf.d/local.start so that I get the CPU |
55 |
freq scaling goodness on every boot :) |
56 |
|
57 |
# /etc/conf.d/local.start |
58 |
|
59 |
# This is a good place to load any misc programs |
60 |
# on startup (use &>/dev/null to hide output) |
61 |
|
62 |
gov=ondemand |
63 |
|
64 |
echo "Switching to the '$gov' cpu frequency scaling governer." |
65 |
echo $gov > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor |
66 |
echo $gov > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor |
67 |
|
68 |
_r |