Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Howto: Dynamic CPU speed with Athlon XP and nForce2 boards
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3, 4, 5, 6  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Hasw
n00b
n00b


Joined: 31 Dec 2004
Posts: 68
Location: Germany

PostPosted: Fri Dec 31, 2004 4:40 am    Post subject: Howto: Dynamic CPU speed with Athlon XP and nForce2 boards Reply with quote

Dynamic CPU speed with Athlon XP and nForce2 boards

Do you own a nForce2 based mainboards? Than that is maybe for you
if you want to dynamically change you CPU speed and voltage (power
saving when idle).

Frequency changing is available on all nForce2-based mainboards with
all CPUs which run on that board. However for dynamic CPU core voltage
changing there must a ATXP1 chip on the board.

On this boards VCore changing is supported (more are possible):

    Abit NF7
    Aopen AK79D-400VN
    Chaintech CT-7NJ(S,L1)
    DFI Infinity NFII Ultra
    DFI Lanparty NFII Ultra
    Epox 8RDA+
    Epox 8(R,G)DA(3,6,+,I,E)
    Shuttle AN35N Ultra V1.1
    Shuttle SN45G (not V3)
    Soltek 75FRN2-L
    Soltek NV400-L64

Frequency changing is done via FSB control. This works good because the PCI/AGP-clock is controlled independently. RAM/FSB are synchronized. Mostly the RAM is the limiting factor.

Some maybe think why not change the FID (multiplier) like the Athlon Mobile (there are L-bridge mods to change a XP to a Mobile [1]). With some chipsets this is possible and there
are patches for powernow-k7 to work on desktop boards. Unfortunately I've not heard yet that this works with the nForce2 chipset.

So now lets begin:

1. Get the cpufreq/atxp1 module working :
Kernel 2.6.10 includes cpufreq-nforce2, but you can also
get it from http://www.hasw.net/linux

Kernel patches are available here: http://www.hasw.net/linux/atxp1-0.6.tar.bz2

Now in the kernel-config:

Code:

       
        Power management options (ACPI, APM)  --->
         CPU Frequency scaling  --->
                [*] CPU Frequency scaling
                Default CPUFreq governor (userspace)
                <M> nVidia nForce2 FSB changing       (only 2.6.10)
       
        Device Drivers  --->
         I2C support  --->
          <*> I2C support
          <M>   I2C device interface
          I2C Hardware Bus support  --->
           <M> ISA Bus support            (for hardware-monitoring chips)
           <M> Nvidia Nforce2
          Hardware Sensors Chip support  --->
           <M> ITE IT87xx and compatibles
           <M> Winbond W83781D, W83782D, W83783S, W83627HF, Asus AS99127F
           <M> Winbond W83627HF, W83627THF, W83637HF, W83697HF       (depending which chip your board uses)
          Other I2C Chip support  --->
              <M> Attansic ATXP1 VID controller
       


2. Test the cpufreq module:
Code:

        root@hasw root # modprobe cpufreq-nforce2
        root@hasw root # dmesg
        ......
        cpufreq: Detected nForce2 chipset revision A2
        cpufreq: FSB changing is maybe unstable and can lead to crashes and data loss.
        cpufreq: FSB currently at 200 MHz, FID 9.0
       


If the detected FSB isn't correct, stop here and contact me (hasw@hasw.net).
The FID can be set with:
Code:

        root@hasw cpufreq # modprobe cpufreq-nforce2 fid=95
       

for a 9.5 multiplier.

Otherwise you have now the cpufreq control-files in /sys:

Code:

        root@hasw root # cd /sys/devices/system/cpu/cpu0/cpufreq/
        root@hasw cpufreq # cat scaling_max_freq
        1800000
        root@hasw cpufreq # cat scaling_min_freq
        1278000
       



The frequency is in kHz. If you have compiled in multiple cpufreq governors, you have to switch it
first, before you can do changes via userspace:
Code:

   echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
   


Now you can try to set a new frequency, for example:
Code:

        root@hasw cpufreq # echo 1700000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
        root@hasw cpufreq # cat /proc/cpuinfo
        ....
        cpu MHz         : 1696.509
        ....
       


