View previous topic :: View next topic |
Author |
Message |
ColinAnderson Tux's lil' helper
Joined: 26 Nov 2003 Posts: 89
|
Posted: Sat Jun 05, 2004 11:37 pm Post subject: Controlling Various Computer Hardware (Fans, etc.) |
|
|
Code: | colin@magic-wand colin $ sensors
w83697hf-isa-0290
Adapter: ISA adapter
VCore: +1.69 V (min = +0.65 V, max = +0.52 V) ALARM
+3.3V: +3.30 V (min = +0.21 V, max = +3.43 V)
+5V: +4.95 V (min = +0.06 V, max = +0.22 V) ALARM
+12V: +11.57 V (min = +6.16 V, max = +0.69 V) ALARM
-12V: +0.66 V (min = -13.73 V, max = -14.23 V) ALARM
-5V: +5.12 V (min = +2.40 V, max = -4.48 V) ALARM
V5SB: +5.55 V (min = +5.25 V, max = +5.20 V) ALARM
VBat: +3.24 V (min = +0.16 V, max = +0.20 V) ALARM
fan1: 0 RPM (min = 6887 RPM, div = 2) ALARM
fan2: 3183 RPM (min = 23275 RPM, div = 2) ALARM
temp1: +30 C (high = +64 C, hyst = -108 C) sensor = thermistor
temp2: +40.5 C (high = +75 C, hyst = +70 C) sensor = thermistor
alarms:
beep_enable:
Sound alarm disabled
eeprom-i2c-0-50
Adapter: SMBus Via Pro adapter at 5000
Memory type: DDR SDRAM DIMM
Memory size (MB): 512 |
How do I go about controlling certain things, specifically the fans? Any help would be appreciated. Just so you know, I'm planning on writing a simple script to control the chassis fans (fan1) depending upon the system temperature. Mainly to reduce noise levels. Turn them off when the temperature is within a certain range, and on when it's warmer. _________________ ~Colin |
|
Back to top |
|
|
curtis119 Bodhisattva
Joined: 10 Mar 2003 Posts: 2160 Location: Toledo, Ohio,USA, North America, Earth, SOL System, Milky Way, The Universe, The Cosmos, and Beyond.
|
|
Back to top |
|
|
ColinAnderson Tux's lil' helper
Joined: 26 Nov 2003 Posts: 89
|
Posted: Sun Jun 06, 2004 2:50 am Post subject: |
|
|
Well, I have lm-sensors-2.6.5 and everything installed, and from what you can see it's working. I just wanted to know how I might go about controlling certain things, mainly the fans (turning them on and off). Is this possible? And if it his, how? I'm looking through those documents, and maybe I'm missing everything, but I don't see much regarding controlling the devices.
GKrellM is pretty much out of the question as I'm not using a graphical environment in this setup -- it's a file server I administer via SSH from my laptop. Thanks for your help so far! _________________ ~Colin |
|
Back to top |
|
|
curtis119 Bodhisattva
Joined: 10 Mar 2003 Posts: 2160 Location: Toledo, Ohio,USA, North America, Earth, SOL System, Milky Way, The Universe, The Cosmos, and Beyond.
|
|
Back to top |
|
|
ColinAnderson Tux's lil' helper
Joined: 26 Nov 2003 Posts: 89
|
Posted: Sun Jun 06, 2004 8:11 pm Post subject: |
|
|
I really do appreciate your help, but I'm still not getting anywhere. I'm having trouble understanding where in these threads and documentations it explains how to control fan speed, or turn the fans on or off.
The /proc interface article was nice, but I guess I do not have PWM available as it does not exist in anywhere within /proc. If you could give me an example of how to turn the fans on or off or something of that nature that I can see, it would greatly help me. _________________ ~Colin |
|
Back to top |
|
|
Gestalt73 n00b
Joined: 02 Jun 2004 Posts: 29
|
Posted: Sun Jun 06, 2004 8:58 pm Post subject: just configured fancontrol in kernel 2.6 nforce2 |
|
|
Hello!
What's really great about this is that I just finished configuring this about 5 minutes ago.
If you're using a 2.4 kernel, I think everything just works. try running pwmconfig, then fancontrol. I assume that you have successfully installed lm-sensors, and are able to run 'sensors' and get data
if you're using a 2.6 kernel, it takes a little bit more work.
The good news: the command pwmconfig will write a settings file for you called /etc/fancontrol that fancontrol will use to adjust your fans for you based on temp readings.
The not so great news: it looks like the fan and temp device names have changed in 2.6 so you will need to update the pwmconfig script to look for the new names.
you can open up /usr/sbin/pwmconfig in your favorite editor and change the following:
LINE 66: */pwm[1-9] to */fan[1-9]_pwm
LINE 67: */pwm[1-9] to */fan[1-9]_pwm
LINE 75: */fan_input[1-9] to */fan[1-9]_input
LINE 361 */temp_input[1-9] to */temp[1-9]_input
If you want the whole pwmconfig file let me know.
After that, I was able to run the pwmconfig script which wrote out a settings file for fancontrol.
Alan |
|
Back to top |
|
|
curtis119 Bodhisattva
Joined: 10 Mar 2003 Posts: 2160 Location: Toledo, Ohio,USA, North America, Earth, SOL System, Milky Way, The Universe, The Cosmos, and Beyond.
|
Posted: Sun Jun 06, 2004 9:25 pm Post subject: |
|
|
Thank you so much Gestalt73! I was trying to point him in the right direction. I have never really attempted to do what he was asking. Thanks. _________________ Gentoo: it's like wiping your ass with silk. |
|
Back to top |
|
|
Gestalt73 n00b
Joined: 02 Jun 2004 Posts: 29
|
Posted: Sun Jun 06, 2004 9:30 pm Post subject: the inet.d script I'm using to start fancontrol |
|
|
-- VERY IMPORTANT --
Make sure that your fancontrol settings are appropriate for your system. That means setting up fancontrol and testing its behaviour under load. open up gkrellm or ksensors or sensors and watch temp and fan speed changes during games, compiles etc. It would be a pity if you accidentally fried your cpu because your max_temp was set too high and your cpu fan wasn't permitted to run at full speed.
In case you or anyone else is interested I pieced together an inet.d script to automatically start and stop fancontrol:
Code: | nano -w /etc/init.d/fancontrol |
Code: | #!/sbin/runscript
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# Modified fancontrol script
opts="${opts} reload"
depend() {
need lm_sensors
}
start() {
ebegin "Starting fancontrol"
start-stop-daemon --start --quiet --background --exec /usr/sbin/fancontrol
result=$?
eend $result
}
stop() {
ebegin "Stopping fancontrol"
start-stop-daemon --stop --signal 1 --quiet --pidfile /var/run/fancontrol.pid
result=$?
eend $result
}
reload() {
ebegin "Reloading fancontrol"
killall -HUP fancontrol &>/dev/null
result=$?
eend $result
}
|
And finally:
Code: | rc-update add fancontrol default
/etc/init.d/fancontrol start |
So far this works for me.
Alan |
|
Back to top |
|
|
Tuti n00b
Joined: 14 May 2004 Posts: 33
|
Posted: Mon Jun 07, 2004 5:00 am Post subject: |
|
|
Thanks for the init script, Gestalt! I've been trying to come up with my own script, but I coundn't get it to terminate properly ... but i'm a n00b.
One thing that's cool about fancontrol is that it actually doesn't need lm_sensors at all if you use a 2.6 kernel - most hw sensors can be compiled in the kernel. If you want to use the pwmconfig script to write the config file, you might have to edit the code and rename some of the references to /sys/busses/i2c/... |
|
Back to top |
|
|
ColinAnderson Tux's lil' helper
Joined: 26 Nov 2003 Posts: 89
|
Posted: Mon Jun 07, 2004 3:04 pm Post subject: |
|
|
Thanks so much! Both of you.
Everytime I attempted to run the pwmconfig script, it exited telling me there were no pwm modules found, so I figured my motherboard didn't support it. However, my motherboard is brand new (ASUS) as I just built this computer last week. So I figure it ought to have pwm. The sensors driver (winbond w83627hf or something) supports pwm, so I figure the motherboard should as well.
I'll see if that will sort some things out when I get home (at work at the moment). _________________ ~Colin |
|
Back to top |
|
|
ColinAnderson Tux's lil' helper
Joined: 26 Nov 2003 Posts: 89
|
Posted: Mon Jun 07, 2004 11:53 pm Post subject: |
|
|
I changed the configuration file, and it apparently detected PWM properly. However, it would not let me write a configuration file becuase I wasn't root ... but I WAS ROOT. So, haven't figured that out. I changed the section where it detects root so that it always thinks I'm root ... but it never successfully changes the fans anyway, so it doesn't matter. It only reports that there is no correclation. It makes me sad. Code: | root@magic-wand colin # pwmconfig
This program will search your sensors for pulse width modulation (pwm)
controls, and test each one to see if it controls a fan on
your motherboard. Note that many motherboards do not have pwm
circuitry installed, even if your sensor chip supports pwm.
We will attempt to briefly stop each fan using the pwm controls.
The program will attempt to restore each fan to full speed
after testing. However, it is ** very important ** that you
physically verify that the fans have been to full speed
after the program has completed.
Found the following PWM controls:
1-0290/fan1_pwm
1-0290/fan2_pwm
Found the following fan sensors:
1-0290/fan1_input current speed: 2755 RPM
1-0290/fan2_input current speed: 3229 RPM
Warning!!! This program will stop your fans, one at a time,
for approximately 5 seconds each!!!
This may cause your processor temperature to rise!!!
If you do not want to do this hit control-C now!!!
Hit return to continue:
Testing pwm control 1-0290/fan1_pwm ...
1-0290/fan1_input ... speed was 2755 now 2777
no correlation
1-0290/fan2_input ... speed was 3229 now 3229
no correlation
No correlations were detected.
There is either no fan connected to the output of 1-0290/fan1_pwm,
or the connected fan has no rpm-signal connected to one of
the tested fan sensors. (Note: not all motherboards have
the pwm outputs connected to the fan connectors,
check out the hardware database on http://www.almico.com/forumindex.php)
Did you see/hear a fan stopping during the above test (n)? n
Testing pwm control 1-0290/fan2_pwm ...
1-0290/fan1_input ... speed was 2755 now 2789
no correlation
1-0290/fan2_input ... speed was 3229 now 3229
no correlation
No correlations were detected.
There is either no fan connected to the output of 1-0290/fan2_pwm,
or the connected fan has no rpm-signal connected to one of
the tested fan sensors. (Note: not all motherboards have
the pwm outputs connected to the fan connectors,
check out the hardware database on http://www.almico.com/forumindex.php)
Did you see/hear a fan stopping during the above test (n)? n
Testing is complete.
Please verify that all fans have returned to their normal speed.
The fancontrol script can automatically respond to temperature changes
of your system by changing fanspeeds.
Do you want to set up its configuration file now (y)? n
root@magic-wand colin # |
Any ideas? Or am I just out of luck? _________________ ~Colin |
|
Back to top |
|
|
tnt Veteran
Joined: 27 Feb 2004 Posts: 1227
|
Posted: Sun Sep 26, 2004 2:39 am Post subject: |
|
|
ColinAnderson wrote: | I changed the configuration file, and it apparently detected PWM properly. |
In wich way did you change your configuration?
I have the same problem:
Code: | [root@beta 1-0290]# pwmconfig
This program will search your sensors for pulse width modulation (pwm)
controls, and test each one to see if it controls a fan on
your motherboard. Note that many motherboards do not have pwm
circuitry installed, even if your sensor chip supports pwm.
We will attempt to briefly stop each fan using the pwm controls.
The program will attempt to restore each fan to full speed
after testing. However, it is ** very important ** that you
physically verify that the fans have been to full speed
after the program has completed.
/usr/sbin/pwmconfig: There are no pwm-capable sensor modules installed |
|
|
Back to top |
|
|
KozmoNaut Apprentice
Joined: 09 Dec 2002 Posts: 168 Location: Denmark
|
Posted: Sat Oct 16, 2004 11:30 am Post subject: |
|
|
Ahh, sheer blissful silence. My system hasn't been able to run the fans at anything but max speed as soon as I booted up Gentoo, but fancontrol handles it now.
With no load on the system, the CPU is 35-40C and the fan runs at 1500rpm. On full load (2x burnp6 running) the CPU is 55C and the fan runs at 2200rpm (which is appearantly the max speed for a P4 fan).
I love it. And the init script rocks, too! _________________ War. War never changes. |
|
Back to top |
|
|
|
|
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
|
|