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       DEVPATH
49              Maps  hwmon class devices to physical devices. This lets fancon‐
50              trol check that the configuration file is still up-to-date.
51
52       DEVNAME
53              Records hwmon class device names.  This  lets  fancontrol  check
54              that the configuration file is still up-to-date.
55
56       FCTEMPS
57              Maps  PWM  outputs  to  temperature  sensors so fancontrol knows
58              which temperature sensors should be used for calculation of  new
59              values for the corresponding PWM outputs.
60
61       FCFANS Records  the  association  between a PWM output and a fan input.
62              Then fancontrol can check the fan speed and  restart  it  if  it
63              stops unexpectedly.
64
65       MINTEMP
66              The  temperature  below  which  the fan gets switched to minimum
67              speed.
68
69       MAXTEMP
70              The temperature over which the  fan  gets  switched  to  maximum
71              speed.
72
73       MINSTART
74              Sets  the  minimum  speed  at which the fan begins spinning. You
75              should use a safe value to be sure it works, even when  the  fan
76              gets old.
77
78       MINSTOP
79              The minimum speed at which the fan still spins. Use a safe value
80              here, too.
81
82       MINPWM The PWM value to use when  the  temperature  is  below  MINTEMP.
83              Typically,  this  will  be  either  0 if it is OK for the fan to
84              plain stop, or the same value as MINSTOP if you don't  want  the
85              fan to ever stop.  If this value isn't defined, it defaults to 0
86              (stopped fan).
87
88       MAXPWM The PWM value to use when the temperature is over  MAXTEMP.   If
89              this value isn't defined, it defaults to 255 (full speed).
90
91       The configuration file format is a bit strange:
92
93              VARIABLE=chip/pwmdev=value chip/pwmdev2=value2
94              VARIABLE2=...
95
96       Each  variable  has  its  own line. The variable name is followed by an
97       equal sign and the device=value pairs. These consist of the path to the
98       pwm  output  for  which  the value is valid, equal sign followed by the
99       value and are separated by a blank. Path can be  absolute  or  relative
100       (from  /sys/bus/i2c/devices or /sys/class/hwmon depending on the kernel
101       version). Example:
102
103              MINTEMP=hwmon0/device/pwm1=40 hwmon0/device/pwm2=54
104
105       You have to play with the temperature values a bit to  get  happy.  For
106       initial setup I recommend using the pwmconfig script. Small changes can
107       be made by editing the config file directly following the rules above.
108
109       Upon starting, fancontrol will make sure that all referenced devices do
110       exist and match what they were at configuration time, and that all ref‐
111       erenced sysfs files do exist. If not, it will  quit  immediately,  upon
112       the  assumption that the configuration file may be out-of-sync with the
113       loaded kernel drivers.
114
115

THE ALGORITHM

117       fancontrol first reads its configuration, writes it to arrays and loops
118       its  main  function.  This function gets the temperatures and fanspeeds
119       from kernel driver files and calculates new speeds depending on temper‐
120       ature  changes,  but  only  if the temp is between MINTEMP and MAXTEMP.
121       After that, the new values are written to the  PWM  outputs.  Currently
122       the  speed  increases  linearly  with  rising temperature. This way you
123       won't hear your fans most of the time at best.
124
125

SEE ALSO

127       pwmconfig(8), sensors(1).
128
129

AUTHOR

131       Marius Reiner <marius.reiner@hdev.de>
132
133
134
135lm-sensors 3                    September 2009                   FANCONTROL(8)
Impressum