3. Find the minimum FSB (optional)
Because of some internal chipset timings, the FSB is limited downwards. If no module
option is given, the minimum FSB defaults to FSB at boot time - 50 MHz which should
work in the most cases.
If you want to set a lower FSB limit, use the min_fsb module option:
Code:

        root@hasw cpufreq # modprobe cpufreq-nforce2 min_fsb=140
       


On the most boards, the limit is between 130 and 140 MHz. To be on the save side, use 140 instead of 133.
For the Shuttle AN35N you can try to lower it < 100 MHz, they've the greatest working FSB range (some 60-240 MHz).

Get prime95 from http://www.mersenne.org/freesoft.htm for stress testing. It works good for me because the torture test stops when the CPU produces calculation errors. It detects
errors even if it seems that all is working.

Stop X and all uneeded services, so that there's no/small impact if the computer crashes (you have backups, of course ;)

Now run the prime95 torture test and lower the CPU speed every 30s approx. 100 MHz:
Code:

        root@hasw cpufreq # echo 1700000 > scaling_setspeed
        root@hasw cpufreq # echo 1600000 > scaling_setspeed
        ...
       


If prime95 reports hardware failure stop and add 50-100 MHz. Let prime95 run about one or two hours. If it crashes immediately, you also know where to stop ;)

Now you have your minimum FSB and can add it as module-option:
Code:

        root@hasw root # echo "options cpufreq-nforce2 min_fsb=142" > /etc/modules.d/cpufreq-nforce2
        root@hasw root # modules-update
       


4. Get the atxp1 module working:
Code:

        root@hasw root # modprobe i2c_nforce2
        root@hasw root # modprobe atxp1
        root@hasw root # dmesg
        .... atxp1: Detected on SMBus nForce2 adapter at 5000, address 0x37
        ....
       


To control the changes, also get hardware monitoring working:
Code:

        root@hasw root # modprobe i2c_isa
        root@hasw root # modprobe w83781d
        root@hasw root # cat /sys/bus/i2c/devices/2-0290/in1_input
        1648
       


This is for my 8RDA+ and shows 1648 mV CPU core voltage. You may have another monitoring chip and/or VCore input.

Now first lower your CPU frequency and then the voltage:
Code:

        root@hasw root # echo 1400000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
        root@hasw root # echo 1500 > /sys/bus/i2c/devices/0-0037/cpu_vid
        root@hasw root # dmesg
        ....
        atxp1: Setting VCore to 1500 mV (0x0e)
        root@hasw root # cat /sys/bus/i2c/devices/2-0290/in1_input
        1520
       


There's often a small positive offset, so that's normal if it shows a little bit more.

5. Find lowest core voltage for different frequencys
You can use the same mechism used to find the minimum FSB. The smallest possible steps are 25mV. Decrease the voltage until it reports errors, add 50mV and you should be on the safe (stable) side.

6. Save changes
You now have the control over your CPU speed and core voltage. Happy power-saving ;)

Add the modules to your /etc/modules.autoload.d/kernel-2.6 file to load the at startup, mine shows:
Code:

        ...
        cpufreq-nforce2
        i2c-nforce2
        i2c-isa
        atxp1
        w83781d
 


This does not work because the permissions are reset after some time.
---------------------------------------------------------------------
Because the /sys files are only writeable by root, you may want to write them as user. If your user is the the group wheel you can add to your /etc/conf.d/local.start:
Code:

        # Change cpufreq permission
        CPUDIR="/sys/devices/system/cpu/cpu0/cpufreq"
        if [ -d $CPUDIR ]
        then
                echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
      chgrp wheel $CPUDIR/scaling_setspeed
                chmod 664 $CPUDIR/scaling_setspeed
        fi

        # Change ATXP1 permission
        ATXP1="/sys/bus/i2c/devices/0-0037/cpu_vid"
        if [ -f $ATXP1 ]
        then
                chgrp wheel $ATXP1
                chmod 664 $ATXP1
        fi
       

---------------------------------------------------------------------

Also important is that the most BIOSes only reset the voltages when the power was totally off (pull plug).
So you have to reset your VCore before reboot!

You can put this in your /etc/conf.d/local.stop

Code:

   # Reset CPU core voltage
   ATXP1="/sys/bus/i2c/devices/0-0037/cpu_vid"
   if [ -f $ATXP1 ]
   then
      echo 1600 > $ATXP1
   fi
   



7. Some example scripts
Here are some example scripts to set CPU speed and core voltage:

set_cpuspeed.sh
Code:

        #!/bin/sh

        CPUDIR="/sys/devices/system/cpu/cpu0/cpufreq"
        VCORE="/sys/bus/i2c/devices/0-0037/cpu_vid"

        # Check if cpufreq driver and ATXP1 s available
        test -w $CPUDIR/scaling_setspeed || exit 0
        test -w $ATXP1 || exit 0

        if [ -z "$1" -o -z "$2" ]
        then
                echo "Usage: $0 (CPU speed in MHz) (Core voltage in mV)"
                exit 0
        fi
        CFREQ="`cat $CPUDIR/scaling_cur_freq`"
        CVCORE="`cat $VCORE`"
        NFREQ="$(($1*1000))"
        NVCORE="$2"

        if [ $NFREQ -gt $CFREQ ]
        then
                # First apply new Vcore
                echo $NVCORE > $VCORE
                # ...then new frequency
                echo $NFREQ > $CPUDIR/scaling_setspeed

        elif [ $NFREQ -lt $CFREQ ]
        then
                # First frequency
                echo $NFREQ > $CPUDIR/scaling_setspeed
                echo $NVCORE > $VCORE
        fi
       


I'm using fluxbox and using a small script to generate a menu with CPU speed presets:

cpuspeed:
Code:

        1800@1625
        1400@1450
        1278@1150
       


create_cpumenu.sh:
Code:

        #!/bin/sh

        FBDIR="$HOME/.fluxbox"

        if [ ! -f $FBDIR/cpuspeed ]
        then
                exit 0
        fiecho "[submenu] (cpufreq) {CPU speed}" > $FBDIR/cpumenu
       
        for SPEED in `cat $FBDIR/cpuspeed`
        do
                FREQ="`echo  $SPEED | cut -d'@' -f1`"
                VCORE="`echo $SPEED | cut -d'@' -f2`"
       
                echo "[exec] ($FREQ MHz @ $VCORE mV) {$FBDIR/set_cpuspeed.sh $FREQ $VCORE}" >> $FBDIR/cpumenu
        done
       
        echo "[end]" >> $FBDIR/cpumenu
       


Also my .torsmorc (system monitor) gets updated:
Code:

        ${color grey}Sensor:
        CPU:$color ${execi 15 ~/.sensor-cpu.sh}${color grey}
       


sensor-cpu.sh:
Code:

        CPUDIR="/sys/devices/system/cpu/cpu0/cpufreq"
        SENSOR="/sys/bus/i2c/devices/2-0290"

        test -d $CPUDIR || exit 0
        test -d $SENSOR || exit 0

        FREQ="$((`cat $CPUDIR/scaling_cur_freq`/1000)) MHz"
        #FREQ="`awk '/MHz/ {print $4}' /proc/cpuinfo | sed -e 's/\..*$//'` MHz"
        VCORE="`cat $SENSOR/in1_input` mV"
        TEMP="$((`cat $SENSOR/temp2_input` / 1000)) <B0>C"

        echo -n "$FREQ @ $VCORE ($TEMP)"
       


There are many other possibilities, including dynamic changing depending on the CPU load, etc. ;)

Here is a nice Python-script which changes frequency and voltage on demand: http://www.lextech.net/work/autoFreq/


Last edited by Hasw on Sun Mar 20, 2005 9:59 pm; edited 8 times in total
Back to top
View user's profile Send private message
NewBlackDak
Guru
Guru


Joined: 02 Nov 2003
Posts: 512
Location: Utah County, UT

PostPosted: Fri Dec 31, 2004 8:08 am    Post subject: Re: Howto: Dynamic CPU speed with Athlon XP and nForce2 boar Reply with quote

Hasw wrote:
There are many other possibilities, including dynamic changing depending on the CPU load, etc. ;)


This would be nice for alot of people.
Even though I have foldingathome or a compile running 24x7 I'm gonna try this to see if I Can get it working.
_________________
Gentoo systems.
X2 4200+@2.6 - Athy
X2 3600+ - Myth
UltraSparc5 440 - sparcy
Back to top
View user's profile Send private message
the_foxhond
n00b
n00b


