# hard cooling for kt266(a) makes your CPU run cooler

## felysium

This article describes how to run your AMD cpu more cool:

http://www.viahardware.com/haltcooling.shtm

It works with linux too.

Just emerge pciutils and set the right command.

for me on a 266a chipset it was: setpci -s 0 95=1e

My athlon XP 1600 now runs 31C idle, before 42C.

Even when you fully load the cpu, it will be stilll some degrees colder.

UPDATE:

article is now located at: http://www.sudhian.com/showdocs.cfm?aid=94Last edited by felysium on Sat Feb 08, 2003 10:16 am; edited 2 times in total

----------

## asimon

This is from gentoo-sources-2.4.19-r7.ebuild:

```

#   from linux-2.4.18-wolk3.4-rc5-patchset (http://www.sourceforge.net/projects/wolk):

#       102_amd_lvcool.diff

#       Allows slightly cooler running AMD Athlon CPUs in systems with VIA mobos
```

I think this patch does the same.

Cheers,

A.

----------

## mvo

Wow, thanks!

My Athlon 1400 runs idle 18C cooler than before! Seems it has no negative effect. I put this into my local.start.

----------

## wisdom

how can i activate that patch?

----------

## Jacaranda

Anyone got any ideas on how to work out the registers on other vias?

eg. I'm getting a kt333 soon...

----------

## nsadhal

holy crap

as soon as i typed the setpci bit, i saw the temperature drop in gkrellm... right before my eyes... so far it's gone 5 degrees C...

----------

## elzbal

I just wanted to report my findings... This works fine on Via KT333 chipsets as well.

My 2 thermometers were holding steady at 40C and 50C before I typed the setpci command (15-20 minutes ago). They are now recording 35C and 35.5C... Below body temperature!

Thanks, guys!

----------

## Wedge_

Whoa. My XP 1900 was at 44C, then I typed the setpci command, and 30 seconds later it's at 36C. Thanks for that  :Smile: 

----------

## surak

I get the weirdest thing when I try that command.. my temps go down, but my sound (using ALSA) gets very crackly and distorted... sounds almost like tin foil being crinckled.  The only time sound comes out right is if I'm compiling something and CPU usage is at 99%... Any ideas?

----------

## elzbal

Y'know, I was just noticing that with my sound too. I rebuilt my box (new hard drive, fresh install of Gentoo), so I wasn't sure yet what it was.

Perhaps processor cycling has a bad effect on alsa's audio on this hardware...

----------

## ejwahl

I have an Athlon XP 1800+ and ABIT KG7 (AMD761/VIA 686B chipset) and I've googled to find the correct settings for setpci but nothing seems to work.  I've used lv_cool in the past but that eats up 100% CPU.  

Can anyone point me in the right direction for this type of chipset?

Thanks!

----------

## JohnnyGTO

I run an app on XP ( ya yuck but all the severs are Gentoo) called VCool and had the same trouble.

enabling Master Read Caching in VCool solved the problem.

 *surak wrote:*   

> I get the weirdest thing when I try that command.. my temps go down, but my sound (using ALSA) gets very crackly and distorted... sounds almost like tin foil being crinckled.  The only time sound comes out right is if I'm compiling something and CPU usage is at 99%... Any ideas?

 

----------

## Wedge_

I have no problems with ALSA, using an Abit KR7A-RAID (KT266A).

----------

## AlterEgo

 Correct link for the article It really stinks that Viahardware is no longer there IMHO  :Sad: 

 *surak wrote:*   

> I get the weirdest thing when I try that command.. my temps go down, but my sound (using ALSA) gets very crackly and distorted... sounds almost like tin foil being crinckled.  The only time sound comes out right is if I'm compiling something and CPU usage is at 99%... Any ideas?

 

That's a well-known side effect, nothin you can really do about it.

 You mess with PCI latency timings.

According to the wpcredit data,

setpci -s 0 52=eb should work for VIA 686 a/b  :

and it does; I go from 38 to 31 degrees celsius @ almost idle.

I also tried the wpcredit memory tweaks that work so well with windows to boost memory speed, but they have no effect at all under linux.

(that is, not on my KT133 box and in my hands)

----------

## Selkie

kt266a:

Set both Registers -> tmp from 38 -> 35 but sound cracking

Set Register 92 back -> no more cracking.

I'd say HLT is harmless but "Disc when STPGNT# Detect" leads to sound errors for me

----------

## ejwahl

This worked on my ABIT KG7 (AMD761/VIA 686B chipset):

setpci -s 0:0.0 0x62=0xb7

CPU temp dropped from 109 to 88 F.

I found this here along with settings for other chipsets.

----------

## nalin

 *nsadhal wrote:*   

> holy crap
> 
> as soon as i typed the setpci bit, i saw the temperature drop in gkrellm... right before my eyes... so far it's gone 5 degrees C...

 

bit off topic but what plugin do you use to monitor cpu temp...?

----------

## ejwahl

 *nalin wrote:*   

> bit off topic but what plugin do you use to monitor cpu temp...?

 

I use the builtin Sensors.

----------

## sven

I encountered some lockups on my Epox 8KHAL and Athlon XP 1700+ so I don't use this trick anymore...

----------

## Disquiet

I've disabled this in linux as it makes xawtv run funny...like there's interference with the signal. turn it off and its crystal clear again.

Works in windoze ok though

----------

## wrc1944

I used this trick when I used to run win98SE, using the great program by the

Japanese gentleman. I'm still a little unclear as to how to implement this in

Linux. Could someone please illuminate me as to where I type the setpci

commands? Do I just create a file somewhere, or use a pre-existing linux config

file? Any special format I need to use? And what do the "enable" and "disable" lines in the spanish page link

refer to.

Thanks,

wrc1944

----------

## ejwahl

 *wrc1944 wrote:*   

> Could someone please illuminate me as to where I type the setpci
> 
> commands? Do I just create a file somewhere, or use a pre-existing linux config
> 
> file? Any special format I need to use? And what do the "enable" and "disable" lines in the spanish page link
> ...

 

