old-www/HOWTO/Athlon-Powersaving-HOWTO/approaches.html

668 lines
14 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>The Different Approaches</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Athlon Powersaving HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Introduction"
HREF="intro.html"><LINK
REL="NEXT"
TITLE="What Else?"
HREF="else.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"
>Athlon Powersaving HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="intro.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="else.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="approaches"
></A
>2. The Different Approaches</H1
><P
>&#13; In the following section I present different approaches to achieve the same goal:
power-saving on your Athlon/Athlon-XP based system. My recommended approach at the
moment is to use the <SPAN
CLASS="QUOTE"
>"command-line hack"</SPAN
> or the athcool programm (the kernel patch
is outdated and will not be developed any further, and the
LVCool patch supports only one chipset family.)
</P
><P
>&#13; Nearly all of these approaches will set the <SPAN
CLASS="QUOTE"
>"
Disconnect enable when STPGNT detected"</SPAN
> bit
in the north bridge of the chipset. All other work is done by the ACPI subsystem of
the kernel which sends a STPGNT signal to the processor, when it enters the acpi-c2 idle
mode.
</P
><P
>&#13; If you haven't already got a kernel with ACPI support, you have to enable it in
the kernel setup and then recompile the new kernel. You'll find the
ACPI-options under <SPAN
CLASS="guimenu"
>General Setup</SPAN
>+<SPAN
CLASS="guimenu"
>Power Management Setup</SPAN
>-&gt;<SPAN
CLASS="guimenuitem"
>ACPI</SPAN
>. You must have at least the following options: <SPAN
CLASS="guimenuitem"
>ACPI Bus Manager</SPAN
>, <SPAN
CLASS="guimenuitem"
>System</SPAN
> and <SPAN
CLASS="guimenuitem"
>Processor.</SPAN
>
</P
><P
>&#13; Or for the new 2.4.22 Kernel: <SPAN
CLASS="guimenu"
>General Setup</SPAN
>+<SPAN
CLASS="guimenu"
>ACPI Support</SPAN
>. You must have at least the following option: <SPAN
CLASS="guimenuitem"
>Processor</SPAN
>.
</P
><P
>2.6.x Kernel: <SPAN
CLASS="guimenu"
>Powermanagment options</SPAN
>+<SPAN
CLASS="guimenu"
>ACPI</SPAN
>. You must have at least the option <SPAN
CLASS="guimenuitem"
>Processor</SPAN
> enabled. You shouldn't enable Thermal Zone !!
</P
><P
>&#13; Some Chipsets also support a STPGNT if a HLT signal is detected. This Motherboards/Chipsets
don't need ACPI to be enabled! At the moment i look for feedback which Chipsets work without
ACPI and which need ACPI. Maybee you could test it on your Motherboard and send me a mail.
(see <A
HREF="else.html#testing"
>Section 3.1</A
>)
</P
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="commandline"
></A
>2.1. The Command-line Hack (recommended)</H2
><P
>&#13; To use the command-line hack you normaly have to enable ACPI in the kernel, otherwise it is mentioned. No reboot is needed to enable the Powersaving. You could enable/disable it from the command line with this commands:
</P
><P
>&#13; <P
></P
><DIV
CLASS="variablelist"
><DL
><DT
>on KT133/133A, KX133, KL/KLE133, KM/KN133, ...: (needs definitively acpi enabled)</DT
><DD
><P
>&#13; enable: <B
CLASS="command"
>setpci -v -H1 -s 0:0.0 52=$(printf %x $((0x$(setpci -H1 -s 0:0.0 52) | 0x80)))</B
>
</P
><P
>&#13; disable: <B
CLASS="command"
>setpci -v -H1 -s 0:0.0 52=$(printf %x $((0x$(setpci -H1 -s 0:0.0 52) &#38; 0x7f)))</B
>
</P
></DD
><DT
>on KT266/266A/333,KM266/266A/333, ...:</DT
><DD
><P
>enable:</P
><P
><B
CLASS="command"
>setpci -v -H1 -s 0:0.0 92=$(printf %x $((0x$(setpci -H1 -s 0:0.0 92) | 0x80)))</B
></P
><P
><B
CLASS="command"
>setpci -v -H1 -s 0:0.0 95=$(printf %x $((0x$(setpci -H1 -s 0:0.0 95) | 0x02)))</B
></P
><P
>disable:</P
><P
><B
CLASS="command"
>setpci -v -H1 -s 0:0.0 92=$(printf %x $((0x$(setpci -H1 -s 0:0.0 92) &#38; 0x7f)))</B
></P
><P
><B
CLASS="command"
>setpci -v -H1 -s 0:0.0 95=$(printf %x $((0x$(setpci -H1 -s 0:0.0 95) &#38; 0xfd)))</B
></P
></DD
><DT
>on KT333CF/KT400/KT400A/KM400/KM400A/KT600:</DT
><DD
><P
>enable:</P
><P
><B
CLASS="command"
>setpci -v -H1 -s 0:0.0 D2=$(printf %x $((0x$(setpci -H1 -s 0:0.0 D2) | 0x80)))</B
></P
><P
><B
CLASS="command"
>setpci -v -H1 -s 0:0.0 D5=$(printf %x $((0x$(setpci -H1 -s 0:0.0 D5) | 0x02)))</B
></P
><P
>disable:</P
><P
><B
CLASS="command"
>setpci -v -H1 -s 0:0.0 D2=$(printf %x $((0x$(setpci -H1 -s 0:0.0 D2) &#38; 0x7f)))</B
></P
><P
><B
CLASS="command"
>setpci -v -H1 -s 0:0.0 D5=$(printf %x $((0x$(setpci -H1 -s 0:0.0 D5) &#38; 0xfd)))</B
></P
></DD
><DT
>on KT880:</DT
><DD
><P
>enable:</P
><P
><B
CLASS="command"
>setpci -v -H1 -s 0:0.0 82=$(printf %x $((0x$(setpci -H1 -s 0:0.0 82) | 0x80)))</B
></P
><P
><B
CLASS="command"
>setpci -v -H1 -s 0:0.0 85=$(printf %x $((0x$(setpci -H1 -s 0:0.0 85) | 0x02)))</B
></P
><P
>disable:</P
><P
><B
CLASS="command"
>setpci -v -H1 -s 0:0.0 82=$(printf %x $((0x$(setpci -H1 -s 0:0.0 82) &#38; 0x7f)))</B
></P
><P
><B
CLASS="command"
>setpci -v -H1 -s 0:0.0 85=$(printf %x $((0x$(setpci -H1 -s 0:0.0 85) &#38; 0xfd)))</B
></P
></DD
><DT
>on SIS730/733:</DT
><DD
><P
>enable: <B
CLASS="command"
>setpci -v -H1 -s 0:0.0 6B=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6B) | 0x01)))</B
></P
><P
>disable: <B
CLASS="command"
>setpci -v -H1 -s 0:0.0 6B=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6B) &#38; 0xfe)))</B
></P
></DD
><DT
>on SIS735/740/745/755:</DT
><DD
><P
>enable: <B
CLASS="command"
>setpci -v -H1 -s 0:0.0 6A=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6A) | 0x0003)))</B
></P
><P
>disable: <B
CLASS="command"
>setpci -v -H1 -s 0:0.0 6A=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6A) &#38; 0xfffc)))</B
></P
></DD
><DT
>on SIS741/741GX/746/748:</DT
><DD
><P
><B
CLASS="command"
>setpci -v -H1 -s 0:0.0 6C=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6C) | 0x0003)))</B
></P
><P
>disable:</P
><P
><B
CLASS="command"
>setpci -v -H1 -s 0:0.0 6C=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6C) &#38; 0xfffc)))</B
></P
></DD
><DT
>on Nforce:</DT
><DD
><P
>enable:</P
><P
><B
CLASS="command"
>setpci -v -H1 -s 0:0.0 E7=$(printf %x $((0x$(setpci -H1 -s 0:0.0 E7) | 0x06)))</B
></P
><P
>disable:</P
><P
><B
CLASS="command"
>setpci -v -H1 -s 0:0.0 E7=$(printf %x $((0x$(setpci -H1 -s 0:0.0 E7) &#38; 0xf9)))</B
></P
></DD
><DT
>on Nforce2: (works without acpi enabled)</DT
><DD
><P
>enable: <B
CLASS="command"
>setpci -v -H1 -s 0:0.0 6F=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6F) | 0x10)))</B
></P
><P
>disable: <B
CLASS="command"
>setpci -v -H1 -s 0:0.0 6F=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6F) &#38; 0xef)))</B
></P
></DD
><DT
>on AMD751 and AMD760/761:(not for the 760MP!!!)(works without acpi enabled)</DT
><DD
><P
>&#13; enable: <B
CLASS="command"
>setpci -v -s 0:0.0 0x62=$(printf %x $((0x$(setpci -H1 -s 0:0.0 62) | 0x06)))</B
>
</P
><P
>&#13; disable: <B
CLASS="command"
>setpci -v -s 0:0.0 0x62=$(printf %x $((0x$(setpci -H1 -s 0:0.0 62) &#38; 0xf9)))</B
>
</P
></DD
></DL
></DIV
>
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="coolrun"
></A
>2.2. The coolrun shellscript (recommended)</H2
><P
>&#13; <EM
>coolrun</EM
> is a small shellscript which uses the command line hacks and does all the work for you. It is developed/maintened
by Grozdan Nikolov and based on this HOWTO.
</P
><P
>&#13; You can read more about it (and download it) here:
<A
HREF="https://sourceforge.net/projects/coolrun/"
TARGET="_top"
>&#13; https://sourceforge.net/projects/coolrun/</A
>
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="athcool"
></A
>2.3. The Athcool Program (recommended)</H2
><P
>&#13; <EM
>Athcool</EM
> is a small program which performs the same
task as the <B
CLASS="command"
>setpci</B
> commands above. It supports the same
chipsets and detects what chipset you have, issuing the right settings
in the chipset to get the power-saving to work.
</P
><P
>&#13; You can read more about it (and download it) here:
<A
HREF="http://members.jcom.home.ne.jp/jacobi/linux/softwares.html"
TARGET="_top"
>&#13; http://members.jcom.home.ne.jp/jacobi/linux/softwares.html</A
> <EM
>I am not the Author
of this program!</EM
>
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="biosup"
></A
>2.4. BIOS updates</H2
><P
>&#13; On some newer boards the manufacturer provides a BIOS update which sets
the needed bit/bits in the chipset of the board (or let you choose in
the BIOS-setup whether it should be enabled). Refer to the homepage of
your motherboard manufacturer to see if such a BIOS-update is available.
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="patch"
></A
>2.5. Kernel Patches</H2
><P
>&#13; The patch is based on another patch (from Jan Niehusmann) I found on the
Newsnet. I modified the patch to also support the KT266/266A chipset.
By the way, my patch does the same as the command-line hack, except that
the Patch does it from
within the kernel. This is why I recommend using the command-line hack,
which is really simple to use and you don't have to modify your kernel.
</P
><DIV
CLASS="procedure"
><P
><B
>Ok... now step by step, here's how to apply the patch:</B
></P
><OL
TYPE="1"
><LI
><P
>&#13; First you have to download the patch: </P
><P
><A
HREF="http://www.daniel.nofftz.net/linux/amd_cool.diff"
TARGET="_top"
>&#13; Kernel Patch for 2.4.17</A
></P
><P
><A
HREF="http://www.daniel.nofftz.net/linux/amd_cool.linux-2.4.21.diff"
TARGET="_top"
>&#13; Kernel Patch for 2.4.21</A
> (thx to Thomas Reinhardt for porting it to 2.4.21)</P
><P
><A
HREF="http://www.daniel.nofftz.net/linux/amd_cool.linux-2.6.5.diff"
TARGET="_top"
>&#13; Kernel Patch for 2.6.5</A
> which supports all Via Chipsets up to the KT600 (thx to Sebastian Droege for porting it to 2.6.5 and adding the other Chipsets)</P
><P
><A
HREF="http://www.daniel.nofftz.net/linux/amd_cool.linux-2.6.9.diff"
TARGET="_top"
>&#13; Kernel Patch for 2.6.9</A
> which supports all Via Chipsets up to the KT600 (thx to Alexander Hug for porting it from 2.6.5 to 2.6.9)</P
></LI
><LI
><P
>&#13; Login as root
</P
></LI
><LI
><P
>&#13; <B
CLASS="command"
>cd /usr/src</B
>
</P
></LI
><LI
><P
>&#13; Apply the patch: <B
CLASS="command"
>cat $path-to-patch/amd_cool.diff | patch -p0</B
>
(The new 2.6.5 Patch: cd to linux and patch -p1)
</P
></LI
><LI
><P
>&#13; <B
CLASS="command"
>cd linux</B
>
</P
></LI
><LI
><P
>&#13; Make the new kernel
</P
></LI
><LI
><P
>&#13; Reboot, and at the kernel boot-prompt, enter the statement <TT
CLASS="userinput"
><B
> amd_disconnect=yes </B
></TT
>. This is because there are known bugs within the Athlon processor, which could cause problems on several boards. You should test the patch, and if it works, you can append the statement <TT
CLASS="userinput"
><B
> amd_disconnect=yes </B
></TT
> to the file <TT
CLASS="filename"
>/etc/lilo.conf</TT
>.
</P
></LI
></OL
></DIV
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="lvcool"
></A
>2.6. The LVCool Solution</H2
><P
>&#13; <EM
>LVCool</EM
> is a small port of the Windows programm
<A
HREF="http://vcool.occludo.net/"
TARGET="_top"
>&#13; VCool</A
>. It only supports the KT133/133A and KX133 chipset and
I can't provide support for it. You can download it
<A
HREF="http://vcool.occludo.net/VC_Linux.html"
TARGET="_top"
>&#13; here</A
>. This solutions needs no ACPI compiled in the kernel.
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="fvcool"
></A
>2.7. The FVCool Program</H2
><P
>
<A
HREF="http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/download.html"
TARGET="_top"
>&#13; Here</A
> is another Powersaving program which supports several chipsets. I didn't test it
by myself but i heared it works. Check it out ... There is also a program provided with
which you could use the onboard monitoring chips on some motherboards
(like the lm-sensors package).
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="760MP"
></A
>2.8. AMD 760MP Powersaving</H2
><P
>&#13; There is a kernel module which enables powersaving on the 760MP multiprocessor chipset. You
could find it
<A
HREF="http://www.muru.com/linux/amd-smp-idle/"
TARGET="_top"
>&#13; here</A
>. I don't know how good it works, but i got at least one mail from someone
who said it works for him. So check it out.
</P
></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="intro.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="else.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Introduction</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>What Else?</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>