Joined: 02 Jan 2005
Posts: 1

PostPosted: Sun Jan 02, 2005 1:18 am    Post subject: cpufreq-nforce2 Reply with quote

How would I apply the cpufreq-nforce2 patch? I tried using make on it , but, it ended up returning an error, I'd c opy paste it if I had a middle mouse button but it seems to complain about a cpufreq not being declared.
Back to top
View user's profile Send private message
Hasw
n00b
n00b


Joined: 31 Dec 2004
Posts: 68
Location: Germany

PostPosted: Sun Jan 02, 2005 1:51 am    Post subject: Reply with quote

You have already running a 2.6 kernel version (>2.6.8, otherwise it won't work), so you should think switching to 2.6.10. If you don't want that, configure the kernel the same way mentioned above except without
Code:
<M> nVidia nForce2 FSB changing
.

Install your new kernel and reboot.
Than get the module (it isn't the kernel-patch, my mistake) and just do:

Code:

hasw@hasw cpufreq-nforce2-0.2 $ make
make -C /lib/modules/2.6.10/build SUBDIRS=/home/hasw/cpufreq-nforce2-0.2 modules
make[1]: Entering directory `/usr/src/linux-2.6.10'
  CC [M]  /home/hasw/cpufreq-nforce2-0.2/cpufreq-nforce2.o
  Building modules, stage 2.
  MODPOST
  CC      /home/hasw/cpufreq-nforce2-0.2/cpufreq-nforce2.mod.o
  LD [M]  /home/hasw/cpufreq-nforce2-0.2/cpufreq-nforce2.ko
make[1]: Leaving directory `/usr/src/linux-2.6.10'
hasw@hasw cpufreq-nforce2-0.2 $


And copy the cpufreq-nforce2.ko module to /lib/modules/`uname-r`/kernel/arch/i386/kernel/cpu/cpufreq

If you got an error you should post it ;) Use a xterm or run gpm for c&p.
Back to top
View user's profile Send private message
NewBlackDak
Guru
Guru


Joined: 02 Nov 2003
Posts: 512
Location: Utah County, UT

PostPosted: Sun Jan 02, 2005 10:01 am    Post subject: Reply with quote

FYI if I try anything below 150(while booted above 166 FSB) FSB on my NF7-S if locks hard. If I boot with with 166 FSB I'm good from 133-166.
_________________
Gentoo systems.
X2 4200+@2.6 - Athy
X2 3600+ - Myth
UltraSparc5 440 - sparcy
Back to top
View user's profile Send private message
PrakashP
Veteran
Veteran


Joined: 27 Oct 2003
Posts: 1246
Location: C.C.A.A., Germania

PostPosted: Sun Jan 02, 2005 11:42 am    Post subject: Reply with quote

On my NF7-S 2.0 I have range 125 to 200 MHz. Using it since some months now. :)

But I just tried the atxp1 module. Is it necessary to build this i2c stuff as modules? I have them compiled into kernel. Nevertheless trying to compile atxp1 I get:

Code:

make -C /lib/modules/2.6.10-ck1/build SUBDIRS=/home/light/atxp1-vcore-0.2 modules
make[1]: Entering directory `/usr/src/linux-2.6.10-ck1'
  Building modules, stage 2.
  MODPOST
*** Warning: "__fixunsdfsi" [/home/light/atxp1-vcore-0.2/atxp1.ko] undefined!
*** Warning: "__adddf3" [/home/light/atxp1-vcore-0.2/atxp1.ko] undefined!
*** Warning: "__floatsidf" [/home/light/atxp1-vcore-0.2/atxp1.ko] undefined!
make[1]: Leaving directory `/usr/src/linux-2.6.10-ck1'
cp ./atxp1.ko /lib/modules/`uname -r`/kernel/drivers/i2c/chips
cp: reguläre Datei ,,/lib/modules/2.6.10-ck1/kernel/drivers/i2c/chips" kann nicht angelegt werden: Datei oderVerzeichnis nicht gefunden
make: *** [default] Fehler 1


Ans ideas to fix? Is a kernel patch for this module available?
Back to top
View user's profile Send private message
Hasw
n00b
n00b


Joined: 31 Dec 2004
Posts: 68
Location: Germany