I created a script in /etc/init.d called gencool:

#!/bin/bash

setpci -s 0:0.0 0x62=0xb7

Then:  "rc-update add gencool default"

It now runs the command every time I boot up.

I believe the enable and disable lines simply mean that cooling is either enabled or disabled.

----------

## wrc1944

Thanks ejwahl. So do I assume this will work in any other distro, such as my current Mandrake 9.0? I'm still waiting for Gentoo 1.4 final, as I only have a dial-up connection at home, and have to download the iso's somewhere else. 

I'm new to Linux, so can I test out this script by just opening a console, su to root, and run the setpci script, adjusting the values to suit my cpu? Then, if it works, put it in the /etc/init.d file as a shell script as you did? Call it cpucool, or whatever? Can it really be that simple, or am I missing something important? (BTW, my cpu is running at 34.5C. today, so I don't know if I even need it- but my room temps are pretty cool, so that must be it.)

Thanks

wrc1944

----------

## Mirar

I wrote this script (/etc/init.d/coolbit):

#!/sbin/runscript

# This shell script takes care of starting and stopping the northbridge "cool" bits

start() {

        ebegin "Starting KT333 NB cool bit"

        setpci -H1 -s 0:0.0 70=86 >/dev/null &&

        setpci -H1 -s 0:0.0 95=1e >/dev/null

        eend $?

}

stop() {

        ebegin "Resetting KT333 NB cool bit"

        setpci -H1 -s 0:0.0 70=82 >/dev/null  &&

        setpci -H1 -s 0:0.0 95=1c >/dev/null

        eend $?

}

I have an Asus A7V333. This worked on my previous Abit KR7A too, not as good though since I had to turn it off if I were going to use the TV card.

----------

## TheCoop

do you know what the setpci settings are for a kt400 chipset?

----------

## Bluesman

Any idea what I need to enable in kernel if anything?

Thx

----------

## elzbal

 *TheCoop wrote:*   

> do you know what the setpci settings are for a kt400 chipset?

 

If I'm not mistaken, the kt400 is nearly identical to the kt333 and kt266a motherboards. Try using the same setpci commands and see if that works.

Your motherboard manufacturer may have a support forum where you can ask this quesiton, and you may be able to find an answer on the forums at amdmb.com.

 *Bluesman wrote:*   

> Any idea what I need to enable in kernel if anything?

 

Nothing.

----------

## floam

it worked for me, kt400

----------

## crimson

Wow, that is incredible.  dropped from 44C to 32C!  And I don't have any trouble with the sound.

I'm just curious what exactly is going on?  Plus, all the links to that article lead to the main page which is cluttered with links.  Does anyone have a direct link to the article?

Thanks.

----------

## felysium

The link has changed:

it is now located at: http://www.sudhian.com/showdocs.cfm?aid=94

----------

## csnyder

Whoa, look what it did to my CPU temp!

Before:

```
it87-isa-0290

Adapter: ISA adapter

Algorithm: ISA algorithm

VCore 1:   +1.77 V  (min =  +1.53 V, max =  +1.87 V)

VCore 2:   +1.24 V  (min =  +2.25 V, max =  +2.75 V)   ALARM

+3.3V:     +6.64 V  (min =  +2.96 V, max =  +3.60 V)   ALARM

+5V:       +4.91 V  (min =  +4.50 V, max =  +5.48 V)

+12V:     +11.96 V  (min = +11.36 V, max = +13.80 V)

-12V:     -12.63 V  (min = -15.86 V, max = -13.40 V)   ALARM

-5V:       -9.35 V  (min = -10.13 V, max =  -9.44 V)   ALARM

Stdby:     +5.17 V  (min =  +4.50 V, max =  +5.48 V)

VBat:      +0.00 V

fan1:        0 RPM  (min = 3000 RPM, div = 2)          ALARM

fan2:        0 RPM  (min = 3000 RPM, div = 2)          ALARM

fan3:        0 RPM  (min = 3000 RPM, div = 2)          ALARM

Temp1/MB:   +120°F  (min =  +68°F, max = +140°F)

Temp2/CPU:  +174°F  (min =  +68°F, max = +140°F)

Temp3:       -67°F  (min =  +68°F, max = +140°F)
```

After:

```
it87-isa-0290

Adapter: ISA adapter

Algorithm: ISA algorithm

VCore 1:   +1.80 V  (min =  +1.42 V, max =  +1.56 V)   ALARM

VCore 2:   +1.24 V  (min =  +2.40 V, max =  +2.60 V)   ALARM

+3.3V:     +6.68 V  (min =  +3.12 V, max =  +3.44 V)   ALARM

+5V:       +5.04 V  (min =  +4.72 V, max =  +5.24 V)

+12V:     +11.84 V  (min = +11.36 V, max = +12.60 V)

-12V:     -15.24 V  (min = -12.63 V, max = -11.41 V)   ALARM

-5V:       -7.49 V  (min =  -5.28 V, max =  -4.81 V)   ALARM

Stdby:     +5.17 V  (min =  +4.72 V, max =  +5.24 V)

VBat:      +0.00 V

fan1:        0 RPM  (min =    0 RPM, div = 2)

fan2:        0 RPM  (min = 3000 RPM, div = 2)          ALARM

fan3:        0 RPM  (min = 3000 RPM, div = 2)          ALARM

Temp1/MB:   +117°F  (min =  +68°F, max = +104°F)

Temp2/CPU:   -71°F  (min =  +77°F, max = +113°F)

Temp3:       -67°F  (min =  +77°F, max = +113°F)

```

Methinks I have to modify the multipliers a bit... :Laughing: 

----------

## matosale

I'm a little bit confused here. I was reading the post, but it talks about windows (i've tried with windoes and it doesn't work for me) and i don't know how to get that work in Linux. Mobo: K7S5A / pross: Athlon XP 1700+ Any idea how to do this?   :Rolling Eyes: 

Thanks!

----------

## kermitjunior

Could someone just make sure this summary is correct?

My understanding is:

To enable:

```
setpci -s 0:0.0 0x62=0xb7
```

To disable:

```
setpci -s 0:0.0 0x62=0xb1
```

for an Abit KG7-R Mobo (AMD761/Via686B) as found here (thanks ejwahl for that link... others should find it useful.

----------

## matosale

Hi guys, i just figure out that my chitset is SiS 735. there is something I should do to get this working?

Thanks a lot

----------

## CybeRDukE

Hi,

i found some quite useful information about the topic here.

well, most of it was said already in this thread.

when using this setting with my AMD-751 chipset, my 3com NIC hangs. no more network traffic possible unless i reboot. disabling the pci setting doesn't change anything...

it's a '3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 116)'

all the other pci cards like sound etc works fine

any ideas?

thx

----------

## Lucas

Hmmm

my cpu temp went down 22 degrees from 57 to 35  :Smile: 

Alsa is totaly useless now I can hardly hear that it's a song and not only random noise  :Sad: 

The disable command doesn't seem to work, sound is still bad and my temperature is still low...

btw KT266a with XP1900

//Lucas

----------

## hertog

No go with the SiS 735 chipset...

I'm experimenting with it, and the register wheree stuff should be changed is 6A (so setpci -s 0:0.0 6A=<XX> where <XX> is somewhat of a mythical number...

When reading it, it contains 0x18, and the cooling stuff should kick in when changing it to 0x1a, but, altho there is a little effect, it is not all that much.

Changing it to 0x19 has a greater effect, but hangs the network  :Sad: 

----------

## matosale

well...we are just unlucky, is there another program to get the temp down?

Thanks

----------

## hardware_chump

I can't add much to this discussion, although I'm interested in what you all are able to find. I have done some googling for the northbridge pci registers you modify above. Here are two links that may add to your knowledge:

http://mpet.freeservers.com/LVCool.html

http://cip.uni-trier.de/nofftz/linux/Athlon-Powersaving-HOWTO.html

hertog,

Which PCI register does which thing is generally chipset and vendor specific. That is one reason why just about every motherboard's BIOS is different.

----------

## TecHunter

two questions:

1.what parameters on earth do i have to use?

the parameters on AMD PowerSaing HowTo is different from the poster's...i'm using ASUS A7V266EX...

2.how can u detected your cpu temperature?is there any software under linux to du such thing?

----------

## hardware_chump

The Asus A7V266EX has a Via KT266A chipset. That is a starting point. Look up the thread for values to use.

To read the case temerature on your motherboard, you'll need a utility that can communicate with the AS99127F. Unfortunately, Asus has kept the datasheet to itself. Here is a kernel module that can help you out:

http://secure.netroedge.com/~lm78/

There are plenty of projects on sourceforge that interface with it.

There may be another way to read the temperature sensor using ACPI.

-HC

----------

## dylix

amazing..

xp 1800+

1gb ram

Abit KG7

before: 

>> idle~ 50C

>> load~ 55C

after

>> idle~ 36C

>> load~ 52C

----------

## kasper

Hello all  :Smile: 

I got an Abit KR7A with KT266 chipset

Enabling ex. powersaving with this command :

--> setpci -v -H1 -s 0:0.0 92=EB

make my cpu run 10° cooler but.... just when i issue this command, sound became really crappy... héhé  :Smile: 

When i just put the chipset in original state, sound is clear again...

--> setpci -v -H1 -s 0:0.0 92=6B

Does anybody ran into this problem or have a clue on how to have power saving & good sound ?

Maybe my setpci commands are wrong, i took them from this link

note: i'm using alsa on a 'sb pci 128'

_______

edit: i've tried the setpci commands for KT266/333 below :

enable:

setpci -v -H1 -s 0:0.0 70=86

setpci -v -H1 -s 0:0.0 95=1e

disable:

setpci -v -H1 -s 0:0.0 70=82

setpci -v -H1 -s 0:0.0 95=1c

sound is less crappy but... still crappy   :Confused: 

________

edit² : mmmh i must RTFM... on the page linked above there is some info about crappy sound/video...

going to try what is written there :

BIOS :

- PCI master read caching

- Delayed transaction

Otherwise flashing the BIOS should do the trick.

----------

## dylix

 *kasper wrote:*   

> Does anybody ran into this problem or have a clue on how to have power saving & good sound ?

 

its a bug w/ all amd processors except the XP ones.   :Cool: 

any i bet you dont have an XP one do you?

i read it somewhere.. i just cant find the link to it..

----------

## helmers

BUT!

Is this in the vanilla kernel now or in any of the kernel-sources? Because if it is all that great, it should at least be an option.

I believe MS have had "processor driver" updates (at least for XP), could this be related?

----------

## Doctor

just curious, as I don't have an AMD, but has anyone seen the temp difference on a non-mobo temperature gauge? you guys seem to be all using the mobo's sensors...

----------

## kasper

 *dylix wrote:*   

>  *kasper wrote:*   Does anybody ran into this problem or have a clue on how to have power saving & good sound ? 
> 
> its a bug w/ all amd processors except the XP ones.  
> 
> any i bet you dont have an XP one do you?
> ...

 

Hey  :Smile: 

In fact it's written on the bottom of the Athlon-Powersaving-Howto page   :Confused: 

And i got an AthlonXP 1800+ ... sound is still crappy ... as my tower is insulated it get hot really quick and i have to turn on one fan more when emerging big progs (rhaaa silence  :Wink:  ).

On the same page, i read that for some users turning on PCI master read caching and Delayed Transaction in BIOS solved the problem but i do not have those options in my BIOS... so i think i will flash it one day... when i have time.

----------

## Dessimat0r

This is the article I wrote for The-Ctrl-Alt-Del many a year ago  :Very Happy: 

