Chapter 3. CPU

The pentium mobile supports "speedstepping" which means that you can throttle it to save power. To activate it, just enable the following options:

Power management options (ACPI, APM)  --->
  CPU Frequency scaling  --->
    CPU Frequency scaling
    Default CPUFreq governor (userspace)
    'performance' governor
    'powersave' governor
    CPU frequency table helpers
    Intel Enhanced SpeedStep

Now you can control the speed of your cpu like this:

echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

sets the processor to the minimum of 600MHz and

echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 1600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

sets it to the maximum of 1.6GHz.

Together with ACPI it is a real power saver: If my laptop is on battery, it runs with 600MHz, and as I plug in the cable, it instantly switches to 1.6GHz. For this I wrote some small scripts:

In /etc/acpi/ I defined the action for the battery switch:


with the /scripts/switchspeed being the following:

if [ $batstate == "cable" ] ; then
        echo "CPU@performance - we're on cable"
        logger "CPU@performance - we're on cable"
        echo "CPU@minimum - we're on battery"
        logger "CPU@minimum - we're on battery"

The /scripts/battery-cable checks if we are on cable or on battery:

echo `cat /proc/acpi/ac_adapter/ACAD/state | sed s/^.*off.*$/battery/ | sed s/^.*on.*$/cable/`

I know that there is a predefined battery-script in /etc/acpi, but I noticed that too late... ;)

Now my laptop runs approx. 5 hours on battery, and the longest time (I forgot to plug in the cable over night) at university was 4 whole lectures (6 hours), but with closing the lid everytime there was nothing to write... And without wlan and such things.