# All K7 PowerSaving - GREAT !!!

## tnt

I don't know if this kind of thing was on forum, but I found it's great and I have to share it with you:

http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Athlon-Powersaving-HOWTO.html

It's working!!!

My idle temperature went from 52C to 40C!

I haven't seen any performance impact yet... Tried to compile bzImage several times with PowerSaving enabled and disabled and got same times.

My hardware is Barton 2500+@3000+ and Gigabyte GA-7VT600-1394 (VIA KT-600)

Here's a script I've added to my /etc/init.d:

```
#!/sbin/runscript

# Copyright By TnT ;)

depend() {

        # don't want to mess with this until system is completely up

        need local

}

start() {

        ebegin "Turning ON PowerSaving on this KT-600..."

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

        eend $?

}

stop() {

        ebegin "Turning OFF PowerSaving on this KT-600..."

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

        eend $?

}

```

Turn off the fan and have fun!   :Wink: 

 :Laughing: 

----------

## Plastic

How would this work on different mobos? I'm on an nforce2.

----------

## tnt

Well, I don't know. In HOWTO is written:

 *Quote:*   

> on KT400/KT600:
> 
>     enable:
> 
>     setpci -v -H1 -s 0:0.0 D2=$(printf %x $((0x$(setpci -H1 -s 0:0.0 D2) | 0x80)))
> ...

 

and:

 *Quote:*   

> on Nforce:
> 
>     enable:
> 
>     setpci -v -H1 -s 0:0.0 E7=$(printf %x $((0x$(setpci -H1 -s 0:0.0 E7) | 0x06)))
> ...

 

So, the only way is to try it... Please, inform as if it's working for you.

----------

## tnt

I've just checked on my Mandrake 9.1 server and it works, too. I had to remove acpi=off boot option and to load processor.o module. 

It's Thunderbird 950MHz on old KT-133 (without 'A') QDI Kinetiz7T. 

CPU temperature went down from 47C to 39C !!!

 :Laughing: 

Script I'm using on server is:

```
#!/bin/bash

# Copyright By TnT ;)

# See how we were called.

case "$1" in

  start)

        echo "Turning ON PowerSaving on this KT-133..."

            modprobe processor

            modprobe thermal

#           modprobe fan

            setpci -v -H1 -s 0:0.0 52=$(printf %x $((0x$(setpci -H1 -s 0:0.0 52) | 0x80)))

        touch /var/lock/subsys/powersaving

        ;;

  stop)

        echo "Turning OFF PowerSaving on this KT-133..."

            setpci -v -H1 -s 0:0.0 52=$(printf %x $((0x$(setpci -H1 -s 0:0.0 52) & 0x7f)))

        rm -f /var/lock/subsys/powersaving

        ;;

  *)

        # do not advertise unreasonable commands that there is no reason

        # to use with this device

        gprintf "Usage: %s\n" "$(basename $0) {start|stop}"

        exit 1

esac

exit 0

```

EDIT: There was some very annoying wisling when PowerSaving were turned on of KT-133, so I had to turn it off   :Crying or Very sad:  . At the end, it's better to make T-bird suffer a little bit then my ears...Last edited by tnt on Mon Sep 20, 2004 1:39 am; edited 1 time in total

----------

## Safrax

This little feature is called the C2 Disconnect Bit.  All Athlon motherboards have the feature but the register that is used to enable or disable it is different on each northbridge chipset type.  For nforce 2 motherboards its usually register 6F set to 1F.

----------

## tnt

Are there any "contraindications"  :Question: 

----------

## Safrax

 *tnt wrote:*   

> Are there any "contraindications" 

 

Contradictions and I'm not sure what you mean.  There usually aren't any problems with it other than the squeal you described although hard locking has been reported and other "Weirdness" but mainly on older chipsets.

----------

## tnt

KT-133 is realy very old...

English is not my native language, but I've found this:

 *Quote:*   

> Main Entry: con·tra·in·di·ca·tion
> 
> Pronunciation: -"in-d&-'kA-sh&n
> 
> Function: noun
> ...

 

Anyway, thank you for information. I've turned PowerSavig off on my old KT-133 and kept it running on KT-600 without any complains (so far)...   :Rolling Eyes: 

----------

## Safrax

 *tnt wrote:*   

> KT-133 is realy very old...
> 
> English is not my native language, but I've found this:
> 
>  *Quote:*   Main Entry: con·tra·in·di·ca·tion
> ...

 

AFAIK there is nothing that would make using this inadvisable.

Also sorry about correcting you.

----------

## tnt

 *Quote:*   

> Also sorry about correcting you.

 

No problem! I'm very unshure in English and this made me to check once more for that word. That was usefull - now I'll remember it and be sure about it.  :Laughing: 

So far I've seen only good side of this PowerSaving and temperature lowering, and if there's no bed side of it I wonder why it's not turned on by default?

It would be great to check your chipset type in kernel configuration (near ACPI support) and to get this working without boot scripts  :Idea: 

----------

## Safrax

 *tnt wrote:*   

>  *Quote:*   Also sorry about correcting you. 
> 
> No problem! I'm very unshure in English and this made me to check once more for that word. That was usefull - now I'll remember it and be sure about it. 
> 
> So far I've seen only good side of this PowerSaving and temperature lowering, and if there's no bed side of it I wonder why it's not turned on by default?
> ...

 

There is a potential for a hard lock when this feature is on hence why it's never turned on by default.  But that chance is mainly with older motherboards or poorly built motherboards.

At one time it was enabled by default in the linux kernel until people with poorly designed motherboards complained about lockups and squealing from the soundcard.

----------

## MrApples

i could be wrong, but isnt this the same as athcool?

----------

## Safrax

 *MrApples wrote:*   

> i could be wrong, but isnt this the same as athcool?

 

Probably.

----------

## MrApples

yeah im pretty sure it is, it would be easier to just emerge athcool

----------

## PrakashP

And safer too...

NForce2 users should be aware that the C2 Disconnect bug could strike you it you don't update another register, as well (unless your bios does thi.) The kernel fixes the porblem only if disconnect is already activated. But you can tell the kernel to always enable fixed c2 disconnect on nforce2 it you properly edit the file pci-fixup.c in the kernel sources in arch/i386/pci, IIRC.

----------

## tnt

 *Safrax wrote:*   

>  *tnt wrote:*    *Quote:*   Also sorry about correcting you. 
> 
> No problem! I'm very unshure in English and this made me to check once more for that word. That was usefull - now I'll remember it and be sure about it. 
> 
> So far I've seen only good side of this PowerSaving and temperature lowering, and if there's no bed side of it I wonder why it's not turned on by default?
> ...

 

Well, I'm so confused: 

Why chipset makers don't keep this option turned ON on the chipsets that fully support it? They have to know which is good for that and wich is not - they are making them! 

 :Laughing: 

----------

## Safrax

AMD doesn't recommend it on K7 platforms due to the sound squealing and the potential for lockups.  Some motherboards support the feature via a BIOS option like my Abit AN7 (although the last bios update broke it).

----------

