Want to know how you can change the fan speed in Linux? Using the command line is one of the methods that can help you adjust your fan speed. By using commands, you can reduce noise and save energy, which may be unclear if you don't know what you're doing. That's why we've put together this guide on how to change fan speed in Linux. We'll show you how to adjust your fan speed using the command line. Let's get started! We suggest you read the article test disk speed in Linux.

Warning: Avoid stopping fans on high system loads because it may damage your hardware permanently.

Fan Speed Control via Command Line in Linux

Command lines are powerful and convenient tools for managing your system's cooling. It allows users to manually adjust the speed of their fans to match their needs, whether for maximum cooling or minimal noise. And it’s happening by using the lm-sensors utility, which reads the system's temperature and adjusts the fan speed accordingly. 

Fancontrol (lm-sensors)

Fancontrol is a feature of the lm-sensors package that allows for the automatic control of computer fans. It works by monitoring the temperatures of various components in the system and adjusting the fan speeds accordingly. Check the items below to see how it works:

lm-sensors

To get started, run the following command:

sensors-detect

This command detects all of your sensors present and uses them for fancontrol. Now run the command below to see if the sensors are detected correctly.

sensors

Note: In case of not displaying an RPM value for your CPU fan, increase your fan divisor for sensors.

Configuration

after configuring sensors, you must use the following command to test and configure fan speed control.

pwmconfig

This command creates “etc/fancontrol” a customized configuration file. Enter ‘Y’ for yes and ‘N’ for no.

Note: you may experience issues running /sys/class/hwmon/ paths for your configuration file. Hwmon class devices are used to group all hwmon sensors into one directory. And rebooting may change the order of hwmon devices and cause fancontrol to stop working.

Running fancontrol

To run fancontrol, use the command below:

fancontrol

or

fancontrol. Service

Shortly after running this command, you should hear fans starting. 

Note: Unfortunately, fancontrol won’t work after suspending, so you must restart your device to use it again.

Conclusion

  • Changing the fan speed can help improve the cooling performance of your computer and lower noise levels from your fan.
  • The command line tools to change the fan speed will vary depending on your Linux distribution but are usually easy to find with a quick online search.
  • When changing the fan speed, you should be mindful of staying within the recommended speed range for your device to avoid any potential damage.

You can also buy cheap linux vps to practice it on a routine basis.

People also read: