thinkfan.conf.legacy - Man Page

the old, backwards-compatible config syntax for thinkfan thinkfan(1)


The thinkfan config file specifies one or more temperature input(s), exactly one fan to control and the fan levels. A fan level associates a certain fan speed to a lower and an upper temperature bound. If the temperature reaches the upper bound, we switch to the next fan level, and if it drops below the lower bound, we switch to the previous fan level. Temperature bounds can either be a single temperature (simple mode) or consist of multiple temperatures (complex mode). In simple mode, only the highest of all known temperature is compared to the upper & lower bound. If you have devices with very different temperature ratings (e.g. CPU vs. mechanical hard drives), you should specify correction values to equalize their temperature ranges, or better: use complex mode. In complex mode, the upper and lower bounds of each fan level are specified for each sensor individually. Thinkfan then switches to the next fan level if one of the upper bounds is reached, and to the previous fan level if all temperatures have dropped below their respective lower bounds.

Thermal Sensors

Multiple sensor keywords can be combined in one config file, but note that the ordering is significant with respect to the upper and lower fan level bounds if you use complex mode. I.e. if /proc/acpi/ibm/thermal contains 16 temperatures and you specify an hwmon sensor after the tp_thermal statement, the hwmon sensor will be the 17th temperature. After each sensor path, an optional correction-value can be specified. This value (can be negative) is always added to the temperature reading from that sensor. Correction values should be specified if you use Simple Mode with components that have a different temperature rating, like hard disks and CPUs. Note though that Complex Mode is generally the better solution since it gives you full control over fan levels and temperature ranges for each sensor, instead of just adding a fixed value to equalize temperature ranges.

tp_thermal /proc/acpi/ibm/thermal [ (correction-value ...) ]

Use the thermal sensors provided by the thinkpad_acpi kernel module on older thinkpads. These normally reside in /proc/acpi/ibm/thermal, so this keyword will hardly be used with other paths. This file usually contains 8-16 temperatures, some of which may be reserved for removable hardware or completely unused. Unused temperature slots always contain the value -128. Since this file contains all temperatures the thinkpad_acpi module knows about, there cannot be more than one tp_thermal statement in a config file.

hwmon sysfs-path [ (correction-value) ]

Use a standard hwmon temperature input that may be provided by all kinds of kernel drivers. sysfs-path is usually a file named ‘temp*_input’, somewhere under /sys, so you can search for them e.g. with ‘find /sys -type f -name "temp*_input"’. Each of these files contains one temperature, so you need to add a hwmon statement for each device whose temperature you wish to control.

atasmart device-path [ (correction-value) ]

NOTE: only available if thinkfan was compiled with USE_ATASMART enabled.

Read the temperature directly from a hard disk using S.M.A.R.T. See also the -d option in thinkfan(1) that prevents thinkfan from waking up sleeping (mechanical) disks to read their temperature.

nv_thermal pci-bus-id [ (correction-value) ]

NOTE: only available if thinkfan was compiled with USE_NVML enabled.

Read the temperature of an nVidia graphics card from the proprietary nVidia driver. This does not work with the open-source Nouveau driver, it depends specifially on that is usually installed with the binary nVidia driver. The correct pci-bus-id can be retrieved using e.g. lspci with: ‘lspci | grep -i vga’. Most open-source graphics drivers (radeon, nouveau, possibly others too) can instead be used with the hwmon keyword described above.


Currently, thinkfan can control only one fan at a time. In theory, you can run multiple instances of the program simultaneously (with multiple config files) to control multiple fans, but that requires enabling DANGEROUS mode and will likely break most init scripts. It is an error to have more than one fan statement per config file.

tp_fan /proc/acpi/ibm/fan

Use the fan control provided by the thinkpad_acpi kernel module, which needs to be loaded with the option fan_control=1. The path is defined by the thinkpad_acpi kernel module and will hardly change. Besides the fan levels ranging from 0 to 7, it also supports the disengaged and auto modes.

The auto mode should delegate fan control to the firmware, so it can be regarded as a ‘default’ mode that does not change the fan behavior. This is useful for example if you only want to change the fan behavior at high and/or low temperatures.

The disengaged or full-speed mode effectively disables the fan RPM limiter. Fan speed will slowly ramp up until the fan uses the maximum electrical power available from the embedded controller. Use this only to prevent potentially destructive overheating, since it runs the fan outside of specifications and wears its bearings down quickly.

pwm_fan sysfs-path

Control a sysfs PWM fan. Many hwmon drivers that provide a ‘temp*_input’ file also allow fan control, although there may also be drivers that are specific to either temperature reading or fan control. You can search for a PWM control file e.g. with ‘find /sys -type f -name "pwm?"’. Note that with PWM, fan levels usually range from 0 to 255, although besides a file like pwm1 there may also be pwm1_min and pwm1_max that specify different (soft or recommended?) limits for a particular fan.

Fan Levels

Defining the fan levels is the meat of the config file. Here you make use of your previously defined temperature inputs to set the lower and upper bounds for the fan speeds. You cannot mix simple fan levels with complex fan levels. The general syntax of a simple fan level is:

( fan-level [,] lower-bound [,] upper-bound )

The fan-level is either a numeric value (0-7 or 0-255, depending on whether a tp_fan or a pwm_fan is used) or a string enclosed in double quotes. When a tp_fan is used, specifying 0 has the same effect as specifying "level 0". In addition to the numeric fan levels, tp_fan also supports "level auto" and "level disengaged" or "level full-speed". See above for an explanation of what these mean. The format of lower-bound and upper-bound depends on whether you want to use Simple Mode or Complex Mode.

Simple Mode

In simple mode, the lower-bound and upper-bound of a fan level are each specified as a single temperature value. Both are compared only to the highest temperature found in all of the configured thermal sensors. Using this mode of operation makes sense e.g. if all temperature readings come from the on-DIE thermal sensors of a multicore processor. The fan speed will affect all of these temperatures in the same way because they share a single thermal connection to the heatsink, so it makes sense to ignore all but the highest of these temperatures. As a rule of thumb, if your thermal sensors cover multiple devices you should use Complex Mode, or at least specify correction values to account for different temperature ratings.

Complex Mode

In complex mode, both the lower-bound and upper-bound are lists of temperatures, the length of which must match the number of temperature readings thinkfan knows about. Each bound must be enclosed in braces, with individual values separated by commas or spaces, so the specific syntax of a complex mode fan level is:

{ fan-level
    ( lower-1 [lower-2 ...] )
    ( upper-1 [upper-2 ...] )

The optional commas have been omitted here for readability, and the curly braces are interchangeable with round braces. Note that it is not possible to mix simple fan levels with complex fan levels.

Complex mode is generally the preferred mode of operation since it allows you to specify precisely what the fan should to to keep each component within its specified temperature range.

See Also


Example configs shipped with the source distribution, also available at

Referenced By


2020-04-09 thinkfan 1.3.1