https://wiki.archlinux.org/api.php?action=feedcontributions&user=Jackycxh&feedformat=atomArchWiki - User contributions [en]2024-03-28T17:39:40ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Fan_speed_control&diff=39618Fan speed control2008-04-06T12:14:26Z<p>Jackycxh: </p>
<hr />
<div>[[Category:CPU (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Fan speed control}}<br />
{{i18n_entry|Русский|Контроль скорости кулера}}<br />
{{i18n_links_end}}<br />
<br />
Controlling the speed (and sound!) of your CPU fan is easy!<br />
<br />
'''This can ruin your hardware. A CPU fan is needed to cool your CPU and in this howto it will be turned off for a couple of seconds. If you are not comfortable with doing this, don't!''''<br />
<br />
=== lm-sensors ===<br />
<br />
First, you need to set up lm-sensors. This is explained [[Lm_sensors|here]]<br />
<br />
Once you have lm-sensors installed, you should have a readout with 'sensors'.<br />
<br />
<pre>$ sensors<br />
w83627hf-isa-0290<br />
Adapter: ISA adapter<br />
VCore 1: +1.14 V (min = +0.00 V, max = +4.08 V) <br />
VCore 2: +2.67 V (min = +0.00 V, max = +4.08 V) <br />
+3.3V: +3.39 V (min = +2.82 V, max = +3.79 V) <br />
+5V: +5.19 V (min = +3.47 V, max = +0.40 V) ALARM <br />
+12V: +12.40 V (min = +12.95 V, max = +7.96 V) ALARM <br />
-12V: -7.01 V (min = +1.78 V, max = -10.63 V) ALARM <br />
-5V: -3.84 V (min = -7.66 V, max = +2.29 V) <br />
V5SB: +5.75 V (min = +0.08 V, max = +0.54 V) ALARM <br />
VBat: +3.10 V (min = +0.54 V, max = +0.13 V) ALARM <br />
fan1: 2428 RPM (min = 0 RPM, div = 4) <br />
fan2: 0 RPM (min = 1630 RPM, div = 4) ALARM <br />
fan3: 2191 RPM (min = 6367 RPM, div = 4) ALARM <br />
temp1: +38°C (high = +20°C, hyst = +68°C) sensor = thermistor <br />
temp2: +39.5°C (high = +65°C, hyst = +60°C) sensor = diode <br />
temp3: +38.0°C (high = +65°C, hyst = +60°C) sensor = thermistor (beep)<br />
vid: +0.000 V (VRM Version 2.4)<br />
alarms: <br />
beep_enable:<br />
Sound alarm enabled''<br />
</pre><br />
<br />
If your output does not display an RPM for your CPU fan, and you are positive it is running, you need to increase the fan divisor. If your fan speed is shown and higher than 0, skip the next step.<br />
'''<br />
Increasing fan_div:'''<br />
<br />
The first line of the sensors output is the chipset your motherboard uses to read the speeds/temps/voltages. Make a backup first:<br />
Code:<br />
<br />
<pre>cp /etc/sensors.conf /etc/sensors.conf_original</pre><br />
<br />
Edit the /etc/sensors.conf file as root<br />
<br />
<pre>nano /etc/sensors.conf</pre><br />
<br />
and look up your exact chipset. The names all look alike, so make sure the one you are editing is yours. Add the line fanX_div 4 near the start of your chipset config. Replace the X with the number of your CPU fan's, for me that was 2. You have to figure out for yourself which one it is, but it's probably 1, 2 or 3.<br />
<br />
Save, and run:<br />
<br />
<pre>sudo sensors -s</pre><br />
<br />
which will reload the sensors.conf's set variables.<br />
Run sensors again and check if there is an RPM readout. If not, increase the divisor to 8, 16 or 32. YMMV!<br />
<br />
You can safely ignore anything that's not fanX_div. I would advise you to leave the other default settings as they are.<br />
<br />
=== pwmconfig ===<br />
<br />
Once you have lm sensors properly configured, run pwmconfig to test and configure speed control of your fans:<br />
<pre>pwmconfig</pre><br />
<br />
Follow the instructions in pwmconfig to set up basic speeds.<br />
<br />
The default configuration options should create a new file, <tt>/etc/fancontrol</tt>. <br />
<br />
Follow the instructions in pwmconfig to set up speeds.<br />
<br />
==== Tweaking ====<br />
<br />
<strong>Second warning:</strong> Some of the steps outlined below describe how to tweak fan speeds. Before doing this be sure you have a low cpu load and are comfortable playing around. If at any time during tweaking you notice the CPU temperature start to rise dramatically, do a <tt>echo "255" > /sys/class/hwmon/hwmon0/device/pwm1</tt> to spin up the fan all the way until things cool down. Basically, you should know what your doing before fooling with the configuration file<br />
<br />
If your want more control, you probably will need to tweak the generated configuration in order get the results you expect. Here is a sample configuration file:<br />
<br />
<pre><br />
INTERVAL=10<br />
FCTEMPS=hwmon0/device/pwm1=hwmon0/device/temp1_input<br />
FCFANS= hwmon0/device/pwm1=hwmon0/device/fan1_input<br />
MINTEMP=hwmon0/device/pwm1=20<br />
MAXTEMP=hwmon0/device/pwm1=55<br />
MINSTART=hwmon0/device/pwm1=150<br />
MINSTOP=hwmon0/device/pwm1=105<br />
</pre><br />
<br />
* <strong>INTERVAL</strong>: how often the daemon should poll cpu temps and adjust fan speeds. Interval is in seconds.<br />
<br />
The rest of the configuration file is split into (at least) two values per configuration option. Each configuration option first points to a PWM device which is written to which sets the fan speed. The second "field" is the actual value to set. This allows you to monitor and control multiple fans and temperatures (if your pc supports it).<br />
<br />
* <strong>FCTEMPS</strong>: The temperature input device to read for cpu temperature. The above example corresponds to <tt>/sys/class/hwmon/hwmon0/device/temp1_input</tt>.<br />
* <strong>FCFANS</strong>: The current fan speed, which can be read (like the temperature) in <tt>/sys/class/hwmon/hwmon0/device/fan1_input</tt><br />
* <strong>MINTEMP</strong>: The temperature (&deg;C) at which to <em>SHUT OFF</em> the cpu fan. Efficicent CPU's often will not need a fan while idling. Be sure to set this to a temperature that you <em>know</em> is safe. Setting this to 0 is not reccommended, use a sane value.<br />
* <strong>MAXTEMP</strong>: The temperature (&deg;C) at which to spin the fan at it's <em>MAXIMUM</em> speed. This should be probably be set to perhaps 10 or 20 degrees (&deg;C) below your CPU's critical/shutdown temperature. Setting it closer to MINTEMP will result in higher fan speeds overall.<br />
* <strong>MINSTOP</strong>: The PWM value at which your fan stops spinning. Each fan is a little different. Power tweakers can <tt>cat</tt> different values (between 0 and 255) to <tt>/sys/class/hwmon/hwmon0/device/pwm1</tt> and then watch the cpu fan. When it stops, use this value.<br />
* <strong>MINSTART</strong>: The PWM value at which your fan starts to spin again. This is often a higher value than MINSTOP as more voltage is required to overcome inertia.<br />
<br />
=== fancontrol ===<br />
<br />
Try to run fancontrol:<br />
<pre>/usr/sbin/fancontrol</pre><br />
<br />
It should start up and you'll probably hear your CPU fans spin down.<br />
<br />
If it's working, in order to run at boot simply add "fancontrol" to DAEMONS in /etc/rc.conf, as <br />
a fancontrol init script is now provided by default!<br />
<br />
''Most of this howto is from [[http://ubuntuforums.org/ Ubuntu forums]] and [[http://ubuntuguide.org/ Ubuntu guide]].''<br />
<br />
For Dell Latitude/Inspiron laptops, you may want to use i8kutils/i8kmon.</div>Jackycxh