However, other people seem to be taking credit for it now..   :Evil or Very Mad: 

----------

## Yama

Mirar's script works brilliantly for me. I have an Asus A7V333 with an AMD Athlon XP 2100+ CPU. My CPU temperature dropped by over 10 degrees in a matter of minutes!

----------

## Decibels

Note for anyone running foldingathome. I was trying to do setpci on my Athlon and didn't seem to be getting anywhere. Still haven't tried it again yet.  

1) Seemed that my CPU was always running hotter than everyone elses. So cleaned the fans and lubed them. Knocked 4 degrees off.

2) Lapped the aluminum heatsink to a mirror finish.  Knocked 9 degrees off.

So far a total of 13 degrees taken off CPU Temp.

Started thinking why didn't the setpci do anything. Maybe I didn't have the correct registers.  Then again, maybe something was running in the background that was keeping the CPU busy and would never go to idle.

3) Stopped Foldingathome. Knocked another 7 degrees off.  

So Foldingathome can keep the CPU busy and doing setpci won't kick in.  I will see for sure when I start playing with the setpci again here in a bit.

LATER:

Well, setpci -s 0:0.0 0x62=0xb7 made it drop 21 degrees more. Oops, as typing this it dropped 5 more degrees.  Started Foldingathome again and lost my 26 degree decrease I gained from setpci.  So I wouldn't recommend running foldingathome if your overclocking you CPU to the edge. Stopping and starting it, you could just see the temp decrease and increase drastically!! Right now it is running at 27.2 degrees C.

Man, seems like my CPU really was running hot. Still been like that for 2 years and no problems. Guess this might make it last even longer now.

Wonder what would happen if I got a Copper Heatsink and polished that to a mirror finish?

Another thing I noticed on my Gigabyte GA-7DX board. When the temp dropped so did the CPU Fan speed and visa versa. So it does control the fan speed based on the CPU temp.

----------

## Master_Of_Disaster

I tried these setpci settings on my machine (MSI K4 Ultra, Athlon XP 2000+, 512 MB DDR) but none worked, so i poked around in the net, and i found a BIOS Update on the MSI Site that did the trick. Temperature dropped about 10°C from 53 (full load) to 43 (full load) and 43 (idle) to 34 (idle)

Get the patch at http://www.msi.com.tw/program/support/bios/bos/spt_bos_detail.php?UID=356&NAME=MS-6590

----------

## Decibels

On my Gigabyte GA-7DX board the settings work great. I am experiencing lockups though, but only after a period of idle and with no Foldingathome running and just letting the machine set. Doesn't seem to do it while using it and no sound problems either (even with Foldingathome not running). Temp drops to about 30C (accurate if the scaling factor from previous cal is linear). Last time the screensaver came on before it locked up. 

I still want to run Foldingathome, so at first I setup a fcron job to run it for 15 min at the top of the hour. Then changed it to run at top and bottom of the hour. Maybe that will keep it from locking up.  

Still, I think there might be a wake up item in bios to fix this I haven't gotten set. Need to check that later.

----------

## steveb

i have serval boards with a athlon cpu. and i could not resist to enhance the init script wich was posted on this topic, to work on serval computers without need of changing the content of the script. this is what i got so far (i tryed to handle as much possible):

