THINKFAN.CONF(5) | File Formats Manual | THINKFAN.CONF(5) |
thinkfan.conf - YAML-formatted config for thinkfan(1)
YAML is a very powerful, yet concise notation for structured data. Its full specification is available at https://yaml.org/spec/1.2/spec.html. Thinkfan uses only a small subset of the full YAML syntax, so it may be helpful, but not strictly necessary for users to take a look at the spec.
The most important thing to note is that indentation is syntactically relevant. In particular, tabs should not be mixed with spaces. We recommend using two spaces for indentation, like it is shown below.
The thinkfan config has three main sections:
Under each of these sections, there must be a list of key-value maps, each of which configures a sensor driver, fan driver or fan speed mapping.
For thinkfan to work, it first needs to know which temperature sensor drivers and which fan drivers it should use. The mapping between temperature readings and fan speeds is specified in a separate config section (see the FAN SPEEDS section below).
The entries under the sensors: section can specify hwmon, thinkpad_acpi, NVML or atasmart drivers, where the latter two must be enabled at compile-time. There can be any number (greater than zero) and combination of hwmon, tpacpi, nvml and atasmart entries. However there may be at most one instance of the tpacpi entry.
sensors: - hwmon: hwmon-path name: hwmon-name indices: index-list correction: correction-list optional: bool-allow-errors - tpacpi: /proc/acpi/ibm/thermal indices: index-list correction: correction-list optional: bool-allow-errors - nvml: nvml-bus-id correction: correction-list optional: bool-allow-errors - atasmart: disk-device-file correction: correction-list optional: bool-allow-errors - ...
Currently, thinkfan supports only one fan, so there can be only one entry in the list. Support for multiple fans is currently in development and planned for a future release. The fan is either an hwmon fan:
fans: - hwmon: hwmon-path name: hwmon-name indices: index-list
or a tpacpi fan:
fans: - tpacpi: /proc/acpi/ibm/fan
Note that this method may lead to problems when the load order of the drivers changes across bootups, because in the “hwmonX” folder name, the X actually corresponds to the load order. Use method 2) or 3) to avoid this problem.
The PCI bus ID of an nVidia graphics card that is run with the proprietary nVidia driver. Can be obtained with e.g. “lspci | grep -i vga”. Usually, nVidia cards will use the open source nouveau driver, which should support hwmon sensors instead.
Full path to a device file for a hard disk that supports 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.
The levels: section specifies a list of fan speeds with associated lower and upper temperature bounds. If temperature(s) drop below the lower bound, thinkfan switches to the previous level, and if the upper bound is reached, thinkfan switches to the next level.
In the simplified form, only one temperature is specified as an upper/lower limit for a given fan speed. In that case, the lower-bound and upper-bound are compared only to the highest temperature found among all configured sensors. All other temperatures are ignored. This mode is suitable for small systems (like laptops) where there is only one device (e.g. the CPU) whose temperature needs to be controlled, or where the required fan behaviour is similar enough for all heat-generating devices.
levels: - [ fan-speed, lower-bound, upper-bound ] - ...
This mode is suitable for more complex systems, with devices that have different temperature ratings. For example, many modern CPUs and GPUs can deal with temperatures above 80°C on a daily basis, whereas a hard disk will die quickly if it reaches such temperatures. In detailed mode, upper and lower temperature limits are specified for each sensor individually:
levels: - speed: fan-speed lower_limit: [ l1, l2, ... ] upper_limit: [ u1, u2, ... ] - ...
For a hwmon fan, fan-speed is a numeric value ranging from 0 to 255, corresponding to the PWM values accepted by the various kernel drivers.
For a tpacpi fan on Lenovo/IBM ThinkPads and some other Lenovo laptops (see SENSORS & FAN DRIVERS above), numeric values and strings can be used. The numeric values range from 0 to 7. The string values take the form "level lvl-id", where lvl-id may be a value from 0 to 7, auto, full-speed or disengaged. The numeric values 0 to 7 correspond to the regular fan speeds used by the firmware, although many firmwares don't even use level 7. The value "level auto" gives control back to the firmware, which may be useful if the fan behavior only needs to be changed for certain specific temperature ranges (usually at the high and low end of the range). The values "level full-speed" and "level disengaged" take the fan speed control away from the firmware, causing the fan to slowly ramp up to an absolute maximum that can be achieved within electrical limits. Note that this will run the fan out of specification and cause increased wear, though it may be helpful to combat thermal throttling.
The thinkfan manpage: thinkfan(1) Example configs shipped with the source distribution, also available at: https://github.com/vmatare/thinkfan/tree/master/examples The Linux hwmon user interface documentation: https://www.kernel.org/doc/html/latest/hwmon/sysfs-interface.html The thinkpad_acpi interface documentation: https://www.kernel.org/doc/html/latest/admin-guide/laptops/thinkpad-acpi.html
Report bugs on the github issue tracker: https://github.com/vmatare/thinkfan/issues
December 2021 | thinkfan 1.3.1 |