1THINKFAN.CONF(5) File Formats Manual THINKFAN.CONF(5)
2
3
4
6 /etc/thinkfan.conf - the default config file location for thinkfan(1)
7
8
10 The thinkfan config file specifies one or more temperature input(s),
11 exactly one fan to control and the fan levels. A fan level associates
12 a certain fan speed to a lower and an upper temperature bound. If the
13 temperature reaches the upper bound, we switch to the next fan level,
14 and if it drops below the lower bound, we switch to the previous fan
15 level. Temperature bounds can either be a single tempature (simple
16 mode) or consist of multiple temperatures (complex mode). In simple
17 mode, only the highest of all known temperature is compared to the
18 upper & lower bound. If you have devices with very different tempera‐
19 ture ratings (e.g. CPU vs. mechanical hard drives), you should specify
20 correction values to equalize their temperature ranges, or better: use
21 complex mode. In complex mode, the upper and lower bounds of each fan
22 level are specified for each sensor individually. Thinkfan then
23 switches to the next fan level if one of the upper bounds is reached,
24 and to the previous fan level if all temperatures have dropped below
25 their respective lower bounds.
26
27
29 Multiple sensor keywords can be combined in one config file, but note
30 that the ordering is significant with respect to the upper and lower
31 fan level bounds if you use complex mode. I.e. if /proc/acpi/ibm/ther‐
32 mal contains 16 temperatures and you specify an hwmon sensor after the
33 tp_thermal statement, the hwmon sensor will be the 17th temperature.
34 After each sensor path, an optional correction-value can be specified.
35 This value (can be negative) is always added to the temperature reading
36 from that sensor. Correction values should be specified if you use
37 Simple Mode with components that have a different temperature rating,
38 like hard disks and CPUs. Note though that Complex Mode is generally
39 the better solution since it gives you full control over fan levels and
40 temperature ranges for each sensor, instead of just adding a fixed
41 value to equalize temperature ranges.
42
43
44 tp_thermal /proc/acpi/ibm/thermal [ (correction-value ...) ]
45 Use the thermal sensors provided by the thinkpad_acpi kernel
46 module on older thinkpads. These normally reside in
47 /proc/acpi/ibm/thermal, so this keyword will hardly be used with
48 other paths. This file usually contains 8-16 temperatures, some
49 of which may be reserved for removable hardware or completely
50 unused. Unused temperature slots always contain the value -128.
51 Since this file contains all temperatures the thinkpad_acpi mod‐
52 ule knows about, there cannot be more than one tp_thermal state‐
53 ment in a config file.
54
55
56 hwmon sysfs-path [ (correction-value) ]
57 Use a standard hwmon temperature input that may be provided by
58 all kinds of kernel drivers. sysfs-path is usually a file named
59 `temp*_input', somewhere under /sys, so you can search for them
60 e.g. with `find /sys -type f -name "temp*_input"'. Each of
61 these files contains one temperature, so you need to add a hwmon
62 statement for each device whose temperature you wish to control.
63
64
65 atasmart device-path [ (correction-value) ]
66 NOTE: only available if thinkfan was compiled with USE_ATASMART
67 enabled.
68
69 Read the temperature directly from a hard disk using S.M.A.R.T.
70 See also the -d option in thinkfan(1) that prevents thinkfan
71 from waking up sleeping (mechanical) disks to read their temper‐
72 ature.
73
74
75 nv_thermal pci-bus-id [ (correction-value) ]
76 NOTE: only available if thinkfan was compiled with USE_NVML
77 enabled.
78
79 Read the temperature of an nVidia graphics card from the propri‐
80 etary nVidia driver. This does not work with the open-source
81 Nouveau driver, it depends specifially on libnvidia-ml.so that
82 is usually installed with the binary nVidia driver. The correct
83 pci-bus-id can be retrieved using e.g. lspci with: `lspci | grep
84 -i vga'. Most open-source graphics drivers (radeon, nouveau,
85 possibly others too) can instead be used with the hwmon keyword
86 described above.
87
88
90 Currently, thinkfan can control only one fan at a time. In theory, you
91 can run multiple instances of the program simultaneously (with multiple
92 config files) to control multiple fans, but that requires enabling DAN‐
93 GEROUS mode and will likely break most init scripts. It is an error to
94 have more than one fan statement per config file.
95
96
97 tp_fan /proc/acpi/ibm/fan
98 Use the fan control provided by the thinkpad_acpi kernel module,
99 which needs to be loaded with the option fan_control=1. The
100 path is defined by the thinkpad_acpi kernel module and will
101 hardly change. Besides the fan levels ranging from 0 to 7, it
102 also supports the disengaged and auto modes.
103
104 The auto mode should delegate fan control to the firmware, so it
105 can be regarded as a `default' mode that does not change the fan
106 behavior. This is useful for example if you only want to change
107 the fan behavior at high and/or low temperatures.
108
109 The disengaged or full-speed mode effectively disables the fan
110 RPM limiter. Fan speed will slowly ramp up until the fan uses
111 the maximum electrical power available from the embedded con‐
112 troller. Use this only to prevent potentially destructive over‐
113 heating, since it runs the fan outside of specifications and
114 wears its bearings down quickly.
115
116
117 pwm_fan sysfs-path
118 Control a sysfs PWM fan. Many hwmon drivers that provide a
119 `temp*_input' file also allow fan control, although there may
120 also be drivers that are specific to either temperature reading
121 or fan control. You can search for a PWM control file e.g. with
122 `find /sys -type f -name "pwm?"'. Note that with PWM, fan lev‐
123 els usually range from 0 to 255, although besides a file like
124 `pwm1' there may also be `pwm1_min' and `pwm1_max' that specify
125 different (soft or recommended?) limits for a particular fan.
126
127
128
130 Defining the fan levels is the meat of the config file. Here you make
131 use of your previously defined temperature inputs to set the lower and
132 upper bounds for the fan speeds. You cannot mix simple fan levels with
133 complex fan levels. The general syntax of a simple fan level is:
134
135 ( fan-level [,] lower-bound [,] upper-bound )
136
137 The fan-level is either a numeric value (0-7 or 0-255, depending on
138 whether a tp_fan or a pwm_fan is used) or a string enclosed in double
139 quotes. When a tp_fan is used, specifying 0 has the same effect as
140 specifying "level 0". In addition to the numeric fan levels, tp_fan
141 also supports "level auto" and "level disengaged" or "level full-
142 speed". See above for an explanation of what these mean. The format
143 of lower-bound and upper-bound depends on whether you want to use Sim‐
144 ple Mode or Complex Mode.
145
146
147
148 Simple Mode
149 In simple mode, the lower-bound and upper-bound of a fan level are each
150 specified as a single temperature value. Both are compared only to the
151 highest temperature found in all of the configured thermal sensors.
152 Using this mode of operation makes sense e.g. if all temperature read‐
153 ings come from the on-DIE thermal sensors of a multicore processor.
154 The fan speed will affect all of these temperatures in the same way
155 because they share a single thermal connection to the heatsink, so it
156 makes sense to ignore all but the highest of these temperatures. As a
157 rule of thumb, if your thermal sensors cover multiple devices you
158 should use Complex Mode, or at least specify correction values to
159 account for different temperature ratings.
160
161
162 Complex Mode
163 In complex mode, both the lower-bound and upper-bound are lists of tem‐
164 peratures, the length of which must match the number of temperature
165 readings thinkfan knows about. Each bound must be enclosed in braces,
166 with individual values separated by commas or spaces, so the specific
167 syntax of a complex mode fan level is:
168
169 { fan-level
170 ( lower-1 [lower-2 ...] )
171 ( upper-1 [upper-2 ...] )
172 }
173
174 The optional commas have been omitted here for readability, and the
175 curly braces are interchangeable with round braces. Note that it is
176 not possible to mix simple fan levels with complex fan levels.
177
178 Complex mode is generally the preferred mode of operation since it
179 allows you to specify precisely what the fan should to to keep each
180 component within its specified temperature range.
181
182
183
185 thinkfan(1)
186
187 Example configs shipped with the source distribution, also available at
188 https://github.com/vmatare/thinkfan/tree/master/examples.
189
190
191
192
193thinkfan 1.0 2016-03-20 THINKFAN.CONF(5)