| 1 |
.TH THINKFAN "1" "December 2021" "thinkfan 1.3.1" "thinkfan" |
| 2 |
.SH NAME |
| 3 |
thinkfan \- A simple fan control program |
| 4 |
.SH SYNOPSIS |
| 5 |
.SY thinkfan |
| 6 |
.OP \-hnqDd |
| 7 |
.OP \-b BIAS |
| 8 |
.OP \-c CONFIG |
| 9 |
.OP \-s SECONDS |
| 10 |
.OP \-p \fR[\fIDELAY\fR]\fI |
| 11 |
.YS |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
.SH DESCRIPTION |
| 16 |
|
| 17 |
Thinkfan sets the fan speed according to temperature limits set in the config |
| 18 |
file. |
| 19 |
It can read temperatures from a number of sources: |
| 20 |
|
| 21 |
.IP "/proc/acpi/ibm/thermal" |
| 22 |
Which is provided by the thinkpad_acpi kernel module on older Thinkpads, |
| 23 |
|
| 24 |
.IP "temp*_input files in sysfs" |
| 25 |
Which may be provided by any hwmon drivers, including thinkpad_acpi on modern |
| 26 |
Thinkpads, |
| 27 |
|
| 28 |
.IP "Hard disks with S.M.A.R.T. support" |
| 29 |
With the help of libatasmart, if thinkfan was compiled with |
| 30 |
.B \-DUSE_ATASMART=ON |
| 31 |
|
| 32 |
.IP "From the proprietary nVidia driver" |
| 33 |
When the proprietary nVidia driver is used, no hwmon for the card will be |
| 34 |
available. In this situation, thinkfan can use the proprietary NVML API to get |
| 35 |
temperatures. |
| 36 |
|
| 37 |
.P |
| 38 |
The fan can be /proc/acpi/ibm/fan or some PWM file in |
| 39 |
/sys/class/hwmon. See |
| 40 |
.BR thinkfan.conf (5) |
| 41 |
for a detailed explanation of the config syntax. |
| 42 |
|
| 43 |
.HP |
| 44 |
\fBWARNING\fR: This program does only very basic sanity checking on the |
| 45 |
configuration. That means that you can set your temperature limits as insane |
| 46 |
as you like. |
| 47 |
.P |
| 48 |
There are two general modes of operation: |
| 49 |
|
| 50 |
|
| 51 |
.SS COMPLEX MODE |
| 52 |
In complex mode, temperature limits are defined for each sensor thinkfan knows |
| 53 |
about. Setting suitable limits for each sensor in your system will probably |
| 54 |
require a bit of experimentation and good knowledge about your hardware, but |
| 55 |
it's the safest way of keeping each component within its specified temperature |
| 56 |
range. See http://www.thinkwiki.org/wiki/Thermal_Sensors for details on |
| 57 |
which sensor measures what temperature in a Thinkpad. On other systems you'll |
| 58 |
have to find out on your own. See the example configs to learn about the |
| 59 |
syntax. |
| 60 |
|
| 61 |
|
| 62 |
.SS SIMPLE MODE |
| 63 |
In simple mode, Thinkfan uses only the highest temperature found in the |
| 64 |
system. That may be dangerous, e.g. for hard disks. That's why you should |
| 65 |
provide a correction value (i.e. add 10\-15 \[char176]C) for the sensor that has the |
| 66 |
temperature of your hard disk (or battery...). See the example config files |
| 67 |
for details about that. |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
.SH CONFIGURATION |
| 72 |
Some example configurations are provided with the source package. For a detailed |
| 73 |
see the config man page |
| 74 |
.BR thinkfan.conf (5). |
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
.SH OPTIONS |
| 79 |
|
| 80 |
.TP |
| 81 |
.B \-h |
| 82 |
Show a short help message |
| 83 |
|
| 84 |
.TP |
| 85 |
.BI \-s " SECONDS" |
| 86 |
Maximum seconds between temperature updates (default: 5) |
| 87 |
|
| 88 |
.TP |
| 89 |
.BI \-b " BIAS" |
| 90 |
Floating point number (\-10 to 30) to control rising temperature exaggeration. |
| 91 |
If the temperature increases by more than 2 \[char176]C during one cycle, this number |
| 92 |
is used to calculate a bias, which is added to the current highest temperature |
| 93 |
seen in the system: |
| 94 |
|
| 95 |
current_tmax = current_tmax + delta_t * \fIBIAS\fR / 10 |
| 96 |
|
| 97 |
This means that negative numbers can be used to even out short and sudden |
| 98 |
temperature spikes like those seen on some on\-DIE sensors. Use DANGEROUS mode |
| 99 |
to remove the \-10 to +30 limit. Note that you can't have a space between \-b |
| 100 |
and a negative argument, because otherwise getopt will interpret things like |
| 101 |
\-10 as an option and fail (i.e. write |
| 102 |
.B \-b\-10 |
| 103 |
instead of |
| 104 |
.BR "\-b \-10" ). |
| 105 |
|
| 106 |
Default is 15.0 |
| 107 |
|
| 108 |
.TP |
| 109 |
.BI \-c " FILE" |
| 110 |
Load a different configuration file. |
| 111 |
By default, thinkfan first tries to load /etc/thinkfan.yaml, and |
| 112 |
/etc/thinkfan.conf after that. |
| 113 |
The former must be in YAML format, while the latter can be either YAML or the |
| 114 |
old legacy syntax. |
| 115 |
|
| 116 |
If this option is specified, thinkfan attempts to load the config only from |
| 117 |
.IR FILE . |
| 118 |
If its name ends in \*(lq.yaml\*(rq, it must be in YAML format. |
| 119 |
Otherwise, it can be either YAML or legacy syntax. |
| 120 |
See |
| 121 |
.BR thinkfan.conf (5) |
| 122 |
and |
| 123 |
.BR thinkfan.conf.legacy (5) |
| 124 |
for details. |
| 125 |
|
| 126 |
.TP |
| 127 |
.B \-n |
| 128 |
Do not become a daemon and log to terminal instead of syslog |
| 129 |
|
| 130 |
.TP |
| 131 |
.B \-q |
| 132 |
Be quiet, i.e. reduce logging level from the default. Can be specified |
| 133 |
multiple times until only errors are displayed/logged. |
| 134 |
|
| 135 |
.TP |
| 136 |
.B \-v |
| 137 |
Be more verbose. Can be specified multiple times until every message is |
| 138 |
displayed/logged. |
| 139 |
|
| 140 |
.TP |
| 141 |
.BR "\-p " [\fISECONDS\fR] |
| 142 |
Use the pulsing\-fan workaround (for older Thinkpads). Takes an optional |
| 143 |
floating\-point argument (0\-10s) as depulsing duration. Default 0.5s. |
| 144 |
|
| 145 |
.TP |
| 146 |
.B \-d |
| 147 |
Do not read temperature from sleeping disks. Instead, 0 \[char176]C is used as that |
| 148 |
disk's temperature. This is needed if reading the temperature causes your |
| 149 |
disk to wake up unnecessarily. |
| 150 |
NOTE: This option is only available if thinkfan was built with \-D USE_ATASMART. |
| 151 |
|
| 152 |
.TP |
| 153 |
.B \-D |
| 154 |
DANGEROUS mode: Disable all sanity checks. May damage your hardware!! |
| 155 |
.SH SIGNALS |
| 156 |
SIGINT and SIGTERM simply interrupt operation and should cause thinkfan to |
| 157 |
terminate cleanly. |
| 158 |
.P |
| 159 |
SIGHUP makes thinkfan reload its config. If there's any problem with the new |
| 160 |
config, we keep the old one. |
| 161 |
.P |
| 162 |
SIGUSR1 causes thinkfan to dump all currently known temperatures either to |
| 163 |
syslog, or to the console (if running with the \-n option). |
| 164 |
.SH RETURN VALUE |
| 165 |
|
| 166 |
.TP |
| 167 |
.B 0 |
| 168 |
Normal exit |
| 169 |
|
| 170 |
.TP |
| 171 |
.B 1 |
| 172 |
Runtime error |
| 173 |
|
| 174 |
.TP |
| 175 |
.B 2 |
| 176 |
Unexpected runtime error |
| 177 |
|
| 178 |
.TP |
| 179 |
.B 3 |
| 180 |
Invalid commandline option |
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
.SH SEE ALSO |
| 185 |
.nf |
| 186 |
The thinkfan config manpage: |
| 187 |
.BR thinkfan.conf (5) |
| 188 |
|
| 189 |
Example configs shipped with the source distribution, also available at: |
| 190 |
.hy 0 |
| 191 |
https://github.com/vmatare/thinkfan/tree/master/examples |
| 192 |
|
| 193 |
The Linux hwmon user interface documentation: |
| 194 |
https://www.kernel.org/doc/html/latest/hwmon/sysfs\-interface.html |
| 195 |
|
| 196 |
The thinkpad_acpi interface documentation: |
| 197 |
https://www.kernel.org/doc/html/latest/admin\-guide/laptops/thinkpad\-acpi.html |
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
.SH BUGS |
| 202 |
If thinkfan tells you to, or if you feel like it, report issues at the Github |
| 203 |
issue tracker: |
| 204 |
|
| 205 |
.hy 0 |
| 206 |
https://github.com/vmatare/thinkfan/issues |
| 207 |
|