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