PostPosted: Sun Jan 02, 2005 3:21 pm    Post subject: Reply with quote

To get no unresolved symbols, remove -msoft-float from the CFLAGS in arch/i386/Makefile. Not sure yet why this occurs, there are no FP operations in the module.

Then all should be fine, except the directory for I2C modules is missing because you have them in the kernel. Just run
Code:
 mkdir -p /lib/modules/`uname -r`/kernel/drivers/i2c/chips
before make.
Back to top
View user's profile Send private message
Hasw
n00b
n00b


Joined: 31 Dec 2004
Posts: 68
Location: Germany

PostPosted: Sun Jan 02, 2005 4:00 pm    Post subject: Reply with quote

The kernel patch is now available at: http://www.hasw.net/linux/atxp1-0.2.patch
Back to top
View user's profile Send private message
PrakashP
Veteran
Veteran


Joined: 27 Oct 2003
Posts: 1246
Location: C.C.A.A., Germania

PostPosted: Sun Jan 02, 2005 4:50 pm    Post subject: Reply with quote

Thanx for the patch!

Is is possible to fix the driver w/o messing with that makefile?

The trouble maker is:

Code:

static unsigned char atxp1_calc_vid(unsigned int vt) {
   return(((1850 - vt) / 25 + 0.5));
}


With your workaround it compiles. Haven't tested the module, though. Going to do that now. :)

BTW, this is my suggestion for a fix:

Code:

static unsigned char atxp1_calc_vid(unsigned int vt) {
   return(((18500 - vt*10) / 25 + 5)/10);
}



(later) Yes! atxp1 works nicely. :) Trying to find out how much I can undervolt at 1375MHz. Nice work, Hasw! 8)

(even later) So I had a shock for a moment: While finding my lower bound I saw in dmesg that I cannot go below 1075V. Well I tried 1075, but ZAP my screen got black. HW reset didn't help as well. I had to "pull the plug" wait and then my machine got revived. What went wrong? 1100 works and I am finding out whether it is stable. 1,1V is the lowest setting in BIOS AFAIK, btw.
Back to top
View user's profile Send private message
Hasw
n00b
n00b


Joined: 31 Dec 2004
Posts: 68
Location: Germany

PostPosted: Sun Jan 02, 2005 6:35 pm    Post subject: Reply with quote

Ok, thanks for the calculation fix.

Ups, yes the lower bound should be fixed. Because not all VCore controllers support 1.075V. You have a NF7 and the ID of 1.075V means here: power off CPU core voltage ;)

You need to fully power off, so that the device is reset.
Back to top
View user's profile Send private message
PrakashP
Veteran
Veteran


Joined: 27 Oct 2003
Posts: 1246
Location: C.C.A.A., Germania

PostPosted: Sun Jan 02, 2005 6:58 pm    Post subject: Reply with quote

Ah, OK, good explanation. So, users should be warned, I guess. ;)
Back to top
View user's profile Send private message
Hasw
n00b
n00b


Joined: 31 Dec 2004
Posts: 68
Location: Germany

PostPosted: Sun Jan 02, 2005 8:48 pm    Post subject: Reply with quote

Updated the patch: http://www.hasw.net/linux/atxp1-0.3.tar.bz2

Fixed unresolved symbols problem
Added module option for lowest possible voltage (1075 or 1100 [default])
Fixed loop when setting 1850 mV
Added update lock
Renamed sys-device file from vcore to cpu_vid
Back to top
View user's profile Send private message
PrakashP
Veteran
Veteran


Joined: 27 Oct 2003
Posts: 1246
Location: C.C.A.A., Germania

PostPosted: Mon Jan 03, 2005 12:48 pm    Post subject: Reply with quote

Please fix this in your instructions above:

Code:

   if [ -f $ATXP1/vcore ]


With atxp1 0.3 this obviously is wrong. ;) Then it wouldn't be bad if you add this line before all:
Code:

echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor



BTW, is is possible to couple fsb and vcore in kernel space? I find it a bit dangerous currently (though nice that it works at all :) ). It is easy to lock up the machine currently, as I found out while I was fighting with my permissions... Furthermore it is a bit risky if a user with wheel rights gets hacked...
Back to top
View user's profile Send private message
Hasw
n00b
n00b


