LDP/LDP/howto/docbook/Athlon-Powersaving-HOWTO.xml

546 lines
21 KiB
XML
Raw Normal View History

2003-08-29 19:57:02 +00:00
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2003-10-08 16:39:46 +00:00
"http://docbook.org/xml/4.2/docbookx.dtd" []>
2003-08-29 19:57:02 +00:00
<article>
<articleinfo>
<!-- Use "HOWTO", "mini HOWTO", "FAQ" in title, if appropriate -->
<title>Athlon Powersaving HOWTO</title>
<author>
<firstname>Daniel</firstname>
<surname>Nofftz</surname>
<affiliation>
<!-- Valid email...spamblock/scramble if so desired -->
<address><email>daniel@nofftz.net.NOSPAM</email></address>
</affiliation>
</author>
2003-10-08 16:39:46 +00:00
2003-08-29 19:57:02 +00:00
<!-- All dates specified in ISO "YYYY-MM-DD" format -->
2003-10-08 16:39:46 +00:00
<pubdate>2003-10-04</pubdate>
2003-08-29 19:57:02 +00:00
<!-- Most recent revision goes at the top; list in descending order -->
<revhistory>
2003-10-08 16:39:46 +00:00
<revision>
<revnumber>1.1.0</revnumber>
<date>2003-10-04</date>
<authorinitials>dn</authorinitials>
<revremark>a big bunch of new informations and links</revremark>
</revision>
2003-08-29 19:57:02 +00:00
<revision>
<revnumber>1.02</revnumber>
<date>2003-08-29</date>
<authorinitials>dn</authorinitials>
<revremark>new website, new email-adress -> links updated!</revremark>
</revision>
<revision>
<revnumber>1.01</revnumber>
<date>2003-07-09</date>
<authorinitials>dn</authorinitials>
<revremark>Bugfix! the AMD-Chipset command-line hack was wrong!</revremark>
</revision>
<revision>
<revnumber>1.0</revnumber>
<date>2003-06-20</date>
<authorinitials>tm</authorinitials>
<revremark>Initial release, reviewed by LDP</revremark>
</revision>
</revhistory>
<!-- Provide a good abstract; a couple of sentences is sufficient -->
<abstract>
<para>
How to enable the power-saving functionality of the Athlon/Duron/AthlonXP processor on some motherboards/chipsets.
</para>
</abstract>
</articleinfo>
<!-- Content follows...include introduction, license information, feedback -->
<sect1 id="intro">
<title>Introduction</title>
<sect2 id="basics">
<title>Basics on the Athlon Power Saving Mode</title>
<para>
The HLT signal which is used by the normal idle-loop of the Linux kernel
does not bring any significant power-saving on processors of the Athlon/Duron
family (hereafter referred to as Athlon processors). To get real power-saving on an
2003-10-08 16:39:46 +00:00
Athlon processor, you have to put the processor in the STPGNT-Mode (Stop Grant Mode).
In this mode, the processor is disconnected from the front-side bus (FSB), and can
turn off parts of the CPU as well as reduce the clock to save power.
</para>
<para>
Some modern Motherboards/Chipsets also support a Function to make a STPGNT when a HLT signal is detected.
2003-08-29 19:57:02 +00:00
</para>
</sect2>
<!-- Legal Sections -->
<sect2 id="copyright">
<title>Copyright and License</title>
<!-- The LDP recommends, but doesn't require, the GFDL -->
<para>
This document, <emphasis>Athlon Powersaving HOWTO</emphasis>,
is copyrighted (c) 2003 by <emphasis>Daniel Nofftz</emphasis>.
</para>
<para>
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
License, Version 1.2 or any later version published
by the Free Software Foundation; with no Invariant Sections,
with no Front-Cover Texts, and with no Back-Cover Texts.
A copy of the license is available at
<ulink url="http://www.gnu.org/copyleft/fdl.html">
http://www.gnu.org/copyleft/fdl.html</ulink>.
</para>
<para>
Linux is a registered trademark of Linus Torvalds.
</para>
</sect2>
<sect2 id="disclaimer">
<title>Disclaimer</title>
<para>
No liability for the contents of this document can be accepted.
Use the concepts, examples and information at your own risk.
There may be errors and inaccuracies, that could be damaging to
your system. Proceed with caution, and although this is highly
unlikely, the author(s) do not take any responsibility.
</para>
<para>
All copyrights are held by their respective owners,
unless specifically noted otherwise. Use of a term in this
document should not be regarded as affecting the validity of any
trademark or service mark. Naming of particular products or
brands should not be seen as endorsements.
</para>
</sect2>
<!-- Feedback -->
<sect2 id="feedback">
<title>Feedback</title>
<para>
Feedback is most essential for this document. New solutions for
new chipsets are especially needed. And I need comments,
whether the provided solutions work or don't work. Send
your additions, comments and criticisms to the following
email address: <email>daniel@nofftz.net.NOSPAM</email>.
</para>
<para>
You can email me in German or English!
</para>
</sect2>
<sect2>
<title>New Versions of this Document</title>
<para>
The newest version of this HOWTO will always first be made
available
<ulink url="http://www.daniel.nofftz.net/linux/">here.</ulink>
</para>
</sect2>
</sect1>
<sect1 id="approaches">
<title>The Different Approaches</title>
<para>
In the following section I present different approaches to achieve the same goal:
power-saving on your Athlon-based system. My recommended approach at the
2003-10-08 16:39:46 +00:00
moment is to use the <quote>command-line hack,</quote> because the kernel patch
is outdated and will not be developed any further, and the
<emphasis>LVCool</emphasis> patch supports only one chipset family.
2003-08-29 19:57:02 +00:00
The <emphasis>athcool</emphasis> program sounds good, but I haven't tested it myself.
</para>
<para>
2003-10-08 16:39:46 +00:00
Nearly all of these approaches will set the <quote>
Disconnect enable when STPGNT detected</quote> 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.
2003-08-29 19:57:02 +00:00
</para>
2003-10-08 16:39:46 +00:00
2003-08-29 19:57:02 +00:00
<para>
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 <menuchoice><guimenu>General Setup</guimenu><guimenu>Power Management Setup</guimenu><guimenuitem>ACPI</guimenuitem></menuchoice>. You must have at least the following options: <guimenuitem>ACPI Bus Manager</guimenuitem>, <guimenuitem>System</guimenuitem> and <guimenuitem>Processor.</guimenuitem>
</para>
2003-10-08 16:39:46 +00:00
<para>
Or for the new 2.4.22 Kernel: <menuchoice><guimenu>General Setup</guimenu><guimenu>ACPI Support</guimenu></menuchoice>. You must have at least the following option: <guimenuitem>Processor</guimenuitem>.
</para>
<para>
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 <xref linkend="testing" />)
</para>
2003-08-29 19:57:02 +00:00
<sect2 id="commandline">
<title>The Command-line Hack</title>
<para>
2003-10-08 16:39:46 +00:00
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/disbale it from the command line with this commands:
2003-08-29 19:57:02 +00:00
</para>
<para>
<variablelist>
<varlistentry>
2003-10-08 16:39:46 +00:00
<term>on KT133/133A, KX133, KL/KLE133, KM/KN133, ...: (needs definitively acpi enabled)</term>
2003-08-29 19:57:02 +00:00
<listitem>
<para>
enable: <command>setpci -v -H1 -s 0:0.0 52=$(printf %x $((0x$(setpci -H1 -s 0:0.0 52) | 0x80)))</command>
</para>
<para>
disable: <command>setpci -v -H1 -s 0:0.0 52=$(printf %x $((0x$(setpci -H1 -s 0:0.0 52) &amp; 0x7f)))</command>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>on KT266/266A/333, KM266/333, ...:</term>
<listitem>
<para>enable:</para>
<para><command>setpci -v -H1 -s 0:0.0 92=$(printf %x $((0x$(setpci -H1 -s 0:0.0 92) | 0x80)))</command></para>
<para><command>setpci -v -H1 -s 0:0.0 95=$(printf %x $((0x$(setpci -H1 -s 0:0.0 95) | 0x02)))</command></para>
<para>disable:</para>
<para><command>setpci -v -H1 -s 0:0.0 92=$(printf %x $((0x$(setpci -H1 -s 0:0.0 92) &amp; 0x7f)))</command></para>
<para><command>setpci -v -H1 -s 0:0.0 95=$(printf %x $((0x$(setpci -H1 -s 0:0.0 95) &amp; 0xfd)))</command></para>
</listitem>
</varlistentry>
<varlistentry>
2003-10-08 16:39:46 +00:00
<term>on KT400:</term>
2003-08-29 19:57:02 +00:00
<listitem>
<para>enable:</para>
<para><command>setpci -v -H1 -s 0:0.0 D2=$(printf %x $((0x$(setpci -H1 -s 0:0.0 D2) | 0x80)))</command></para>
<para><command>setpci -v -H1 -s 0:0.0 D5=$(printf %x $((0x$(setpci -H1 -s 0:0.0 D5) | 0x02)))</command></para>
<para>disable:</para>
<para><command>setpci -v -H1 -s 0:0.0 D2=$(printf %x $((0x$(setpci -H1 -s 0:0.0 D2) &amp; 0x7f)))</command></para>
<para><command>setpci -v -H1 -s 0:0.0 D5=$(printf %x $((0x$(setpci -H1 -s 0:0.0 D5) &amp; 0xfd)))</command></para>
</listitem>
</varlistentry>
<varlistentry>
<term>on SIS730/733: (experimental! plz report, whether it works)</term>
<listitem>
<para>enable: <command>setpci -v -H1 -s 0:0.0 6B=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6B) | 0x01)))</command></para>
<para>disable: <command>setpci -v -H1 -s 0:0.0 6B=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6B) &amp; 0xfe)))</command></para>
</listitem>
</varlistentry>
<varlistentry>
<term>on SIS735/740/745/746/755:</term>
<listitem>
<para>enable: <command>setpci -v -H1 -s 0:0.0 6A=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6A) | 0x0001)))</command></para>
<para>disable: <command>setpci -v -H1 -s 0:0.0 6A=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6A) &amp; 0xfffe)))</command></para>
</listitem>
</varlistentry>
<varlistentry>
<term>on Nforce:</term>
<listitem>
<para>enable:</para>
<para><command>setpci -v -H1 -s 0:0.0 E7=$(printf %x $((0x$(setpci -H1 -s 0:0.0 E7) | 0x06)))</command></para>
<para><command>setpci -v -H1 -s 0:0.0 6D=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6D) | 0x80)))</command></para>
<para>disable:</para>
<para><command>setpci -v -H1 -s 0:0.0 E4=$(printf %x $((0x$(setpci -H1 -s 0:0.0 E7) &amp; 0xf9)))</command></para>
</listitem>
</varlistentry>
<varlistentry>
2003-10-08 16:39:46 +00:00
<term>on Nforce2: (works without acpi enabled)</term>
2003-08-29 19:57:02 +00:00
<listitem>
<para>enable: <command>setpci -v -H1 -s 0:0.0 6F=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6F) | 0x10)))</command></para>
<para>disable: <command>setpci -v -H1 -s 0:0.0 6F=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6F) &amp; 0xef)))</command></para>
</listitem>
</varlistentry>
<varlistentry>
<term>on AMD751 and AMD760/761:(works without acpi enabled)</term>
<listitem>
<para>
enable: <command>setpci -v -s 0:0.0 0x62=$(printf %x $((0x$(setpci -H1 -s 0:0.0 62) | 0x06)))</command>
</para>
<para>
disable: <command>setpci -v -s 0:0.0 0x62=$(printf %x $((0x$(setpci -H1 -s 0:0.0 62) &amp; 0xf9)))</command>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</sect2>
<sect2 id="athcool">
<title>The Athcool Program</title>
<para>
<emphasis>Athcool</emphasis> is a small program which performs the same
task as the <command>setpci</command> 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.
</para>
<para>
You can read more about it (and download it)
<ulink url="http://members.jcom.home.ne.jp/jacobi/linux/softwares.html">
here</ulink>.
</para>
</sect2>
<sect2 id="biosup">
<title>BIOS updates</title>
<para>
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.
</para>
</sect2>
<sect2 id="patch">
<title>My Kernel Patch</title>
<para>
My 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 from
within the kernel. This is why I recommend using the command-line hack,
which is really simple to use.
</para>
<procedure>
<title>Ok... now step by step, here's how to apply the patch:</title>
<step>
<para>
2003-10-08 16:39:46 +00:00
First you have to download the patch: </para>
<para><ulink url="http://www.daniel.nofftz.net/linux/amd_cool.diff">
Kernel Patch for 2.4.17</ulink></para>
<para><ulink url="http://www.daniel.nofftz.net/linux/amd_cool.linux-2.4.21.diff">
Kernel Patch for 2.4.21</ulink> (thx to Thomas Reinhardt for porting it to 2.4.21)</para>
2003-08-29 19:57:02 +00:00
</step>
<step>
<para>
Login as root
</para>
</step>
<step>
<para>
<command>cd /usr/src</command>
</para>
</step>
<step>
<para>
Apply the patch: <command>cat $path-to-patch/amd_cool.diff | patch -p0</command>
</para>
</step>
<step>
<para>
<command>cd linux</command>
</para>
</step>
<step>
<para>
Make the new kernel
</para>
</step>
<step>
<para>
Reboot, and at the kernel boot-prompt, enter the statement <userinput> amd_disconnect=yes </userinput>. 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 <userinput> amd_disconnect=yes </userinput> to the file <filename>/etc/lilo.conf</filename>.
</para>
</step>
</procedure>
</sect2>
<sect2 id="lvcool">
<title>The LVCool Solution</title>
<para>
<emphasis>LVCool</emphasis> is a small port of the Windows programm
<ulink url="http://vcool.occludo.net/">
VCool</ulink>. It only supports the KT133/133A and KX133 chipset and
2003-10-08 16:39:46 +00:00
I can't provide support for it. You can download it
2003-08-29 19:57:02 +00:00
<ulink url="http://vcool.occludo.net/VC_Linux.html">
2003-10-08 16:39:46 +00:00
here</ulink>. This solutions needs no ACPI compiled in the kernel.
</para>
</sect2>
<sect2 id="fvcool">
<title>The FVCool Program</title>
<para>
<ulink url="http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/download.html">
Here</ulink> 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).
</para>
</sect2>
<sect2 id="760MP">
<title>AMD 760MP Powersaving</title>
<para>
There is a kernel module which enables powersaving on the 760MP multiprocessor chipset. You
could find it
<ulink url="http://www.muru.com/linux/amd-smp-idle/">
here</ulink>. 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.
2003-08-29 19:57:02 +00:00
</para>
</sect2>
</sect1>
<sect1 id="else">
<title>What Else?</title>
2003-10-08 16:39:46 +00:00
<sect2 id="testing">
<title>How to test, whether it works</title>
<para>
Ok ... you use one of the described powersaving possibilitys and you want to verify, whether
it works. Here are two ways to check it:
</para>
<para>
If you have temperature controlled Fan on your CPU-Heatsink, you could check for the noise level of the Fan to see whether it works or not. After a few idle minutes you give the CPU somthing to do.
<procedure>
<title>I normaly do it like this:</title>
<step>
get superuser (root)
</step>
<step>
<command>cd /usr/src/linux</command>
</step>
<step>
and give the computer something to do: <command>while true; do make clean; make bzImage; done</command>
</step>
</procedure>
After about 20 or 30 seconds you should notice that the noise of the fan is getting louder while the fan is getting faster. Don't forget to end the while-loop after some time ( a few minutes) with STRG-C.
</para>
<para>
The same procedure as above works also with a monitoring program for the cpu-temperature (like lm-sensors or xmbmon).
</para>
</sect2>
2003-08-29 19:57:02 +00:00
<sect2 id="bugs">
<title>Known Bugs/Problems</title>
<para>There are two known bugs in the Athlon/Duron processor. This is number
11 and number 14 in the <citetitle>AMD Athlon Processor Revision Guide</citetitle>. It looks like the Athlon XP is significantly less often affected by these bugs. So if you have an Athlon XP you are on the lucky side (like me).</para>
<para>There could be following problems (caused by the bugs):
<itemizedlist>
<listitem>
<para>skips during sound playback</para>
</listitem>
<listitem>
<para>skips and slowdown during video playback</para>
</listitem>
<listitem>
<para>slowdown of the ultra-DMA harddisk transfers</para>
</listitem>
<listitem>
<para>system hangs</para>
</listitem>
2003-10-08 16:39:46 +00:00
<listitem>
<para>USB problems</para>
</listitem>
<listitem>
<para>someone reported a high cheeping noise</para>
</listitem>
2003-08-29 19:57:02 +00:00
</itemizedlist>
</para>
<para>Sometimes a BIOS-update will help (it exists as a workaround for
bug 11, which could be done by the BIOS). But as far as I know there are
only a few boards out there which have this workaround in the BIOS.</para>
<para>For the Asus A7V133-C, it is known that the BIOS-option <option>PCI master read caching</option> will solve most problems when it is enabled. So look
at your BIOS to see whether it has such functionality.</para>
<para>It is also known that on some boards, the BIOS option <option>Delayed Transaction</option> solves some of the problems. You may want to give this option a try too.</para>
<para>WARNING: On boards with KT133A, this could enable the famous VIA-Southbridge bug!</para>
<para>From a Newsnet post, regarding Asus A7V:
<itemizedlist>
<listitem>
<para>without delayed transaction: sound-skips and TV-skips</para>
</listitem>
<listitem>
<para>with delayed transaction: no sound skips and only slight TV problems</para>
</listitem>
<listitem>
<para>with delayed transcation and master read caching: nearly no TV problems and no sound skips at all</para>
</listitem>
</itemizedlist>
</para>
<para>There are other causes for problems:
<itemizedlist>
<listitem>
<para>the PSU is not strong enough to handle the fluctuations in the power consumption of the processor/motherboard</para>
</listitem>
<listitem>
<para>some motherboard voltage-regulators could have the same problems like the PSU ;)</para>
</listitem>
<listitem>
2003-10-08 16:39:46 +00:00
<para>you have a K7S5A (as far as I know, this board could be really wierd when power-saving is enabled)</para>
2003-08-29 19:57:02 +00:00
</listitem>
</itemizedlist>
</para>
<para>
If you have minor problems with power-saving enabled, and nevertheless want to use
power-saving, you can enable the power-saving by default, and turn it off if you
want to playback music, watch TV, ...
</para>
</sect2>
<sect2 id="todo">
<title>ToDo</title>
<para>Adding more chipsets and more informations to this document.</para>
<para>Maybe make a motherboard list with <quote>working</quote> and <quote>not working</quote> marks.</para>
</sect2>
<sect2 id="translations">
<title>Translations</title>
<para>
Translations into different languages also exist. At the moment, most of
them are translations of the pre-XML version of this document.
</para>
<para><ulink url="http://perso.wanadoo.es/cmayo/docs/Athlon-Powersaving-HOWTO-es.html">
Spanish</ulink> by Carlos Mayo</para>
<para><ulink url="http://www.daniel.nofftz.net/linux/Athlon-Powersaving-HOWTO-fr.html">
French</ulink> by Mathieu Pillard</para>
<para><ulink url="http://www.daniel.nofftz.net/linux/Athlon-Powersaving-HOWTO-it.html">
Italian</ulink> by Maurizio Fantino</para>
<para><ulink url="http://www.linuxwiki.de/PowersavingHowto">
German (only parts)</ulink> by Fabian Mohren</para>
2003-10-08 16:39:46 +00:00
<para><ulink url="http://www.linux.or.jp/JF/JFdocs/Athlon-Powersaving-HOWTO/index.html">Japanese</ulink> by Seiji Kaneko</para>
2003-08-29 19:57:02 +00:00
</sect2>
</sect1>
<!-- rest of document follows... -->
</article>