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