Joined: 31 Dec 2004
Posts: 68
Location: Germany

PostPosted: Mon Jan 03, 2005 6:31 pm    Post subject: Reply with quote

There are two problems coupling FSB and VCore in kernel-space:
1. The FSB:VCore pairs are different between various CPUs.
2. The devices (kernel environment) is completely different.

"Problem" 1. can be solved by adding some /sys interface where the user can input these FSB, VCore combinations. But the second is a little bit more complicated I found.
The cpufreq-device is for the x86 arch and the ATXP1 is an I2C device which is platform independent. Also the kernel environments are different, writing a third module that controls both is possible, but not very nice.

Maybe adding two module options would help for the rights problem:
- Lower limit
- High limit, default: the one which was set at module loading
Back to top
View user's profile Send private message
PrakashP
Veteran
Veteran


Joined: 27 Oct 2003
Posts: 1246
Location: C.C.A.A., Germania

PostPosted: Mon Jan 03, 2005 7:29 pm    Post subject: Reply with quote

Reg problem 1: Of course, this is something each user has to find out on his/her own. ;)

Reg. problem 2: Couldn't you make some sort of "slave mode" to atxp1, that it only accepts changes in vcore from kernel space and a "master mode" for the the cpufrequ driver, that it controlls a slave which connects to it? Some sort of interface is needed, which apparently doesn't exist right now...
Back to top
View user's profile Send private message
PrakashP
Veteran
Veteran


Joined: 27 Oct 2003
Posts: 1246
Location: C.C.A.A., Germania

PostPosted: Tue Jan 04, 2005 11:23 am    Post subject: Reply with quote

Ok, I am having a problem with my permissions. It seems they get reseted after some time. I guess this is udev coming in between. Perhaps the best would be to let udev handle the permissions? Does anyone have a nice ruleset for it? I could be on the wrong track, as well, as I don't know whether I can manipulate /sys with udev... Otherwise I'll help myself with sudo.
Back to top
View user's profile Send private message
Hasw
n00b
n00b


Joined: 31 Dec 2004
Posts: 68
Location: Germany

PostPosted: Tue Jan 04, 2005 4:53 pm    Post subject: Reply with quote

Yes, I've already updated the howto. Haven't recognized it because when I experimenting with new modules I was logged in as root.

I don't think udev has something to do with it (I'm using devfsd), the sysfs is controlled by kernel and udev normally only controls /dev permissions.
I haven't found out yet why the permissions are reset (I mean, why allow setting new permissions when they are reversed after some time?)

As you have mentioned a workaround could be running a script via sudo.
Back to top
View user's profile Send private message
PrakashP
Veteran
Veteran


Joined: 27 Oct 2003
Posts: 1246
Location: C.C.A.A., Germania

PostPosted: Tue Jan 04, 2005 9:46 pm    Post subject: Reply with quote

Too bad, on the second thought I also had supicions about udev... Well, I could bug lkml and hope to get an answer on what would be the correct way for this...I guess the kernel has no specifiv Docs about /sys?

But perhaps they would say to use an userspace prog, like speedfreq which has an daemon runninr with root rights and a client for the user...

[edit]
Thinking further I guess it is the best to modify eg speedfreq or whatever to set vcore as well. So you could couple fsb and vcore, but in userspace. Of course the coupling should only be modifyable by root, so this would be pretty safe then.


Last edited by PrakashP on Wed Jan 05, 2005 10:07 am; edited 1 time in total
Back to top
View user's profile Send private message
micmac
l33t
l33t


Joined: 28 Nov 2003
Posts: 989

PostPosted: Wed Jan 05, 2005 1:56 am    Post subject: Reply with quote

Hello!

I already tried cpufreq-nforce2 (without voltage changing) some time ago. Even with the default min_fsb it locked up my box eventually. The board is an ASUS A7N8X-X. I got an Athlon 1700+ and 2x256MB DDR.
Is it even worth it? I mean the usual nforce2 board enables STPGNT per default (mine does, too). Can you measure the amound of electricity you save with additional cpufreq-nforce2?

Thanks!

mic
Back to top
View user's profile Send private message
Sonic Lux
Guru
Guru


Joined: 07 Mar 2004
Posts: 375
Location: Dresden / Germany

