Writing Tux Daemon
- Linux On Mobile Computers - -> Linux Mobile Guide

CPU

A survey about CPUs used in mobile devices, which are supported by Linux you may find in the "Which Laptop to Buy?" chapter above.

SpeedStep

Speedstep is a feature of recent CPUs made by Intel, which lets you set CPU frequency. There are different Linux tools to get this to work. Similar features are also available for other CPUs from AMD or the StrongARM CPU, I will describe this in a later issue (assistance welcome).

Before configuring SpeedStep have a look into the BIOS options.

SpeedStep Tool

The SpeedStep tool works with Mobile Pentium-III CPUs only. See output from cat /proc/cpuinfo:

   model name : Intel(R) Pentium(R) III Mobile CPU 1000MHz

It does not work with the mobile version of the Pentium-III:

   model name : Pentium III (Coppermine)

CPUFREQ

You might want to check into the cpufreq patch for the linux-2.4/2.5 kernels, maybe it works for your machine. CPU clock frequency scaling for Linux, for x86 and ARM based processors. This module provides a user-space and standard kernel-space interface to this feature, allong ARM system-on-a-chip devices to cope with processor clock changes. Since the power consumed by a processor is directly related to the speed at which it is running, keeping the clock speed as low as possible allows you to get more run-time out of your battery. Some people use this to adjust their clock speed many times a second to optimise performance vs battery life. See also the CVS repository.

cpufreqd

cpufreqd is meant to be a replacement of the speedstep applet you can find on some other operating systems, it monitors battery level, AC state and running programs and adjusts the frequency governor according to a set of rules specified in the config file. It works both with APM and ACPI.

cpudyn

cpudyn controls the speed in Intel SpeedStep and PowerPC machines with the cpufreq compiled in the kernel. It saves battery and lowers temperature, without affecting the performance of interactive applications.

SONY VAIO SPIC Daemon

The SONY VAIO SPIC daemon is a fast and small hack for create a working apmd to Sony VAIO laptops. It uses the sonypi kernel module to detect the AC adapter status and the LCD backlight, and cpufreq for CPU frequency change. CPU frequency scaling. Certain processors have the facility to scale their voltage/clockspeed. 2.5 introduces an interface to this feature, see Documentation/cpufreq for more information. This functionality also covers features like Intel's speedstep, and will be extended in time to cover the Powernow feature present in mobile Athlons. ~

CPUIDLE

A software utility that will make your CPU run cooler? Sounds pretty strange, huh? Let me explain: Have you ever thought of the fact that your CPU is idle most of the time when you're using your computer? For example, when you're using your word processor, writing emails, browsing the web, the CPU does nothing else than just wait for user input. In fact, it will use up to 30W and produce substantial amounts of heat doing nothing. Good operating systems, like Linux, NT and OS/2 have a so-called "idle loop" - a loop that's always executed when the CPU has nothing to do. This loop consists of halt (HLT) instructions. CPUs like the AMD K6, the Cyrix 6x86 and 6x86MX have a special feature called "suspend-on-halt". This means that everytime the CPU executes a hlt instruction, it will go into "suspend mode" for a short time. So, while the idle loop is being executed, the CPU will be in suspend mode, use much less power, and stay much cooler. Of course, this does not affect performance at all! The user won't even notice that his CPU is in suspend mode most of the time (unless he touches the heatsink).

autospeedstep

autospeedstep is a daemon that controls power consumption and processor speed depending of the CPU load. It works with Intel Speedstep CPUs and Linux kernels running the 2.5 ACPI backport.

ACPI

If you have enabled ACPI support in the Kernel you may also set the SpeedStep parameters via the /proc/apci/ interface, e.g. echo 1 > /proc/acpi/processor/CPU0/performance will make the CPU speed down. Note: the spaces in the command are important! Or use this script provided by Sebastian Henschel.

#! /bin/sh

# /etc/init.d/slowcpu: slow down cpu or accelerate it via speedstep

test -e /proc/acpi/processor/CPU0/performance || exit 0

case "$1" in
    start)
    echo "Setting CPU0-Speed to: 733 MHz."
    echo 1 > /proc/acpi/processor/CPU0/performance
	;;
    stop)
    echo "Setting CPU0-Speed to: 1133 MHz."
    echo 0 > /proc/acpi/processor/CPU0/performance
	;;
    force-reload|restart)
	;;

    *)
	echo "Usage: $0 {start|stop}"
	exit 1
esac

exit 0