View previous topic :: View next topic |
Author |
Message |
bgradid Apprentice
Joined: 21 Mar 2005 Posts: 162
|
Posted: Mon Mar 28, 2005 3:05 am Post subject: |
|
|
Code: |
bash-2.05b# dmesg | grep cpufreq; egrep 'CPU_?FREQ' /usr/src/linux/.config
cpufreq: Detected nForce2 chipset revision C1
cpufreq: FSB changing is maybe unstable and can lead to crashes and data loss.
cpufreq: FSB currently at 167 MHz, FID 9.5
CONFIG_CPU_FREQ=y
# CONFIG_CPU_FREQ_DEBUG is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
# CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
CONFIG_CPU_FREQ_GOV_USERSPACE=y
# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_TABLE is not set
CONFIG_X86_CPUFREQ_NFORCE2=m
| [/code] |
|
Back to top |
|
|
michael3 n00b
Joined: 17 Aug 2004 Posts: 34
|
Posted: Mon Mar 28, 2005 12:43 pm Post subject: |
|
|
Quote: |
You need the userspace governor, then you will get scaling_setspeed.
Kernel config:
Code: |
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=m
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=y
|
|
Thanks, it works without any problems! |
|
Back to top |
|
|
bgradid Apprentice
Joined: 21 Mar 2005 Posts: 162
|
Posted: Tue Mar 29, 2005 10:49 pm Post subject: |
|
|
bump, any idea why I can't change my frequency? |
|
Back to top |
|
|
micmac l33t
Joined: 28 Nov 2003 Posts: 996
|
Posted: Wed Mar 30, 2005 3:17 pm Post subject: |
|
|
Hi all,
I'm not sure yet but I think disabling C1 Disconnect while using cpufreq_nfoce2 and atxp1 is a good idea and makes the whole setup more stable.
I've made an init-script for autocpufreq. If you want to use it be warned there's no guarantee and you have to adapt the numbers/paths and also check if autocpufreq.py fits your system (thx to woZa). Also the script needs the modules already to be loaded.
/etc/init.d/autocpufreq
#!/sbin/runscript
depend() {
after localmount
}
start() {
ebegin "Starting autocpufreq"
echo `cat $VCORE` > $OLDVCORE
echo $MAXVCORE > $VCORE
echo $(( $MINFSB * $FID * 100)) > $CPUFREQ/scaling_setspeed
echo $MINVCORE > $VCORE
start-stop-daemon --start \
--background \
--make-pidfile \
--pidfile $PIDFILE \
--exec $DAEMON
eend $? "Failed to start autocpufreq."
}
stop() {
ebegin "Stopping autocpufreq"
start-stop-daemon --stop --pidfile $PIDFILE
rm $PIDFILE
echo $(( $MINFSB * $FID * 100)) > $CPUFREQ/scaling_setspeed
echo `cat $OLDVCORE` > $VCORE
echo $(( $BOOTFSB * $FID * 100)) > $CPUFREQ/scaling_setspeed
eend $? "Failed to stop autocpufreq"
}
/etc/conf.d/autocpufreq
# daemon to start
DAEMON=/usr/local/bin/autoCpuFreq.py
PIDFILE=/var/run/autocpufreq.pid
OLDVCORE=/var/run/autocpufreq-oldVCore
#
# ! adjust values !
#
BOOTFSB=133
MAXFSB=133
MAXVCORE=1600
MINFSB=70
MINVCORE=1100
FID=110
VCORE=/sys/bus/i2c/devices/5-0037/cpu0_vid
CPUFREQ=/sys/devices/system/cpu/cpu0/cpufreq
Last edited by micmac on Wed Mar 30, 2005 4:55 pm; edited 3 times in total |
|
Back to top |
|
|
woZa Guru
Joined: 18 Nov 2003 Posts: 340 Location: The Steel City - UK
|
Posted: Wed Mar 30, 2005 3:59 pm Post subject: |
|
|
Good work micmac. That script works a treat for me now...
Don't forget to change the autocpufreq.py file to suite your own needs... Unlike me! Lots of head scratching. I am sure I had done it once already! _________________ A few months struggling with gentoo is better than a lifetime struggling with windoze! |
|
Back to top |
|
|
micmac l33t
Joined: 28 Nov 2003 Posts: 996
|
Posted: Wed Mar 30, 2005 4:53 pm Post subject: |
|
|
woZa wrote: | Good work micmac. That script works a treat for me now...
Don't forget to change the autocpufreq.py file to suite your own needs... Unlike me! Lots of head scratching. I am sure I had done it once already! |
Thx!
What about MAXtemp in the .py-script? Per default it shows true degrees celsius. But I get (true degree celsius * 1000) while doing this:
cat /sys/bus/i2c/devices/4-0290/temp2_input
36000
cat /sys/bus/i2c/devices/4-0290/temp1_input
33000
Should I use something like
MAXtemp=[ 50, 40]
BUFtemp=[ 3, 2]
Or should I use
MAXtemp=[ 50000, 40000]
BUFtemp=[ 3000, 2000]
?
Cheers
mic |
|
Back to top |
|
|
woZa Guru
Joined: 18 Nov 2003 Posts: 340 Location: The Steel City - UK
|
Posted: Wed Mar 30, 2005 5:06 pm Post subject: |
|
|
Code: | MAXtemp=[ 55, 39]
BUFtemp=[ 3, 2] |
is how I have mine... Haven't tested these yet though. Will give it a go and let you know.
[Edit] - Max temp on cpu works fine. hits the value and lowers the fsb and voltage straight away. [/Edit] _________________ A few months struggling with gentoo is better than a lifetime struggling with windoze!
Last edited by woZa on Wed Mar 30, 2005 5:18 pm; edited 1 time in total |
|
Back to top |
|
|
micmac l33t
Joined: 28 Nov 2003 Posts: 996
|
Posted: Wed Mar 30, 2005 5:14 pm Post subject: |
|
|
Btw without C1 Disconnect my system doesn't freeze with atxp1/cpufreq_nforce2 (well, until now at least ). Furthermore C1 Disconnect seems redundant while using atxp1/cpufreq_nforce2, the analog out of my soundcard sounds much better without it and my system doesn't feel laggy anymore while running at low speed (1.1V & 770MHz here).
Cheers
mic |
|
Back to top |
|
|
PrakashP Veteran
Joined: 27 Oct 2003 Posts: 1249 Location: C.C.A.A., Germania
|
Posted: Wed Mar 30, 2005 10:19 pm Post subject: |
|
|
C1 Halt disconnect is not redundant, but with lower frqu the effect is also lower. |
|
Back to top |
|
|
woZa Guru
Joined: 18 Nov 2003 Posts: 340 Location: The Steel City - UK
|
Posted: Thu Mar 31, 2005 9:51 am Post subject: |
|
|
Big thanks to Hasw (the modules), alexejfink (autocpufreq) and micmac (startup scripts). I now have a system that automagically increases/decreases cpu speed and vcore depending on cpuload. Ranges from 1.4Ghz @ 1.1v to 2.5Ghz @ 1.75v.
Now when my new powerbook arrives, this desktop system will become my new server.
All that I need now of for hasw to get off his a*se and write a vdimm module! _________________ A few months struggling with gentoo is better than a lifetime struggling with windoze! |
|
Back to top |
|
|
Dreameen n00b
Joined: 22 Nov 2004 Posts: 7
|
Posted: Sat Apr 02, 2005 6:20 pm Post subject: |
|
|
Code: | LD init/built-in.o
LD vmlinux
drivers/built-in.o(.text+0x8af66): In function `atxp1_detect':
: undefined reference to `i2c_which_vrm'
drivers/built-in.o(.text+0x8ae7e): In function `atxp1_attach_adapter':
: undefined reference to `i2c_detect'
make: *** [vmlinux] Error 1
==> ERROR: Build Failed. Aborting...
|
...and the kernel compilation stops. Any idea how to fix this? I've patched the kernel with atxp1-0.6.patch and i2c-vid-vrm90.patch. |
|
Back to top |
|
|
woZa Guru
Joined: 18 Nov 2003 Posts: 340 Location: The Steel City - UK
|
Posted: Sat Apr 02, 2005 7:54 pm Post subject: |
|
|
Using atxp1-0.3 here. Works fine. Undefined symbol reference with 0.6 _________________ A few months struggling with gentoo is better than a lifetime struggling with windoze! |
|
Back to top |
|
|
Dreameen n00b
Joined: 22 Nov 2004 Posts: 7
|
Posted: Sat Apr 02, 2005 9:27 pm Post subject: |
|
|
woZa wrote: | Using atxp1-0.3 here. Works fine. Undefined symbol reference with 0.6 |
atxp1-0.3 works for me as well. I've stumbled across some problems with the autocpufreq thingy now:
Code: |
Traceback (most recent call last):
File "./autoCpuFreq.py", line 373, in ?
main()
File "./autoCpuFreq.py", line 326, in main
cpufreq = CpuFreqInterface( file_vcore, FID, FSB_vCore)
File "./autoCpuFreq.py", line 228, in __init__
self.checkIntegrity()
File "./autoCpuFreq.py", line 251, in checkIntegrity
raise RuntimeError, "FSB_vCore pair has invalid FSB-entry"
RuntimeError: FSB_vCore pair has invalid FSB-entry
|
|
|
Back to top |
|
|
micmac l33t
Joined: 28 Nov 2003 Posts: 996
|
Posted: Sun Apr 03, 2005 3:15 pm Post subject: |
|
|
Hi!
At last I think I've found what was really causing the freezing. I have to set the CPU frequency setting to a specific value instead of auto in my bios in order for the atxp1 driver to be able to change the voltage. I had set it to 1600, because I thought my 1700+ defaults to 1,6V when running at full speed. Then I came about this page and it seems there are also 1700+ cpus using only 1,5V. So I set the VCore in the bios the 1500 instead and I've never had a freeze since. For now I've Code: | append="elevator=deadline cpufreq_nforce2.min_fsb=60" | in my /etc/lilo.conf, Code: | echo 660000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
echo 1100 > /sys/bus/i2c/devices/2-0037/cpu0_vid | in my /etc/conf.d/local.start and Code: | echo 1500 > /sys/bus/i2c/devices/2-0037/cpu0_vid
echo 1463000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed | in my /etc/conf.d/local.stop and it works. With 1500 it doesn't matter if I en- or disable C1 Disconnect (STPGNT) in the bios. But I disable it anyway, allthough my cpu gets even cooler with it being enabled, because it produces a little noise at my soundcards analog output.
Cheers
micmac |
|
Back to top |
|
|
mikeraach Apprentice
Joined: 20 Jan 2003 Posts: 168
|
Posted: Tue Apr 12, 2005 6:49 am Post subject: |
|
|
Does anyone know why my NF7-S board would create prime errors (and program crashes) after changing only a mere 100mhz (10fsb)?
I've tried different bios's and all result with the same thing. |
|
Back to top |
|
|
PrakashP Veteran
Joined: 27 Oct 2003 Posts: 1249 Location: C.C.A.A., Germania
|
Posted: Fri May 13, 2005 3:34 pm Post subject: |
|
|
I made a patch to cpufreqd to switch Vcore, too. I called it "nvfreqd", which you can find here: http://punnoor.de |
|
Back to top |
|
|
micmac l33t
Joined: 28 Nov 2003 Posts: 996
|
Posted: Thu May 19, 2005 9:02 pm Post subject: |
|
|
PrakashP wrote: | I made a patch to cpufreqd to switch Vcore, too. I called it "nvfreqd", which you can find here: http://punnoor.de |
Thanks!
Works here. Does is change vcore before frequency when speed is increased and the other way around when speed is lowered?
Cheers
mic |
|
Back to top |
|
|
PrakashP Veteran
Joined: 27 Oct 2003 Posts: 1249 Location: C.C.A.A., Germania
|
Posted: Thu May 19, 2005 10:15 pm Post subject: |
|
|
Of course. |
|
Back to top |
|
|
micmac l33t
Joined: 28 Nov 2003 Posts: 996
|
Posted: Fri May 20, 2005 11:01 am Post subject: |
|
|
HI PrakashP!
Thanks. But something is wrong on my system. I have 3 different freq/vcore modes. But while doing something cpu intensive cpufreqd doesn't switch to max_power.
Code: | [General]
pidfile=/var/run/cpufreqd.pid
poll_interval=1
pm_type=acpi #(acpi, apm or pmu)
# Uncomment the following line to enable ACPI workaround (see cpufreqd.conf(5))
# acpi_workaround=1
vcore_path=/sys/bus/i2c/devices/6-0037/cpu0_vid
vcore_default=1500
verbosity=4 #(if you want a minimal logging set to 5)
[Profile]
name=max_power
minfreq=1463000
maxfreq=1463000
vcore=1500
policy=userspace
[Profile]
name=med_power
minfreq=1188000
maxfreq=1188000
vcore=1350
policy=userspace
[Profile]
name=min_power
minfreq=913000
maxfreq=913000
vcore=1200
policy=userspace
[Rule]
name=min
cpu_interval=0-40
profile=min_power
[Rule]
name=med
cpu_interval=30-70
profile=med_power
[Rule]
name=max
cpu_interval=60-100
programs=oggenc,mencoder
profile=max_power |
Like when I encode music the med_power setting is applied. I'd think cpufreqd would switch to max_power because the encoder takes every bit of cpu it can get. Even Code: | programs=oggenc,mencoder | doesn't help. Any idea?
While using oggenc I get this instead:
Code: | cat scaling_min_freq cpuinfo_max_freq cpuinfo_min_freq scaling_setspeed
1188000
1232000
1463000
913000
913000 |
I mean this is weired. First of, it should be max_power. Then scaling_min_freq and scaling_max_freq should be the same. And when both are set to 1188000 and 1232000 why is the actual cpu frequency set to 913000?
Cheers
mic
Cheers
mic |
|
Back to top |
|
|
PrakashP Veteran
Joined: 27 Oct 2003 Posts: 1249 Location: C.C.A.A., Germania
|
Posted: Fri May 20, 2005 11:06 am Post subject: |
|
|
I also had troubles with policy userspace. Try performance. But the target freq will deviate from your stettings, so you need to do trial and error.
Oh, if you want max_power every time with your progs, set cpu to 0-100 and maybe make a seperate rule for max for dynamic adjust. |
|
Back to top |
|
|
micmac l33t
Joined: 28 Nov 2003 Posts: 996
|
Posted: Fri May 20, 2005 2:33 pm Post subject: |
|
|
Hi!
I've found out why it didn't get full speed while encoding. oggenc was 'niced'. Putting niceness to 0 was the solution. Now it goes all the way up.
I also tried switching the governor to performance. But the mid_power setting still uses different scaling_min_freq and scaling_max_freq from time to time. Well, I guess I got to live it or ask somebody on the lkml, because I take it it's a kernel thing that has nothing to do with cpufreqd.
Anyway
Thank!
mic |
|
Back to top |
|
|
micmac l33t
Joined: 28 Nov 2003 Posts: 996
|
Posted: Fri May 20, 2005 2:55 pm Post subject: |
|
|
Hi again,
on the other hand switching frequencies manually works fine. I don't even have to bother with scaling_setspeed while echoing the same number into scaling_max_freq and scaling_min_freq. So it seems more likely that cpufreqd echoes the number 1232000, allthough I never wrote this number in its config file. With
Code: | minfreq=1188000
maxfreq=1188000 |
I want cpufreq (nvfreq) to echo 1188000 into scaling_max_freq and scaling_min_freq, not 1232000
Cheers
mic |
|
Back to top |
|
|
PrakashP Veteran
Joined: 27 Oct 2003 Posts: 1249 Location: C.C.A.A., Germania
|
Posted: Fri May 20, 2005 3:20 pm Post subject: |
|
|
I also observed the thing with niceness. Nevertheless my suggestion would help and you could still nice the process. |
|
Back to top |
|
|
Dreameen n00b
Joined: 22 Nov 2004 Posts: 7
|
Posted: Sat Jun 18, 2005 5:08 pm Post subject: |
|
|
Hm, the atxp module doesn't compile cleanly with the newest stable kernel 2.6.12
Here are the errors:
Code: |
LD init/built-in.o
LD vmlinux
drivers/built-in.o(.text+0x8fee0): In function `atxp1_detect':
: undefined reference to `i2c_which_vrm'
drivers/built-in.o(.text+0x8fdf6): In function `atxp1_attach_adapter':
: undefined reference to `i2c_detect'
make: *** [vmlinux] Błąd 1
==> ERROR: Build Failed. Aborting...
|
I didn't know who to contact, but maybe the author of atxp patch is reading this board and he could fix things up. |
|
Back to top |
|
|
Hasw n00b
Joined: 31 Dec 2004 Posts: 68 Location: Germany
|
Posted: Sat Jun 18, 2005 10:31 pm Post subject: |
|
|
Which version of the ATXP1 module are you using? Are you using the kernel patch? It should be fixed, otherwise it
doesn't cleanly work with 2.6.12. Also the i2c-vid-vrm90.patch needs to be applied.
Can you please PM or mail me:
Code: |
grep I2C kernelsource/.config
grep SENSORS kernelsource/.config
|
The module is missing the two functions i2c_which_vrm and i2c_detect, which are there in 2.6.12. So it's possible that
it hasn't compiled in the i2c_sensor functions (is I2C enabled in your kernel config).
Also the ATXP1 module is in 2.6.12-rc6, it waits to get merged with the stable kernel. |
|
Back to top |
|
|
|