THINKFAN(1)
π THINKFAN π
okay bestie, welcome to the thinkfan(1) manual page β yes that's the section 1 of the manual, we're doing this properly. sit down, grab a strawberry π, and let's talk about the little program that keeps your laptop from melting into a puddle of sad aluminum.
β¨ NAME β¨
thinkfan β a simple fan control program. that's it, that's the whole vibe. simple. fan. control. π
π¦ SYNOPSIS π¦
thinkfan [-hnqDd] [-b BIAS] [-c CONFIG] [-s SECONDS] [-p [DELAY]]
look at all those little flags. we're gonna go through every single one of them, don't you worry. π
πΈ DESCRIPTION πΈ
so here's the tea: thinkfan reads temperatures from a configured set of sensors, and then it sets fan speeds according to the temperature limits you set in the config file. that's the whole job. temperature in, fan speed out, laptop lives. π«Ά
WARNING: Thinkfan does only very basic sanity checking on the configuration. This means that a bad configuration can increase thermal wear on the hardware or even cause destruction from overheating!
not me being dramatic β that's a real warning, fr fr. if you write a cursed config, thinkfan will trust you, and your hardware will pay the price. π
π‘οΈ Supported sensors
/proc/acpi/ibm/thermalthis one is provided by thethinkpad_acpikernel module on older Thinkpads. vintage behavior. antique elegance. β¨temp*_inputfiles in sysfs (hwmon interface) may be provided by any hwmon drivers, includingthinkpad_acpion modern Thinkpads. glow up.- Hard disks with S.M.A.R.T. support (libatasmart) available if thinkfan was compiled with
-DUSE_ATASMART=ON. Note that modern Linux kernels can also expose S.M.A.R.T. hard disk temperatures via the hwmon interface in sysfs (and therefore also vialm_sensors), which is generally preferrable because it is more efficient. so like, you can use libatasmart, but the newer route is giving efficient. π - From the proprietary nVidia driver when the proprietary nVidia driver is used, no hwmon for the card will be available. In this situation, thinkfan can use the proprietary NVML API to get temperatures. teamwork makes the dream work.
- Via lm_sensors (libsensors interface) this is a modern and more reliable alternative to the sysfs hwmon interface mentioned above. It's basically a standardized abstraction for sysfs hwmon where sensors can always be identified uniquely, even when the load order of kernel modules changes. iconic. no more sensor identity crises.
π Supported fans
Thinkfan can control any number of fans, which can be specified in two ways:
/proc/acpi/ibm/fanprovided by thethinkpad_acpikernel module. Note that the kernel module needs to be loaded with the option"fan_control=1"to enable userspace fan control. On some models,"experimental=1"may also be required. See the SEE ALSO section at the bottom of this manpage for a link to the officialthinkpad_acpidocumentation. (yes, we will get there. patience. π§)pwm*_enableandpwm?files in sysfs provided by all modern hardware monitoring drivers, includingthinkpad_acpi. modern queen behavior. π
π Mapping temperatures to fan speeds
There are two general modes of operation:
- Detailed mode in detailed mode, temperature limits are defined for each sensor thinkfan knows about. Setting suitable limits for each sensor in your system will probably require a bit of experimentation and good knowledge about your hardware, but it's the safest way of keeping each component within its specified temperature range. See the example configs to learn about the syntax. highkey the responsible choice.
- Simple mode in simple mode, thinkfan uses only the highest temperature found in the system. That may be dangerous, e.g. for hard disks. That's why you should provide a correction value (i.e. add
10-15 Β°C) for the sensor that has the temperature of your hard disk (or battery...). See the example config files for details about that. lowkey unhinged but it works if you do the math. π
π CONFIGURATION π
All of the features described above are configured in the thinkfan config file. Its default location is /etc/thinkfan.conf or /etc/thinkfan.yaml (see also the -c option below).
An example configuration is provided with the source package. It is intended purely for illustration of various scenarios and is not suitable as a basis for actually functional config. do not just copy it, bestie, I am begging you. For a complete reference see the config man page thinkfan.conf(5).
π OPTIONS π
-hβ Show a short help message. the "hello, what is this" flag.-s SECONDSβ Maximum seconds between temperature updates (default:5). how often we do the vibe check on your temps.-b BIASβ Floating point number (-10to30) to smooth out or amplify quick temperature changes. If a sensor's temperature increases by more than2 Β°Cduring one cycle, we calculate an offset value as follows:
offset = delta_t * BIAS / 10
This offset is then added to the actual temperature:
biased_t = current_t + offset
If delta_t stays below 2 Β°C in subsequent loops, offset will be reduced back to 0 in increments of sgn(BIAS) * (1 + abs(BIAS/5)).
This means that a negative BIAS will even out short and sudden temperature spikes like those seen on some on-DIE sensors, while positive values will exaggerate increasing temperatures to compensate e.g. for sensors that respond slowly because they are attached to heavy heatsinks. (yes, it's literally therapy for your temperature readings. β¨)
Use DANGEROUS mode to remove the -10 to +30 limit. Note that you can't have a space between -b and a negative argument, because otherwise getopt will interpret things like -10 as an option and fail (i.e. write -b-10 instead of -b -10). classic getopt shenanigans, we've all been there. π
The default is 0.
-c FILEβ Load a different configuration file. By default, thinkfan first tries to load/etc/thinkfan.yaml, and/etc/thinkfan.confafter that. The former must be in YAML format, while the latter can be either YAML or the old legacy syntax.
If this option is specified, thinkfan attempts to load the config only from FILE. If its name ends in ".yaml", it must be in YAML format. Otherwise, it can be either YAML or legacy syntax. See thinkfan.conf(5) and thinkfan.conf.legacy(5) for details.
-nβ Do not become a daemon and log to terminal instead of syslog. for the girlies who want to watch the logs happen in real time. π-qβ Be quiet, i.e. reduce logging level from the default. Can be specified multiple times until only errors are displayed/logged. stack it like skincare. π§΄-vβ Be more verbose. Can be specified multiple times until every message is displayed/logged. the opposite. also stackable. also valid.-p [SECONDS]β Use the pulsing-fan workaround (for older Thinkpads). Takes an optional floating-point argument (0-10s) as depulsing duration. Default0.5s. your fan was doing a little dance, this stops the dance.-dβ Do not read temperature from sleeping disks. Instead,0 Β°Cis used as that disk's temperature. This is needed if reading the temperature causes your disk to wake up unnecessarily. NOTE: This option is only available if thinkfan was built with-D USE_ATASMART. let sleeping disks lie. π΄-Dβ DANGEROUS mode: Disable all sanity checks. May damage your hardware!! this is the main character flag and it is the villain arc flag. do not.
β SIGNALS β
SIGINTandSIGTERMsimply interrupt operation and should cause thinkfan to terminate cleanly. polite exits only. π«ΆSIGHUPmakes thinkfan reload its config. If there's any problem with the new config, we keep the old one. no notes, that's just good design.SIGUSR1causes thinkfan to dump all currently known temperatures either to syslog, or to the console (if running with the-noption). temperature receipts. π§ΎSIGPWRtells thinkfan that the system is about to go to sleep. Thinkfan will then allow sensor read errors for the next4loops because many sensors will take a few seconds before they are available again after waking up from a sleep state (suspend or hibernate). If the shipped systemd service filethinkfan-sleep.serviceis installed, it should take care of sending this singal when going to sleep. On non-systemd distributions, other mechanisms may have to be used. (yes, the original really does say "singal" and I am keeping it, character for character, because that's the rule and also it's cute.) πSIGUSR2tells thinkfan to re-initialize fan control. This is required by most fan drivers after waking up from suspend because they tend to reset fan control to automatic mode on wakeup. Similar toSIGPWR, the systemd service filethinkfan-wakeup.serviceshould take care of sending this signal on wakeup on systemd systems. On non-systemd distributions, other mechanisms may have to be used. wake up bestie, we're controlling fans again. π
π RETURN VALUE π
0β Normal exit β1β Runtime error2β Unexpected runtime error3β Invalid commandline option
π₯ SEE ALSO π₯
The thinkfan config manpage: thinkfan.conf(5)
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
π BUGS π
If thinkfan tells you to, or if you feel like it, report issues at the Github issue tracker:
https://github.com/vmatare/thinkfan/issues
and that's the whole page bestie, you're officially a thinkfan scholar ππ
this has been thinkfan 2.0.0, April 2022 β go forth, configure responsibly, and please don't use -D. mwah π«Άβ¨
π¦ where this page comes from
- alpine 3.24: thinkfan-doc 2.0.0-r1 Β· GPL-3.0-only
- fedora 43: thinkfan 2.0.0-2.fc43 Β· GPL-3.0-or-later
- fedora 44: thinkfan 2.0.0-3.fc44 Β· GPL-3.0-or-later
- nixos 26.05: thinkfan 2.0.0
- nixpkgs unstable: thinkfan 2.0.0
- ubuntu resolute: thinkfan 2.0.0-1 Β· GPL-3.0-only
- ubuntu stonking: thinkfan 2.0.0-1build1 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms