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 moment is to use the "command-line hack," because the kernel patch is outdated and will not be developed any further, and the LVCool patch supports only one chipset family. The athcool program sounds good, but I haven't tested it myself.
All these approaches will set the "Disconnect eable when STPGNT detected" bit in the north bridge of the chipset. Nothing more and nothing less than that. 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. (Only the LVCool solution takes a different way ...)
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
+ -> . You must have at least the following options: , andTo use the command-line hack you have to enable ACPI in the kernel. How you can do this is described in Section 2.4. If you already have a kernel with ACPI-processor support, you can enable/disable the power-saving right from the command-line without any need for rebooting.
enable: setpci -v -H1 -s 0:0.0 52=$(printf %x $((0x$(setpci -H1 -s 0:0.0 52) | 0x80)))
disable: setpci -v -H1 -s 0:0.0 52=$(printf %x $((0x$(setpci -H1 -s 0:0.0 52) & 0x7f)))
enable:
setpci -v -H1 -s 0:0.0 92=$(printf %x $((0x$(setpci -H1 -s 0:0.0 92) | 0x80)))
setpci -v -H1 -s 0:0.0 95=$(printf %x $((0x$(setpci -H1 -s 0:0.0 95) | 0x02)))
disable:
setpci -v -H1 -s 0:0.0 92=$(printf %x $((0x$(setpci -H1 -s 0:0.0 92) & 0x7f)))
setpci -v -H1 -s 0:0.0 95=$(printf %x $((0x$(setpci -H1 -s 0:0.0 95) & 0xfd)))
enable:
setpci -v -H1 -s 0:0.0 D2=$(printf %x $((0x$(setpci -H1 -s 0:0.0 D2) | 0x80)))
setpci -v -H1 -s 0:0.0 D5=$(printf %x $((0x$(setpci -H1 -s 0:0.0 D5) | 0x02)))
disable:
setpci -v -H1 -s 0:0.0 D2=$(printf %x $((0x$(setpci -H1 -s 0:0.0 D2) & 0x7f)))
setpci -v -H1 -s 0:0.0 D5=$(printf %x $((0x$(setpci -H1 -s 0:0.0 D5) & 0xfd)))
enable: setpci -v -H1 -s 0:0.0 6B=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6B) | 0x01)))
disable: setpci -v -H1 -s 0:0.0 6B=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6B) & 0xfe)))
enable: setpci -v -H1 -s 0:0.0 6A=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6A) | 0x0001)))
disable: setpci -v -H1 -s 0:0.0 6A=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6A) & 0xfffe)))
enable:
setpci -v -H1 -s 0:0.0 E7=$(printf %x $((0x$(setpci -H1 -s 0:0.0 E7) | 0x06)))
setpci -v -H1 -s 0:0.0 6D=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6D) | 0x80)))
disable:
setpci -v -H1 -s 0:0.0 E4=$(printf %x $((0x$(setpci -H1 -s 0:0.0 E7) & 0xf9)))
enable: setpci -v -H1 -s 0:0.0 6F=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6F) | 0x10)))
disable: setpci -v -H1 -s 0:0.0 6F=$(printf %x $((0x$(setpci -H1 -s 0:0.0 6F) & 0xef)))
enable: setpci -v -s 0:0.0 0x62=$(printf %x $((0x$(setpci -H1 -s 0:0.0 62) | 0x06)))
disable: setpci -v -s 0:0.0 0x62=$(printf %x $((0x$(setpci -H1 -s 0:0.0 62) & 0xf9)))
Athcool is a small program which performs the same task as the setpci 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.
You can read more about it (and download it) here.
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.
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.
Ok... now step by step, here's how to apply the patch:
First you have to download the patch: Kernel Patch for 2.4.17
Login as root
cd /usr/src
Apply the patch: cat $path-to-patch/amd_cool.diff | patch -p0
cd linux
Make the new kernel
Reboot, and at the kernel boot-prompt, enter the statement amd_disconnect=yes . 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 amd_disconnect=yes to the file /etc/lilo.conf.