FANCONTROL(8)
π FANCONTROL β the fan whisperer π¨β¨
okay so bestie, welcome to fancontrol(8), part of the System Manager's Manual π. This is the one that keeps your fans behaving. Sit down, grab a boba, we're gonna go through it together. π§
β¨ NAME β¨
fancontrol β automated software based fan speed regulation π
πΈ SYNOPSIS πΈ
fancontrol [configfile]
π DESCRIPTION π
so fancontrol is a shell script, right, and it's made to vibe with lm_sensors. Here's the tea: it reads its config from a file, then it does the math on your temperatures, calculates the fan speeds, and sets the matching PWM outputs to those computed values. no cap. π―
β οΈ WARNING β οΈ
okay pausing the hype for one sec because this part is serious, bestie.
Please be careful when using the fan control features of your mainboard. On top of the risk of burning your CPU, at higher temperatures there will be higher wearout of your other hardware components, too. So if you plan to use these components in 50 years, maybe you shouldn't use fancontrol at all. π Also please keep in mind most fans aren't designed to be powered by a PWMed voltage.
In practice it doesn't seem to be a major issue, the fans will get slightly warmer, just be sure to have a temperature alarm and/or shutdown call, in case some fan fails, because you probably won't hear it anymore ;) π
lowkey that wink at the end is doing so much emotional labor. anyway. alarm. shutdown. do it. π«Ά
π CONFIGURATION π
For easy configuration, there's a script named pwmconfig(8) which lets you interactively write your configuration file for fancontrol. Alternatively you can write this file yourself using the information from this manpage. your call, main character. π
Since most of you are going to use the pwmconfig(8) script, the config file syntax will be discussed last. First I'm going to describe the various variables available for changing fancontrol's behaviour:
π the variables π
INTERVALβ This variable defines at which interval in seconds the main loop offancontrolwill be executed. β°DEVPATHβ Maps hwmon class devices to physical devices. This letsfancontrolcheck that the configuration file is still up-to-date. πDEVNAMEβ Records hwmon class device names. This letsfancontrolcheck that the configuration file is still up-to-date. πFCTEMPSβ Maps PWM outputs to temperature sensors sofancontrolknows which temperature sensors should be used for calculation of new values for the corresponding PWM outputs. A prefix of!can be used to execute a command as a temperature sensor. π‘οΈFCFANSβ Records the association between a PWM output and a fan input. Thenfancontrolcan check the fan speed and restart it if it stops unexpectedly. π¨MINTEMPβ The temperature below which the fan gets switched to minimum speed. π₯ΆMAXTEMPβ The temperature over which the fan gets switched to maximum speed. π₯MINSTARTβ Sets the minimum speed at which the fan begins spinning. You should use a safe value to be sure it works, even when the fan gets old. π΅MINSTOPβ The minimum speed at which the fan still spins. Use a safe value here, too. βMINPWMβ The PWM value to use when the temperature is belowMINTEMP. Typically, this will be either0if it is OK for the fan to plain stop, or the same value asMINSTOPif you don't want the fan to ever stop. If this value isn't defined, it defaults to0(stopped fan). π΄MAXPWMβ The PWM value to use when the temperature is overMAXTEMP. If this value isn't defined, it defaults to255(full speed). ποΈAVERAGEβ How many last temperature readings are used to average the temperature. It can be used to smoothen short temperature peaks. If this value isn't defined, it defaults to1(no averaging). π
π¦ the config file format π¦
ngl the configuration file format is a bit strange:
VARIABLE=chip/pwmdev=value chip/pwmdev2=value2
VARIABLE2=...
Each variable has its own line. The variable name is followed by an equal sign and the device=value pairs. These consist of the path to the pwm output for which the value is valid, equal sign followed by the value and are separated by a blank. Path can be absolute or relative (from /sys/bus/i2c/devices or /sys/class/hwmon depending on the kernel version). Example:
MINTEMP=hwmon0/device/pwm1=40 hwmon0/device/pwm2=54
You have to play with the temperature values a bit to get happy. For initial setup I recommend using the pwmconfig script. Small changes can be made by editing the config file directly following the rules above. βοΈ
Upon starting, fancontrol will make sure that all referenced devices do exist and match what they were at configuration time, and that all referenced sysfs files do exist. If not, it will quit immediately, upon the assumption that the configuration file may be out-of-sync with the loaded kernel drivers. πͺπ¨
it's giving "strict parent checking your homework before you leave the house." and honestly? respect. π
π₯ THE ALGORITHM π₯
fancontrol first reads its configuration, writes it to arrays and loops its main function. This function gets the temperatures and fanspeeds from kernel driver files and calculates new speeds depending on temperature changes, but only if the temp is between MINTEMP and MAXTEMP. After that, the new values are written to the PWM outputs. Currently the speed increases linearly with rising temperature. This way you won't hear your fans most of the time at best. π€«
π SEE ALSO π
π AUTHOR π
Marius Reiner <marius.reiner@hdev.de>
and that's the whole page, bestie!! πβ¨ this came to you from lm-sensors 3, dated September 2009 β yes she's an elder but she still ate π π«Ά go keep your temps chill and your fans spinning. mwah. ππ¦
π¦ where this page comes from
- arch rolling: lm_sensors 1:3.6.2-1 Β· GPL-2.0-only OR LGPL-2.1-only
- debian trixie: fancontrol 1:3.6.2-2
- nixpkgs unstable: lm-sensors 3.6.2
- opensuse-leap 16.0: sensors 3.6.2-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: sensors 3.6.2-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: sensors 3.6.2-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: sensors 3.6.2-160000.2.2 Β· GPL-2.0-or-later
- ubuntu questing: fancontrol 1:3.6.2-2
- ubuntu resolute: fancontrol 1:3.6.2-2build1
- ubuntu stonking: fancontrol 1:3.6.2-2build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms