Optimizing Your Linux PC's Cooling Performance With Fan Speed Control

Keeping your Linux PC running at optimal temperatures is crucial for performance and hardware longevity. While automatic fan control does a decent job, manually customizing your CPU and system fan speeds can let you fine-tune cooling and noise levels.
Several tools exist on Linux to give you granular control over your computer's fans. With a bit of tweaking, you can configure fan speeds to best suit your needs - whether you want maximum cooling, quieter operation, or a balanced profile.
Understanding CPU Cooling On Linux
Modern PCs use variable-speed fans to cool internal components like the CPU, GPU, chipset, and storage drives. Fans spin faster or slower based on a temperature sensor feedback loop.
As processor temperatures rise under load, fan speeds increase to provide more cooling air volume through the PC case. When the CPU is idling, the fans spin slower or even stop to minimize noise.
This automated fan control is handled by the motherboard firmware and works well enough for most people. However, enthusiasts may want to customize fan speeds for their usage.
For example, you may want faster fans for increased cooling when overclocking. Or you might reduce fan speeds to lower noise during light workloads.
Luckily, Linux offers several ways of achieving granular fan speed control.
Installing lm-sensors For Hardware Monitoring
The most popular fan control utilities for Linux rely on lm-sensors for hardware monitoring. lm-sensors reads temperature sensors, fan speeds, voltages, and other info from your PC components.
Install lm-sensors using your Linux distribution's package manager:
sudo apt install lm-sensors #Ubuntu/Debian
sudo dnf install lm-sensors #Fedora
sudo pacman -S lm-sensors #Arch Linux
After installing lm-sensors, run sudo sensors-detect to scan for available hardware monitors. Answer "yes" to automatically load any needed kernel modules.
Finally, run sensors to view detected temperature sensors, fan speeds, voltages, and other system info. Take note of your CPU core temperatures and fan speeds, as you'll want to refer to these later when configuring your fans.
Fan Speed Control With fancontrol
The fancontrol utility uses lm-sensors to adjust fan speeds based on temperature thresholds you define. First install fancontrol:
sudo apt install fancontrol #Ubuntu/Debian
sudo dnf install fancontrol #Fedora
sudo pacman -S fancontrol #Arch Linux
Run sudo pwmconfig to test fan control and generate an initial config file. pwmconfig will adjust your fans to different speeds and determine which ones are controllable.
After pwmconfig finishes detecting your hardware, you can edit the generated config file at /etc/fancontrol.
The config sets temperature thresholds for each sensor, along with associated fan speeds. For example:
INTERVAL=10
FCTEMPS=cpu0_thermal-acpitz-virtual-0
FCFANS=cpu0_fan-acpitz-fan
MINTEMP=cpu0_thermal-acpitz-virtual-0=20
MAXTEMP=cpu0_thermal-acpitz-virtual-0=80
MINSTART=cpu0_fan-acpitz-fan=20
MINSTOP=cpu0_fan-acpitz-fan=10
This sets the polling interval to 10 seconds, defines the temperature sensor and fan to control, and sets the fan speed based on minimum/maximum thresholds.
Tweak the values as needed for your particular hardware. Just make sure to avoid setting the fans too slow when hot - you don't want to overheat your components!
Finally, run sudo fancontrol to load and activate your new config. Monitor your temperatures using sensors to verify your fan speeds change as expected.
GUI Fan Control With Coolero
If you prefer a graphical interface, check out Coolero. Available as a Flatpak, Coolero shows temperatures, fan speeds, and voltages in a clean UI.
You can switch between pre-configured fan speed profiles for different scenarios like maximum cooling or power save quiet mode. It also allows the creation of custom fan curves.
Coolero provides an easy GUI for monitoring sensors and customizing Linux fan speeds
Install Coolero on your Linux distro, then launch it to configure your fan speeds. Click "Fan Control" to see options for setting speed profiles or curves.
The app automatically detects and labels your system's temperature sources and fan outputs. Adjust to suit your needs, then click "Apply" to set the fan configuration.
Other Fan Control Options
Besides fan control and Coolero, several other utilities exist for controlling Linux fan speeds:
thinkfan - Simple CLI fan daemon designed for Thinkpad laptops but works with other hardware too.
mbpfan - Fan control daemon focused on Dell laptops. Reads temperatures with ACPI and sets PID fan speeds.
notebooks-fan-control - Frontend for Thinkpad and other laptops to configure fan modes based on temperatures.
Argus Monitor - Closed source fan control program for Linux. Offers different fan speed strategies.
SpeedFan - Advanced Windows software that supports reading some Linux hardware sensors. Limited fan control capabilities, however.
For desktop PCs, fan control tends to be the most universally compatible. But notebook-specific tools like thinkfan may work better for laptops.
Achieving Optimal Cooling and Noise Balance
The ability to customize fan speeds opens up new possibilities for balancing noise production, power efficiency, and component cooling on a Linux system.
Take time to monitor your temperatures and experiment with different fan control configurations. A few tweaks could keep your system running cooler and quieter.
Just remember not to sacrifice necessary cooling, especially when components are under heavy load. Watch those temperatures and adjust your fan speeds accordingly for optimal hardware health!






