old-www/LDP/Mobile-Guide/html/mobile-guide-p2c1s1-cpu.html

520 lines
10 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>CPU</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Linux on the Road"
HREF="index.html"><LINK
REL="UP"
TITLE="Hardware in Detail: CPU, Display, Keyboard, Sound and More"
HREF="mobile-guide-p2c1-hardware-in-detail.html"><LINK
REL="PREVIOUS"
TITLE="BIOS"
HREF="mobile-guide-p2c1s1-bios.html"><LINK
REL="NEXT"
TITLE="Centrino(tm), Centrino-Duo(tm)"
HREF="mobile-guide-p2c1s1-centrino.html"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux on the Road: </TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="mobile-guide-p2c1s1-bios.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 12. Hardware in Detail: CPU, Display, Keyboard, Sound and More</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="mobile-guide-p2c1s1-centrino.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="mobile-guide-p2c1s1-cpu"
></A
>12.3. CPU</H1
><P
>&#13; You may find a survey about CPUs used in mobile devices, which are Linux-supported
in the chapter
<A
HREF="mobile-guide-p1c1-which-laptop-to-buy.html"
>Chapter 1</A
> Which Laptop to Buy? above.
</P
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN1761"
></A
>12.3.1. SpeedStep</H2
><P
>&#13; 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).
</P
><P
>&#13; Before configuring SpeedStep have a look into the BIOS options.
</P
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="AEN1765"
></A
>12.3.1.1. SpeedStep Tool</H3
><P
>&#13; The
<A
HREF="http://www.goof.com/pcg/marc/speedstep.html"
TARGET="_top"
>SpeedStep</A
>
tool works with Mobile Pentium-III CPUs only. See output from
<B
CLASS="command"
>cat /proc/cpuinfo</B
>:
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13; model name : Intel(R) Pentium(R) III Mobile CPU 1000MHz
</PRE
></FONT
></TD
></TR
></TABLE
>
It does not work with the mobile version of the Pentium-III:
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13; model name : Pentium III (Coppermine)
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="AEN1772"
></A
>12.3.1.2. CPUFREQ</H3
><P
>&#13; You might want to check into the
<A
HREF="http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufreq.html"
TARGET="_top"
>cpufreq</A
>
patch for the linux-2.4/2.5 kernels:
CPU clock frequency scaling for Linux, on x86 and ARM based
processors. This module provides a user-space and standard kernel-space
interface to this feature, along 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
<A
HREF="http://www.arm.linux.org.uk/cvs/"
TARGET="_top"
>CVS repository</A
>
.
</P
><DIV
CLASS="sect4"
><H4
CLASS="sect4"
><A
NAME="AEN1777"
></A
>12.3.1.2.1. cpufreqd</H4
><P
>&#13; <A
HREF="http://www.sf.net/projects/cpufreqd"
TARGET="_top"
>cpufreqd</A
>
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.
</P
></DIV
><DIV
CLASS="sect4"
><H4
CLASS="sect4"
><A
NAME="AEN1781"
></A
>12.3.1.2.2. cpudyn</H4
><P
>&#13; <A
HREF="http://mnm.uib.es/~gallir/cpudyn/"
TARGET="_top"
>cpudyn</A
>
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.
</P
></DIV
><DIV
CLASS="sect4"
><H4
CLASS="sect4"
><A
NAME="AEN1785"
></A
>12.3.1.2.3. cpuspeedy</H4
><P
>&#13; <A
HREF="http://cpuspeedy.sourceforge.net"
TARGET="_top"
>cpuspeedy</A
>
allows you to change the clock speed and voltage of CPUs
using Linux's CPUFreq driver. It is a user space program, so it will work
on every processor supported by the kernel's CPUFreq driver.
</P
></DIV
><DIV
CLASS="sect4"
><H4
CLASS="sect4"
><A
NAME="AEN1789"
></A
>12.3.1.2.4. powernowd</H4
><P
>&#13; <A
HREF="http://www.deater.net/john/powernowd.html"
TARGET="_top"
>PowerNowd</A
>
is a simple client daemon for the Linux cpufreq driver
using the sysfs interface. It sits in the background and changes CPU
speed in configurable "steps" according to usage. Written in C, its
emphasis is on speed and simplicity. It is very configurable, and
supports non-x86 and SMP systems.
</P
></DIV
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="AEN1793"
></A
>12.3.1.3. Laptop Mode</H3
><P
>&#13; <A
HREF="http://samwel.tk/laptop_mode/"
TARGET="_top"
>Laptop mode</A
>
is a kernel "mode" that allows you to extend the battery life of
your laptop. It does this by intelligently grouping write activity on your
disks, so that only reads of uncached data result in a disk spinup. It has
been reported to cause a significant improvement in battery life (for usage
patterns that allow it).
</P
><P
>&#13; The
<A
HREF="http://samwel.tk/laptop_mode/"
TARGET="_top"
>Laptop Mode Tools</A
>
package spins down your hard drive like noflushd,
but it works also on journalling filesystems. It integrates with
apmd/acpid/pbbuttonsd to enable this behaviour only when you are running
on battery power. It also adjusts some hdparm settings and remounts your
filesystems noatime, and it can adjust your maximum CPU frequency.
</P
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="AEN1799"
></A
>12.3.1.4. SONY VAIO SPIC Daemon</H3
><P
>&#13; The
<A
HREF="http://spicd.raszi.hu/"
TARGET="_top"
>SONY VAIO SPIC daemon</A
>
is a fast and small hack to create a
working apmd to Sony VAIO laptops. It uses the
<B
CLASS="command"
>sonypi</B
> kernel module to
detect the AC adapter status and the LCD backlight, and cpufreq for
CPU frequency scaling.
</P
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="AEN1804"
></A
>12.3.1.5. CPUIDLE</H3
><P
>&#13;
A
<A
HREF="http://www.heatsink-guide.com/cpuidle.htm"
TARGET="_top"
>software utility</A
>
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).
</P
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="AEN1808"
></A
>12.3.1.6. ACPI</H3
><P
>&#13; If you have enabled ACPI support in the Kernel you
may also set the SpeedStep parameters via the
<TT
CLASS="filename"
>/proc/apci/</TT
> interface, e.g.
<B
CLASS="command"
>echo 1 &#62; /proc/acpi/processor/CPU0/performance</B
>
will make the CPU speed down.
Note: the spaces in the command are important!
Note also: this feature is deprecated for Kernel &#62; 2.6.11.
Or use this script provided by Sebastian Henschel.
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;#! /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 &#62; /proc/acpi/processor/CPU0/performance
;;
stop)
echo "Setting CPU0-Speed to: 1133 MHz."
echo 0 &#62; /proc/acpi/processor/CPU0/performance
;;
force-reload|restart)
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="mobile-guide-p2c1s1-bios.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="mobile-guide-p2c1s1-centrino.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>BIOS</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="mobile-guide-p2c1-hardware-in-detail.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Centrino(tm), Centrino-Duo(tm)</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>