1FANCONTROL(8)               System Manager's Manual              FANCONTROL(8)
2
3
4

NAME

6       fancontrol - automated software based fan speed regulation
7
8

SYNOPSIS

10       fancontrol [configfile]
11
12

DESCRIPTION

14       fancontrol is a shell script for use with lm_sensors. It reads its con‐
15       figuration from a file, then calculates fan  speeds  from  temperatures
16       and sets the corresponding PWM outputs to the computed values.
17
18

WARNING

20       Please  be  careful  when  using the fan control features of your main‐
21       board, in addition to the risk of burning your CPU, at higher  tempera‐
22       tures there will be a higher wearout of your other hardware components,
23       too. So if you plan to use these components  in  50  years,  maybe  you
24       shouldn't  use  fancontrol  at all.  Also please keep in mind most fans
25       aren't designed to be powered by a PWMed voltage.
26
27       In practice it doesn't seem to be a major  issue,  the  fans  will  get
28       slightly  warmer, just be sure to have a temperature alarm and/or shut‐
29       down call, in case some fan fails, because you probably won't  hear  it
30       anymore ;)
31
32

CONFIGURATION

34       For  easy configuration, there's a script named pwmconfig(8) which lets
35       you interactively write your configuration file for fancontrol.  Alter‐
36       natively  you  can  write this file yourself using the information from
37       this manpage.
38
39       Since most of you are going to use pwmconfig(8) script, the config file
40       syntax  will be discussed last. First I'm going to describe the various
41       variables available for changing fancontrol's behaviour:
42
43
44       INTERVAL
45              This variable defines at which interval in seconds the main loop
46              of fancontrol will be executed
47
48       FCTEMPS
49              Maps  PWM  outputs  to  temperature  sensors so fancontrol knows
50              which temperature sensors should be used for calculation of  new
51              values for the corresponding PWM outputs.
52
53       FCFANS FCFANS  records  the  association between a PWM and a fan.  Then
54              fancontrol can check the fan speed and restart it  if  it  stops
55              unexpectedly.
56
57       MINTEMP
58              The  temperature  below  which  the fan gets switched to minimum
59              speed.
60
61       MAXTEMP
62              The temperature over which the  fan  gets  switched  to  maximum
63              speed.
64
65       MINSTART
66              Sets  the  minimum  speed  at which the fan begins spinning. You
67              should use a safe value to be sure it works, even when  the  fan
68              gets old.
69
70       MINSTOP
71              The minimum speed at which the fan still spins. Use a safe value
72              here, too.
73
74       MINPWM The PWM value to use when  the  temperature  is  below  MINTEMP.
75              Typically,  this  will  be  either  0 if it is OK for the fan to
76              plain stop, or the same value as MINSTOP if you don't  want  the
77              fan to ever stop.  If this value isn't defined, it defaults to 0
78              (stopped fan).
79
80       MAXPWM The PWM value to use when the temperature is over  MAXTEMP.   If
81              this value isn't defined, it defaults to 255 (full speed).
82
83       The configuration file format is a bit strange:
84
85              VARIABLE=chip/pwmdev=value chip/pwmdev2=value2
86              VARIABLE2=...
87
88       Each  variable  has  its  own line. The variable name is followed by an
89       equal sign and the device=value pairs. These consist of the path to the
90       pwm  output  for  which  the value is valid, equal sign followed by the
91       value and are separated by a blank. Path can be  absolute  or  relative
92       (from  /sys/bus/i2c/devices or /sys/class/hwmon depending on the kernel
93       version). Example:
94
95              MINTEMP=hwmon0/device/pwm1=40 hwmon0/device/pwm2=54
96
97       You have to play with the temperature values a bit to  get  happy.  For
98       initial setup I recommend using the pwmconfig script. Small changes can
99       be made by editing the config file directly following the rules above.
100
101

THE ALGORITHM

103       fancontrol first reads its configuration, writes it to arrays and loops
104       its  main  function.  This function gets the temperatures and fanspeeds
105       from kernel driver files and calculates new speeds depending on temper‐
106       ature  changes,  but  only  if the temp is between MINTEMP and MAXTEMP.
107       After that, the new values are written to the  PWM  outputs.  Currently
108       the speed increases quadratically with rising temperature. This way you
109       won't hear your fans most of the time at best.
110
111

SEE ALSO

113       pwmconfig(8), sensors(1).
114
115

AUTHOR

117       Marius Reiner <marius.reiner@hdev.de>
118
119
120
121lm-sensors 3                     January 2009                    FANCONTROL(8)
Impressum