```
#!/sbin/runscript

# This shell script takes care of starting and stopping the northbridge "cool" bits

# /etc/init.d/athlon_cool_bit by SteveB, email: tp22a@softhome.net

checkconfig() {

   if [ ! -f /sbin/lspci ]; then

      eerror "You need \"sys-apps/grep\" for this to work"

      return 1

   fi

   if [ ! -f /bin/grep ]; then

      eerror "You need \"sys-apps/grep\" for this to work"

      return 1

   fi

}

start() {

   PCI_Class=""

   PCI_Vendor=""

   PCI_Devic=""

   PCI_SVendor=""

   PCI_SDevice=""

   lspci -m -v -s 0:0.0 | grep -i "^[A-Za-z0-9]" | while true

   do

      read LSPCI_LINE

      LSPCI_LINE_RC="$?"

      LSPCI_KEY=""

      LSPCI_VALUE=""

      LSPCI_KEY="${LSPCI_LINE%%:*}"

      LSPCI_VALUE="${LSPCI_LINE#*:}"

      if [ "${LSPCI_KEY}" = "Class" ]; then

         PCI_Class="${LSPCI_VALUE}"

      elif [ "${LSPCI_KEY}" = "Vendor" ]; then

         PCI_Vendor="${LSPCI_VALUE}"

      elif [ "${LSPCI_KEY}" = "Device" ]; then

         PCI_Device="${LSPCI_VALUE}"

      elif [ "${LSPCI_KEY}" = "SVendor" ]; then

         PCI_SVendor="${LSPCI_VALUE}"

      elif [ "${LSPCI_KEY}" = "SDevice" ]; then

         PCI_SDevice="${LSPCI_VALUE}"

      fi

      if [ "${LSPCI_LINE_RC}" -ne "0" ]; then

         if (echo "${PCI_SVendor}" | grep -iq "Asustek") && (echo "${PCI_SDevice}" | grep -iq "A7V333"); then

            # Asus A7V333 Mainboard

            ebegin "Starting KT266/266a NB cool bit [A7V333]"

            setpci -H1 -s 0:0.0 92=EB >/dev/null 2>&1

            eend $?

         elif (echo "${PCI_SVendor}" | grep -iq "Microstar") && (echo "${PCI_SDevice}" | grep -iq "K7T266Pro"); then

            # MSI K7T266Pro (MS-6380)

            ebegin "Starting  KT266 NB cool bit [K7T266Pro]"

            setpci -H1 -s 0:0.0 70=86 >/dev/null 2>&1 && setpci -H1 -s 0:0.0 95=1E >/dev/null 2>&1

            eend $?

         elif (echo "${PCI_Vendor}" | grep -iq "VIA Technologies") && (echo "${PCI_Device}" | grep -iq "KT133"); then

            # Generic KT133 Mainboard

            ebegin "Starting KT133/133a NB cool bit [generic]"

            setpci -H1 -s 0:0.0 52=EB >/dev/null 2>&1

            eend $?

         elif (echo "${PCI_Vendor}" | grep -iq "VIA Technologies") && (echo "${PCI_Device}" | grep -iq "KT266"); then

            # Generic KT266 Mainboard

            ebegin "Starting KT266/266a NB cool bit [generic]"

            setpci -H1 -s 0:0.0 92=EB >/dev/null 2>&1

            eend $?

         elif (echo "${PCI_Vendor}" | grep -iq "VIA Technologies") && (echo "${PCI_Device}" | grep -iq "KT333"); then

            # Generic KT333 Mainboard

            ebegin "Starting KT333 NB cool bit [generic]"

            setpci -H1 -s 0:0.0 70=86 >/dev/null 2>&1 && setpci -H1 -s 0:0.0 95=1E >/dev/null 2>&1

            eend $?

         elif (echo "${PCI_Vendor}" | grep -iq "VIA Technologies") && (echo "${PCI_Device}" | grep -iq "KT400"); then

            # Generic KT400 Mainboard (experimental: plz mail me if it works, maybee someone could test this for the other chip$

            ebegin "Starting KT400 NB cool bit [generic]"

            setpci -H1 -s 0:0.0 D2=EB >/dev/null 2>&1

            eend $?

         elif (echo "${PCI_Vendor}" | grep -iq "VIA Technologies") && (echo "${PCI_Class}" | grep -iq "Host bridge"); then

            # Unknown VIA host bridge

            [[ "${PCI_Vendor}" != "" ]] && einfo "Vendor: ${PCI_Vendor}"

            [[ "${PCI_Device}" != "" ]] && einfo "Device: ${PCI_Device}"

            [[ "${PCI_SVendor}" != "" ]] && einfo "SVendor: ${PCI_SVendor}"

            [[ "${PCI_SDevice}" != "" ]] && einfo "SDevice: ${PCI_SDevice}"

            eend 1 "Unknown VIA host bridge"

            return 1

         else

            # Unknown host bridge

            # on AMD760/AMD761:

            # enable: setpci -s 0:0.0 0x62=0xb7

            # disable: setpci -s 0:0.0 0x62=0xb1

            # on sis730: (experimental: plz mail me if it works, maybee someone could test this for the other chipsets also ?)

            # enable: setpci -s 0:0.0 6b=0x19

            # disbale: setpci -s 0:0.0 6b=0x18

            # Athlon XP (experimental: plz mail me if it works)

            # enable: setpci -v -H1 -s 0:0.0 92=EB

            # disable: setpci -v -H1 -s 0:0.0 92=6B

            [[ "${PCI_Vendor}" != "" ]] && einfo "Vendor: ${PCI_Vendor}"

            [[ "${PCI_Device}" != "" ]] && einfo "Device: ${PCI_Device}"

            [[ "${PCI_SVendor}" != "" ]] && einfo "SVendor: ${PCI_SVendor}"

            [[ "${PCI_SDevice}" != "" ]] && einfo "SDevice: ${PCI_SDevice}"

            eend 1 "Unknown host bridge"

            return 1

         fi

         # exit while true loop

         break

      fi

   done

}

stop() {

   PCI_Class=""

   PCI_Vendor=""

   PCI_Devic=""

   PCI_SVendor=""

   PCI_SDevice=""

   lspci -m -v -s 0:0.0 | grep -i "^[A-Za-z0-9]" | while true

   do

      read LSPCI_LINE

      LSPCI_LINE_RC="$?"

      LSPCI_KEY=""

      LSPCI_VALUE=""

      LSPCI_KEY="${LSPCI_LINE%%:*}"

      LSPCI_VALUE="${LSPCI_LINE#*:}"

      if [ "${LSPCI_KEY}" = "Class" ]; then

         PCI_Class="${LSPCI_VALUE}"

      elif [ "${LSPCI_KEY}" = "Vendor" ]; then

         PCI_Vendor="${LSPCI_VALUE}"

      elif [ "${LSPCI_KEY}" = "Device" ]; then

         PCI_Device="${LSPCI_VALUE}"

      elif [ "${LSPCI_KEY}" = "SVendor" ]; then

         PCI_SVendor="${LSPCI_VALUE}"

      elif [ "${LSPCI_KEY}" = "SDevice" ]; then

         PCI_SDevice="${LSPCI_VALUE}"

      fi

      if [ "${LSPCI_LINE_RC}" -ne "0" ]; then

         if (echo "${PCI_SVendor}" | grep -iq "Asustek") && (echo "${PCI_SDevice}" | grep -iq "A7V333"); then

            # Asus A7V333 Mainboard

            ebegin "Resetting KT266/266a NB cool bit [A7V333]"

            setpci -H1 -s 0:0.0 92=6B >/dev/null 2>&1

            eend $?

         elif (echo "${PCI_SVendor}" | grep -iq "Microstar") && (echo "${PCI_SDevice}" | grep -iq "K7T266Pro"); then

            # MSI K7T266Pro (MS-6380)

            ebegin "Resetting KT266 NB cool bit [K7T266Pro]"

            setpci -H1 -s 0:0.0 70=82 >/dev/null 2>&1 && setpci -H1 -s 0:0.0 95=1C >/dev/null 2>&1

            eend $?

         elif (echo "${PCI_Vendor}" | grep -iq "VIA Technologies") && (echo "${PCI_Device}" | grep -iq "KT133\|KX133"); then

            # Generic KT133 Mainboard

            ebegin "Resetting KT133/133a and KX133 NB cool bit [generic]"

            setpci -H1 -s 0:0.0 52=6B >/dev/null 2>&1

            eend $?

         elif (echo "${PCI_Vendor}" | grep -iq "VIA Technologies") && (echo "${PCI_Device}" | grep -iq "KT266"); then

            # Generic KT266 Mainboard

            ebegin "Resetting  KT266/266a NB cool bit [generic]"

            setpci -H1 -s 0:0.0 92=6B >/dev/null 2>&1

            eend $?

         elif (echo "${PCI_Vendor}" | grep -iq "VIA Technologies") && (echo "${PCI_Device}" | grep -iq "KT333"); then

            # Generic KT333 Mainboard

            ebegin "Resetting KT333 NB cool bit [generic]"

            setpci -H1 -s 0:0.0 70=82 >/dev/null 2>&1 && setpci -H1 -s 0:0.0 95=1C >/dev/null 2>&1

            eend $?

         elif (echo "${PCI_Vendor}" | grep -iq "VIA Technologies") && (echo "${PCI_Device}" | grep -iq "KT400"); then

            # Generic KT400 Mainboard (experimental: plz mail me if it works, maybee someone could test this for the other chipsets also ?)

            ebegin "Resetting KT400 NB cool bit [generic]"

            setpci -H1 -s 0:0.0 D2=6B >/dev/null 2>&1

            eend $?

         elif (echo "${PCI_Vendor}" | grep -iq "VIA Technologies") && (echo "${PCI_Class}" | grep -iq "Host bridge"); then

            # Unknown VIA host bridge

            [[ "${PCI_Vendor}" != "" ]] && einfo "Vendor: ${PCI_Vendor}"

            [[ "${PCI_Device}" != "" ]] && einfo "Device: ${PCI_Device}"

            [[ "${PCI_SVendor}" != "" ]] && einfo "SVendor: ${PCI_SVendor}"

            [[ "${PCI_SDevice}" != "" ]] && einfo "SDevice: ${PCI_SDevice}"

            eend 1 "Unknown VIA host bridge"

            return 1

         else

            # Unknown host bridge

            # on AMD760/AMD761:

            # enable: setpci -s 0:0.0 0x62=0xb7

            # disable: setpci -s 0:0.0 0x62=0xb1

            # on sis730: (experimental: plz mail me if it works, maybee someone could test this for the other chipsets also ?)

            # enable: setpci -s 0:0.0 6b=0x19

            # disbale: setpci -s 0:0.0 6b=0x18

            # Athlon XP (experimental: plz mail me if it works)

            # enable: setpci -v -H1 -s 0:0.0 92=EB

            # disable: setpci -v -H1 -s 0:0.0 92=6B

            [[ "${PCI_Vendor}" != "" ]] && einfo "Vendor: ${PCI_Vendor}"

            [[ "${PCI_Device}" != "" ]] && einfo "Device: ${PCI_Device}"

            [[ "${PCI_SVendor}" != "" ]] && einfo "SVendor: ${PCI_SVendor}"

            [[ "${PCI_SDevice}" != "" ]] && einfo "SDevice: ${PCI_SDevice}"

            eend 1 "Unknown host bridge"

            return 1

         fi

         # exit while true loop

         break

      fi

   done

}
```

since i do not have a SIS or a AMD board, i can not code the setpci statements i found on the diffrend webpages (i don't know how the lspci output looks on those computers...), but anyone is welcome to modify the script to include the other chipsets. just post the result back so others can profit from your changes.

cheers

SteveB

----------

## StanoMagic

dose anyone have an idea how to get my CPU Temp down? Witch setings are to take in WPCREDIT to cool it down? It worked gread on my old KT266 Bord. But im not so familar to WPCREDIT. 

Thanx StanoMagic

----------

## Kruuse

Board: Soltek SL-75KAV, BIOS: Q11

CPU: TBird 1200

Chipset: KT133A

Enable:

```
setpci -v -H1 -s 0:0.0 52=EB >/dev/null && setpci -v -H1 -s 0:0.0 70=C4 >/dev/null
```

Disable: 

```
setpci -v -H1 -s 0:0.0 52=6B >/dev/null && setpci -v -H1 -s 0:0.0 70=C0 >/dev/null
```

Changing register #70 fixes the sound problem for me.  :Smile: 

[70:2]=PCI Master Read Caching  0=disable   1=enable

Cheers,

Jens

----------

## TheCoop

my bios now has a 'CPU Halt Command Detection' which i guess does the same thing, its bout 2C cooler than before

MSI KT4 Ultra (latest bios), KT400 chipset

AMD Barton 2500+ overclocked

----------

## stodgel

This is very interesting. Is there some way to check the cpu temp in Linux. Some sort of app. The only way I can see what the temp is on mine is when it boots up.

My temp tends to run high though, would this help me in Linux w/Athlon XP1700, v-266B chipset?

----------

## TheCoop

look at lm_sensors and gkrellm2

----------

## nouse66

 *steveb wrote:*   

> i have serval boards with a athlon cpu. and i could not resist to enhance the init script wich was posted on this topic, to work on serval computers without need of changing the content of the script. this is what i got so far (i tryed to handle as much possible):
> 
> ```
> 
> ...
> ...

 

That script isn't running for me....

```

bash-2.05b# /etc/init.d/athlon_cool_bit start

 * ERROR:  "/etc/init.d/athlon_cool_bit" has syntax errors in it; not executing...

```

does anyone else have that problem?

----------

## SpinDizzy

 *TheCoop wrote:*   

> my bios now has a 'CPU Halt Command Detection' which i guess does the same thing, its bout 2C cooler than before
> 
> MSI KT4 Ultra (latest bios), KT400 chipset
> 
> AMD Barton 2500+ overclocked

 

Can you toggle this option in the bios?

If you can, a hexdump of the pci data would let everyone with a KT400 northbridge know which bit to set.

eg: 

(as root)

hexdump /proc/bus/pci/00/00.0

Even if you can't toggle it, I'd be interested in the dump to compare with my own.

----------

## TheCoop

umm, im not sure how this can help but here is the 

hexdump with HLT disabled:

```
0000000 1106 3189 0006 2230 0000 0600 0800 0000

0000010 0008 e000 0000 0000 0000 0000 0000 0000

0000020 0000 0000 0000 0000 0000 0000 1106 0000

0000030 0000 0000 00a0 0000 0000 0000 0000 0000

0000040 1900 8088 4482 0001 1911 1088 4482 0000

0000050 00c0 0000 c4f2 2020 10ff 1010 2020 2020

0000060 aa00 2000 99e6 1f40 2d7e d054 7851 0000

0000070 c882 0100 0900 0050 0001 0000 0000 0200

0000080 000f 0000 0080 0000 0002 1a96 0000 0000

0000090 0000 0000 0000 0000 0000 0000 0000 0000

00000a0 c002 0020 0217 1f00 0314 1f00 9821 0000

00000b0 9b7f 9b00 0046 0000 006a 0000 0000 8600

00000c0 0001 0002 0000 0000 0000 0000 0000 0000

00000d0 f515 ea69 1c0f 19f1 ff10 0000 2121 0074

00000e0 0000 0000 ff00 0001 779a 9a9a 9a00 0020

00000f0 0000 0000 0000 0005 0000 0000 0200 0000

0000100
```

with HLT enabled:

```
0000000 1106 3189 0006 2230 0000 0600 0800 0000

0000010 0008 e000 0000 0000 0000 0000 0000 0000

0000020 0000 0000 0000 0000 0000 0000 1106 0000

0000030 0000 0000 00a0 0000 0000 0000 0000 0000

0000040 1900 8088 4482 0001 1911 1088 4482 0000

0000050 00c0 0000 c4f2 2020 10ff 1010 2020 2020

0000060 aa00 2000 99e6 1f40 2d7e d054 7851 0000

0000070 c882 0100 0900 0050 0001 0000 0000 0200

0000080 000f 0000 0080 0000 0002 1baa 0000 0000

0000090 0000 0000 0000 0000 0000 0000 0000 0000

00000a0 c002 0020 0217 1f00 0314 1f00 9821 0000

00000b0 9b7f 9b00 0046 0000 006a 0000 0000 8600

00000c0 0001 0002 0000 0000 0000 0000 0000 0000

00000d0 f515 eae9 1e0f 19f1 ff10 0000 2121 0074

00000e0 0000 0000 ff00 0001 779a 9a9a 9a00 0020

00000f0 0000 0000 0000 0005 0000 0000 0200 0000

0000100

```

Differences are in lines 0000080, and 00000d0

----------

## SpinDizzy

Thanks,

Ok, it is the 2nd bit in the D5 register. Like yours my value without the halt is 1c, toggling the bit on changes this value to 1e.

Using

```
setpci -s 00:00.0 D5=1e
```

 makes a big difference to the idle temperature of the CPU.

To unset this option use

```
setpci -s 00:00.0 D5=1c
```

This is of course specific to the KT400 northbridge. I have no problems with the sound "staggering" as I did when I tried this on a KT133a board (which I could have used Kruuses fix on).

----------

## TheCoop

glad i could be of assistance. could somene amend the first post to reflect this?

----------

## zendron

This is my hexdump of a Epox 8K9A2 VIA KT400:

```

0000000 1106 3189 0006 2230 0000 0600 0800 0000

0000010 0008 d000 0000 0000 0000 0000 0000 0000

0000020 0000 0000 0000 0000 0000 0000 1106 3189

0000030 0000 0000 00a0 0000 0000 0000 0000 0000

0000040 1900 8088 4482 0001 1911 8088 4482 0000

0000050 00c0 0000 85e0 2020 11f1 2010 2020 2020

0000060 aa80 a000 9912 1d40 2d75 d054 7c71 0000

0000070 c882 0100 0941 0050 0001 0000 0000 1000

0000080 0000 0000 0080 0000 0000 0000 0000 0000

0000090 0000 0000 0000 0000 0000 0000 0000 0000

00000a0 c002 0020 0207 1f00 0000 1f00 9821 0004

00000b0 9b7f 9b00 0044 0200 0068 0100 0000 8c00

00000c0 0001 0002 0000 0000 0000 0000 0000 0000

00000d0 f416 eae9 0c4f 19f1 ff21 0000 3221 0030

00000e0 0000 0000 ff00 0001 779a 00cc 9a00 00a0

00000f0 0001 0000 0000 0005 0000 0000 0200 0000

0000100

```

After

```
setpci -s 00:00.0 D5=1e
```

my cpu runs about 4°C cooler when idle.

----------

## iceburglar

Anybody have a working link for the original article? I've been searching that Sudhian site to no avail.

I have a Shuttle SK41G XPC (Small Form Factor), with an XP1700 and the CPU temp seems to be running out of control after a few minutes. I have used this existing setup with windows without any problems, so I am lead to believe something in Gentoo is causing this, but that doesn't sound possible to me.

Any help or ideas would be great.

----------

## semiSfear

 *Mirar wrote:*   

> I wrote this script (/etc/init.d/coolbit):
> 
> #!/sbin/runscript
> 
> # This shell script takes care of starting and stopping the northbridge "cool" bits
> ...

 

since i also got a KT333 on my Soyo mobo i tried ur script. couldn't find any setpci values on my own. and look what comes out when i run sensors now   :Shocked:   :Shocked:   :Shocked: 

```
it87-isa-0290

Adapter: ISA adapter

Algorithm: ISA algorithm

VCore 1:   +1.84 V  (min =  +1.53 V, max =  +1.87 V)

VCore 2:   +3.31 V  (min =  +2.25 V, max =  +2.75 V)   ALARM

+3.3V:     +5.84 V  (min =  +2.96 V, max =  +3.60 V)   ALARM

+5V:       +5.04 V  (min =  +4.50 V, max =  +5.48 V)

+12V:      +9.84 V  (min = +11.36 V, max = +13.80 V)   ALARM

-12V:     -16.09 V  (min = -15.86 V, max = -13.40 V)   ALARM

-5V:       -6.67 V  (min = -10.13 V, max =  -9.44 V)   ALARM

Stdby:     +3.24 V  (min =  +4.50 V, max =  +5.48 V)   ALARM

VBat:      +0.00 V

fan1:        0 RPM  (min = 3000 RPM, div = 2)          ALARM

fan2:     2732 RPM  (min = 3000 RPM, div = 2)          ALARM

fan3:        0 RPM  (min = 3000 RPM, div = 2)          ALARM

Temp1/MB:    +30?C  (min =  +20?C, max =  +60?C)

Temp2/CPU:   -16?C  (min =  +20?C, max =  +60?C)

Temp3:       +12?C  (min =  +20?C, max =  +60?C)

```

now this doesn't seem right no ?

----------

## djinnshi

works really good on a kt266 here  :Very Happy: 

as i'm writing this the temp. has already dropped 5 degrees and is still going down, no sound clicking so far  :Smile: 

----------

## Sleeper

 *nouse66 wrote:*   

> 
> 
> That script isn't running for me....
> 
> ```
> ...

 

Be sure that the last } is followed by a \n (i.e it should not be on the last line)

----------

## Tightwork

i have Asus A7V 333 mobo along with a XP2700, that normally without any setpci settings runs at 35C, im using a enormous thermalright copper heatsink with silver paste, lianli aluminum case, and 4 fans, (2 blowing in, 2 blowing out)

i tried mirar's script (https://forums.gentoo.org/viewtopic.php?t=6131#131460) but i see no difference in tempurature, nor problems with video or audio

though im always up for lower temp if anyone could tell me whats up

----------

## jeffrice

Amazing.  On my XP2000+ KT400,

setpci -s 00:00.0 D5=1e

drops the temp about 12C when idle.

----------

## TheCoop

I think this is a serious case of YMMV, it all depends on the cpu/mobo/bios used...

----------

## sieter

for my k7s5a with sis735 chip I use:

from : http://cip.uni-trier.de/nofftz/linux/Athlon-Powersaving-HOWTO.html

```
on SIS735/740/745/746/755:

    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)))
```

----------

## glamdringlfo

Hey, that's really great.

Enabling those options made a big difference, about 7 degrees or so.

Thanks a lot.  Keep up the good work.

Skal!

Glamdringlfo

----------

## Config

 *Kruuse wrote:*   

> Board: Soltek SL-75KAV, BIOS: Q11
> 
> CPU: TBird 1200
> 
> Chipset: KT133A
> ...

 

I have a QDI Kinetiz 7T and used your version: the temp dropped over 10C° so far   :Shocked: 

Great job   :Very Happy: 

----------

## jkcunningham

I skimmed this thread and didn't notice the HOWTO on this topic referenced anywhere. I found the information very informative. Also, there are several links to little scripts/apps to automate figuring out the commands to toggle the latency timers:

http://www.tldp.org/HOWTO/Athlon-Powersaving-HOWTO/approaches.html

-Jeff

----------

## viperlin

i'd be happy if i was able to monitor my CPU temp, never got sensors working on this new Mobo ,  VIA KT600 chipset, it87 driver it tells me to use but no settings give the correct temp that i know of, can't tell if it's correct

----------

## ikaro

if you dont know if the temperature is correct, then you will need another device to measure the temp on the cpu and then compare with the one you see on sensors.

I dont remember the name of the thing, but you can get one fairlly cheap on any electronics shops.

>---------------[_|_23 C_]__]

looks like this.

----------

## Basti_litho

here:

http://www.linuxwiki.de/AMDPowerSaving (German)

or:

http://www.daniel.nofftz.net/linux/Athlon-Powersaving-HOWTO.html

Best Regards

----------

## srlinuxx

I'm not sure this was discussed yet as I didn't read all the posts, but I think that setpci stuff killed two powersupplies.  I started using it with my year old powermax and acheived amazing cooling results.  One could hear the computer and fans speed up when used.  I was amused and happy for about a month.  Then my ps died.  Well, I didn't make any connection to the setpci command yet and went out and got another ps.  This time an off-brand from a local vender.  It lasted about a month also.  While running this command I did notice how my voltages seemed to fluxuate frequently and sometimes by large percentages.  So, when cheapy bit the dust I went out and got a 100 dollar antec true power - but not running setpci with it!  It's winter here anyway and my computer helps heat the house!   :Smile: 

Anyone else seen this kind of result?

----------

## blu3bird

i have a Bt878 TV-Card and after i enabled this cooling i see lots of with stripes on the screen(only in the tv window) and in the moment i disable it the stripes go away and the picture becomes clear. i'm using the program 

tvtime-0.9.10-r1

so what to choose: hight temperature and a goot picture quality

or: low temperature and bad picture quality

sorry for by bad english  :Wink: 

edit: i solved it, i just emerged xawtv and it works fine...

now my cpu is running @ 25°C and i'm happy   :Mr. Green: 

----------

## MaxDamage

Sorry if this was said before but there is a program that does the job for you: 

```
athcool
```

 It's masked but I have used it for months when I used Debian and there were no problems. I have a KT400 chipset.

----------

## snot

```
root # athcool on

athcool version 0.3.7 - enabling/disabling Athlon Powersaving mode

!!!WARNING!!!

Depending on your motherboard and/or hardware components, 

enabling Athlon powersaving mode may cause:

 * noisy or distorted sound playback

 * a slowdown in harddisk performance

 * system locks or instability

Please use athcool AT YOUR OWN RISK.

VIA KT133/KM133/KL133/KN133[A] series (1106 0305) found

enabling 'Disconnect when STPGNT Detected' bit ...  done

        Address 0x52 : 0x6B -> 0xEB

```

but cpu stays hot and i see no action (when coolin cpuactivity normaly gowes up).

athlon XP2000

VIA KT133A

msi k7t turbo2 mobo

i'm missing something but what?

----------