PostPosted: Wed Jan 05, 2005 11:08 am    Post subject: Reply with quote

Thx it works on my NF7 from 100FSB@1,2Vcore till 225FSB@1,95Vcore.

Thx a lot for this howto !!
Back to top
View user's profile Send private message
pussi
l33t
l33t


Joined: 08 May 2004
Posts: 727
Location: Finland

PostPosted: Wed Jan 05, 2005 10:15 pm    Post subject: Re: Howto: Dynamic CPU speed with Athlon XP and nForce2 boar Reply with quote

Hasw wrote:

Also my .torsmorc (system monitor) gets updated:
Code:

        ${color grey}Sensor:
        CPU:$color ${execi 15 ~/.sensor-cpu.sh}${color grey}
       


I you're using torsmo 0.18 you can monitor your CPU frequency and temperature (already in 0.16?) without any scriping.

Add to your .torsmorc:
Code:
${color grey90}CPU Sensors:
    frequency: ${color white}${freq}MHz
    temperature: ${color white}${i2c temp <1 or 2 here :)>}°C

This should be faster than bash scripts but you can't monitor your vcore (unless you make another script for it). :wink:
Back to top
View user's profile Send private message
navier-stokes
n00b
n00b


Joined: 03 Jul 2004
Posts: 41

PostPosted: Fri Jan 07, 2005 2:17 am    Post subject: Reply with quote

If you also compile cpufreq governors in your kernel along with this patch, you can easily emerge cpudyn and configure it for your desktop (powersaving according to load). I'm using it now along with (emerge) gnome-cpufreq-applet-0.1.1 and it works great!
_________________
Tyan Thunder K8W; dual 244's, 2Gigs ECC, SBLive, G4Ti4600,
Flatron lcd 885LE
Back to top
View user's profile Send private message
micmac
l33t
l33t


Joined: 28 Nov 2003
Posts: 989

PostPosted: Sat Jan 08, 2005 7:29 pm    Post subject: Reply with quote

Yes, a daemon would be great to have. I mean with cpufreq-nforce2 you can easily use any daemon you want, like speedfreq etc. But what really would be ubercool is a daemon that not only can handle the FSB frequenzy changes but also the changes to cpu core voltage. But I think that's a hard task as no one can predict stable pairs of frequenzy and voltage. There are such tables for mobile CPUs like Pentium-M but not for all kinds of mainboards.
But of course we could set up the tables ourselves using programs like prime95, can't we. That way we get stable frequenzy (=multis?)/voltage pairs for our own hardware. Maybe these don't even on the cpu but on the mainboard only?
To sum it up, I'd hate doing all the switching manually. I'd rather have it done dynamically by a daemon. Can anyone suggest what to do?

micmac
Back to top
View user's profile Send private message
Hasw
n00b
n00b


Joined: 31 Dec 2004
Posts: 68
Location: Germany

PostPosted: Sun Jan 09, 2005 7:00 pm    Post subject: Reply with quote

Quote:

Is it even worth it? I mean the usual nforce2 board enables STPGNT per default (mine does, too). Can you measure the amound of electricity you save with additional cpufreq-nforce2?


In addition with CPU core voltage changing: yes. STPGNT only comes in when the CPU is idle, while a low clocked CPU also saves power when not idle.

I've a 300W PSU and I hear it (fan) when I change the frequency/vcore in big steps. For 2000 @ 1.65V to 1000 @ 1.1V I think you save (under max. load) approx. 30-50W.

I think the best way is patching an existing cpufreq daemon to handle the FREQ<->VCore pairs or more general running commands before/after frequency changing. If there's someone who wants to do that, good. If not I'll do this when the ATXP1 module is finished (also the cpufreq-nforce2 gets a little bit tweaked).
Back to top
View user's profile Send private message
Jinidog
Guru
Guru


Joined: 26 Nov 2003
Posts: 593
Location: Berlin

PostPosted: Mon Jan 10, 2005 1:33 pm    Post subject: Reply with quote

I was able to reduce the FSB-clock on a Elitegroupe N2U400.
Although I didn't do much tests, I think you can add it to your list of supportet Mainboards.
_________________
Just unused Microsoft-Software is good Microsoft-Software
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2, 3, 4, 5, 6  Next
Page 1 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum