On Feb 19, 2008 12:09 PM, Florian Philipp <lists@f_philipp.fastmail.net> wrote:

On Tue, 2008-02-19 at 11:28 +0100, b.n. wrote:
> Lowe Schmidt ha scritto:
> > Hi.
> >
> > I'm planning on buying myself a MacBook and I'm just wondering if anyone
> > knows how many hours I will get out of it if I run Gentoo. I mainly use
> > a bunch
> > of terminals, gvim and some lightweigth gtk app so nothing heavy going on.
> >
> > All input appreciated
>
> My Macbook Pro with light, normal usage lasts about three hours (OS X
> lasts at least one hour more).
>
> m.

Have you found any reason for this discrepancy? I'd suspect them to be
on par with the right tuning.

Are you doing any kind of CPU frequency scaling? In the kernel (I use gentoo sources) configuration enable

Power Management
    - CPU frequency scaling
        - performance (is selected as default)
        - ondemand governor
        - conservative
        - ACPI Processor P-States driver
        - Intel Enhanced SpeedStep

This enables frequency scaling... this works for my Core2 desktop so I suspect it should work for the mac book too.

To select the actual cpu scaling governor to use, you can do the following (as root)

echo ondemand > /sys/devices/system/cpu/cpu(n)/cpufreq/scaling_governor

where you need to this for all the cores... for my Core 2 desktop I have cpu0 and cpu1.
You can select between ondemand, conservative and performance. Try both ondemand and conservative... My guess is there will be little difference in power consumption between the two and ondemand may be better for response time sensitive loads (typical desktop usage).

I keep the above command in /etc/conf.d/local.start so that I get the CPU freq scaling goodness on every boot :)

# /etc/conf.d/local.start

# This is a good place to load any misc programs
# on startup (use &>/dev/null to hide output)

gov=ondemand

echo "Switching to the '$gov' cpu frequency scaling governer."
echo $gov > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $gov > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

_r