Fan Control and Power Management
Install and configure thinkfan for quiet fan profiles, TLP for battery life, and power-profiles-daemon on a Lenovo ThinkPad L14 Gen 2.
What This Guide Achieves
Fix a laptop fan that runs at full speed (3600+ RPM) at idle when CPU temperatures are only 36-46°C. This is a common problem I have faced on ThinkPads running Linux (Ubuntu 24.04).
The root cause: The ThinkPad BIOS/EC (Embedded Controller) firmware ships with a conservative fan curve designed for Windows. Windows has its own fan management layer (Lenovo Vantage) that talks to the EC and keeps things quiet. Linux does not have this layer by default, so the EC falls back to its aggressive built-in curve — spinning the fan hard even when the CPU is perfectly cool.
This guide gives Linux the same kind of intelligent fan control that Windows gets out of the box.
| Before | After |
|---|---|
| Fan at 3600+ RPM at idle | Fan silent (0 RPM) at idle |
| Constant noise even with cool CPU | Fan only spins when CPU actually gets warm |
| BIOS controls fan with no OS feedback | Linux controls fan based on real-time temperature |
The Problem (Windows User Perspective)
If you are coming from Windows, fan management is something you probably never thought about. Lenovo Vantage handles it automatically — the fan stays quiet when you are browsing the web and only ramps up during heavy work.
On Linux, that invisible Lenovo Vantage layer is gone. The BIOS has its own fan curve baked into the EC firmware, but it does not receive proper thermal feedback from the Linux kernel the way it does from Windows. The result is a fan that runs at high RPM all the time, even when the CPU is sitting at 40°C doing nothing.
This is not a Linux bug. It is a gap in the communication between the ThinkPad firmware and the Linux kernel. For my partiuclar model of laptop the fix is to install a small tool called thinkfan that takes over fan control and makes decisions based on actual CPU temperature readings.
Diagnosis — Confirm You Have This Problem
Before installing anything, confirm that your fan is actually misbehaving. You need two pieces of information: what temperature your CPU is at, and how fast the fan is spinning.
Step 1: Install the sensor tools
sudo apt install lm-sensors
This installs the sensors command, which reads temperature and fan data from your hardware.
Step 2: Detect your hardware sensors
sudo sensors-detect
Press Enter for every question to accept the defaults. This scans your motherboard for temperature sensors and fan controllers so the sensors command knows where to look.
Step 3: Read the sensor data
sensors
On a ThinkPad L14 Gen 2 with this problem, the output looked like this:
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +46.0°C (high = +100.0°C, crit = +100.0°C)
Core 0: +42.0°C (high = +100.0°C, crit = +100.0°C)
Core 1: +42.0°C (high = +100.0°C, crit = +100.0°C)
Core 2: +43.0°C (high = +100.0°C, crit = +100.0°C)
Core 3: +42.0°C (high = +100.0°C, crit = +100.0°C)
thinkpad-isa-0000
Adapter: ISA adapter
fan1: 3619 RPM
CPU: +43.0°C
How to interpret this
- CPU temperature 42-46°C — This is perfectly normal for an idle laptop. Nothing is overheating.
- Fan at 3619 RPM — This is way too high for these temperatures. At 43°C, the fan should be off or barely spinning.
If your output looks similar — cool CPU but loud fan — this guide will fix it.
Solution — Three Tools to Install
The primary fix is thinkfan or thinkpad laptop. The other two tools (TLP/thermald) are recommended additions that help with overall power management and can further reduce heat generation, which means the fan has even less reason to spin up.
Tool 1: thinkfan (Primary Fix — Controls the Fan)
This is the tool that actually solves the problem. thinkfan is a lightweight daemon that monitors CPU temperature and adjusts fan speed according to a curve you define. It replaces the BIOS fan control entirely.
Step 1: Install thinkfan
sudo apt install thinkfan
Step 2: Enable kernel-level fan control
By default, the Linux kernel does not allow software to control the ThinkPad fan — the BIOS has exclusive control. You need to tell the thinkpad_acpi kernel module to hand over fan control to userspace.
Create a configuration file that loads this option at every boot:
echo "options thinkpad_acpi fan_control=1" | sudo tee /etc/modprobe.d/thinkpad_acpi.conf
Then apply it immediately without rebooting:
sudo modprobe -r thinkpad_acpi && sudo modprobe thinkpad_acpi fan_control=1
What this does: The
thinkpad_acpimodule is the kernel driver that talks to ThinkPad-specific hardware (fan, LEDs, special keys). Thefan_control=1option tells it to allow userspace programs (like thinkfan) to write fan speed values. Without this, thinkfan can read the temperature but cannot change the fan speed.
Step 3: Find your hwmon path
Linux exposes hardware sensors through the /sys/class/hwmon/ directory. Each sensor gets a numbered folder (hwmon0, hwmon1, etc.), and the numbers can change between boots or kernel updates. You need to find which hwmon number corresponds to the ThinkPad sensor.
grep -r "" /sys/class/hwmon/*/name 2>/dev/null
Look for the line that says thinkpad. On this system it was:
/sys/class/hwmon/hwmon6/name:thinkpad
Note the number (hwmon6 in this case). You will use it in the next step. Your number may be different.
Step 4: Create the thinkfan configuration file
This is the most important step. The configuration file tells thinkfan where to read temperatures, where to write fan speeds, and what fan speed to use at each temperature range.
sudo nano /etc/thinkfan.conf
Paste the following content (adjust hwmon6 to whatever number you found in Step 3):
sensors:
- hwmon: /sys/class/hwmon/hwmon6
name: thinkpad
indices: [1]
fans:
- hwmon: /sys/class/hwmon/hwmon6
name: thinkpad
indices: [1]
levels:
- [0, 0, 52]
- [64, 50, 58]
- [100, 56, 63]
- [128, 61, 68]
- [170, 66, 73]
- [200, 70, 78]
- [255, 75, 32767]
Understanding the fan curve
Each line in levels follows the format: [fan_speed, low_temp, high_temp]
| Fan Speed (PWM) | Approximate Fan Behavior | Activates When Temp Rises Above | Drops Back When Temp Falls Below |
|---|---|---|---|
| 0 | Fan off (silent) | — | — |
| 64 | Barely audible | 52°C | 50°C |
| 100 | Low hum | 58°C | 56°C |
| 128 | Moderate | 63°C | 61°C |
| 170 | Noticeable | 68°C | 66°C |
| 200 | Loud | 73°C | 70°C |
| 255 | Full speed | 78°C | 75°C |
Critical: PWM values, not levels. ThinkPad L14 Gen 2 fans use PWM (Pulse Width Modulation) control with values from 0 to 255. Some older ThinkPads use level-based control (0-7). If you see an error like
"Using a PWM fan, but highest level is only 7", it means you used the wrong format. The configuration above uses the correct PWM values.
The 32767 in the last line is a sentinel value meaning “infinity.” It tells thinkfan that the last speed level has no upper temperature limit — if the CPU is 75°C or above, run the fan at full speed no matter what.
The overlapping temperatures (e.g., one level activates at 52°C and the next deactivates at 50°C) create hysteresis. This prevents the fan from rapidly toggling between speeds when the temperature hovers right at a boundary. Without hysteresis, the fan would annoyingly switch on and off every few seconds.
Step 5: Enable DANGEROUS mode
Despite the alarming name, this setting is required for PWM fan control to work. It has nothing to do with danger to your hardware.
sudo nano /etc/default/thinkfan
Find the line:
THINKFAN_ARGS=""
Change it to:
THINKFAN_ARGS="-d"
Why it is called “dangerous”: By default, thinkfan refuses to set the fan to speed 0 (completely off) as a safety measure. The
-dflag overrides this restriction. It is safe because the fan curve above will ramp the fan back up if temperatures rise. Your CPU also has its own thermal protection — it will throttle and eventually shut down at critical temperatures regardless of what thinkfan does.
Step 6: Enable and start the thinkfan service
sudo systemctl enable thinkfan
sudo systemctl start thinkfan
sudo systemctl status thinkfan
The enable command makes thinkfan start automatically at boot. The start command runs it immediately. The status command lets you confirm it is working.
You should see output that includes something like:
Temperatures(bias): 42(0) -> Fans: 0
This means: “CPU is at 42°C, fan is at speed 0 (off).” The laptop should now be silent.
Tool 2: auto-cpufreq (Optional — Intelligent CPU Frequency Scaling)
auto-cpufreq dynamically adjusts your CPU frequency based on load. It can reduce heat generation by keeping the CPU at lower frequencies during light tasks, which means thinkfan has even less work to do.
Installation
sudo apt install git
git clone https://github.com/AdnanHodzic/auto-cpufreq.git
cd auto-cpufreq && sudo ./auto-cpufreq-installer
sudo auto-cpufreq --install
Important Warning
auto-cpufreq disables and replaces power-profiles-daemon, which is the service behind the Performance / Balanced / Power Saver buttons in your GNOME Settings panel. After installing auto-cpufreq, those buttons will disappear from the GUI.
For most users, this trade-off is not worth it. thinkfan already handles the fan, and the built-in GNOME power profiles give you simple, predictable control over CPU behavior.
Recommendation: Remove auto-cpufreq and Restore the GUI
If you installed auto-cpufreq and want the GUI power buttons back:
cd ~/auto-cpufreq && sudo ./auto-cpufreq-installer --remove
sudo apt install power-profiles-daemon
sudo systemctl enable power-profiles-daemon
sudo systemctl start power-profiles-daemon
The Performance / Balanced / Power Saver buttons will reappear in Settings. thinkfan handles fan control regardless of which power mode you pick, so you get the best of both worlds: a silent fan and GUI-accessible power profiles.
Tool 3: TLP and thermald (Background Power Management)
These two tools work in the background to optimize power consumption and thermal management. They do not control the fan directly — that is thinkfan’s job — but they reduce heat generation by managing things like USB autosuspend, WiFi power saving, and CPU thermal limits.
sudo apt install tlp tlp-rdw thermald
sudo systemctl enable tlp thermald
sudo systemctl start tlp thermald
- TLP manages battery and power settings (screen dimming, USB power, PCIe power states). It is especially useful on laptops.
- tlp-rdw is an optional Radio Device Wizard addon for TLP that handles WiFi/Bluetooth power based on docking state.
- thermald (Thermal Daemon) monitors CPU temperature and uses Intel-specific features to manage heat before it becomes a problem, complementing thinkfan’s fan control.
These tools are install-and-forget. They require no configuration for most users.
What Didn’t Work (and Why)
These are approaches that were tried and failed during the process of solving this problem. They are documented here so you do not waste time on them.
| Approach Tried | Why It Failed |
|---|---|
| Using GNOME power profiles alone (Balanced mode) | CPU ramps up aggressively for tiny tasks, triggering the fan via BIOS control |
| Using level-based fan config (0-7) instead of PWM (0-255) | thinkfan errored: "Using a PWM fan, but highest level is only 7" — wrong control mode for this hardware |
| auto-cpufreq alone (without thinkfan) | The fan is controlled by BIOS/EC firmware, not the CPU governor. Changing CPU frequency does not change the fan curve. |
| Power Saver mode as a permanent solution | Keeps the fan quiet by capping CPU speed, but unnecessarily cripples performance for all tasks |
The key insight is that fan speed and CPU speed are controlled by different systems. The CPU governor (managed by GNOME power profiles or auto-cpufreq) controls how fast the CPU runs. The EC firmware (overridden by thinkfan) controls how fast the fan spins. Fixing one does not fix the other.
Power Profile Behavior Explained
Here is how each GNOME power profile affects CPU and fan behavior, both with and without thinkfan:
Without thinkfan (BIOS controls the fan)
| Mode | CPU Behavior | Fan Result |
|---|---|---|
| Power Saver | Caps CPU speed low | Fan quiet, but slow performance |
| Balanced | CPU ramps up freely for any task | Fan spins up unnecessarily for small tasks |
| Performance | Full CPU speed at all times | Fan loud constantly |
With thinkfan installed (thinkfan controls the fan)
| Mode | CPU Behavior | Fan Result |
|---|---|---|
| Power Saver | Caps CPU speed low | Fan silent (thinkfan keeps it off at low temps) |
| Balanced | CPU ramps up freely for any task | Fan stays quiet unless CPU genuinely gets hot |
| Performance | Full CPU speed at all times | Fan only ramps when CPU temperature actually requires it |
With thinkfan, the fan stays quiet in ALL modes because thinkfan overrides the BIOS fan curve and makes decisions based on actual temperature, not CPU activity. The recommended combination is thinkfan + Balanced mode — you get full performance when you need it and a silent fan when you do not.
Verification
After completing the installation, verify that everything is working correctly.
Check fan speed
sensors | grep fan
At idle, you should see a low RPM value or 0 RPM. If you are seeing 3600+ RPM, something went wrong — check the troubleshooting steps below.
Check thinkfan service status
sudo systemctl status thinkfan
You should see active (running) in the output, along with a temperature/fan readout like:
Temperatures(bias): 42(0) -> Fans: 0
If thinkfan is not working
-
Check that fan control is enabled in the kernel:
cat /sys/module/thinkpad_acpi/parameters/fan_controlThis should print
Y. If it printsN, re-run the modprobe command from Step 2. -
Check that the hwmon number is correct:
grep -r "" /sys/class/hwmon/*/name 2>/dev/nullIf the thinkpad hwmon number has changed (e.g., from hwmon6 to hwmon5), update
/etc/thinkfan.confto match. -
Check the thinkfan log for errors:
sudo journalctl -u thinkfan -eLook for error messages about missing files or incorrect configuration.
After Kernel Updates
Kernel updates can sometimes reset the thinkpad_acpi module parameters or change the hwmon numbering. If the fan starts running loud again after a kernel update:
sudo modprobe thinkpad_acpi fan_control=1
sudo systemctl restart thinkfan
If that does not fix it, check if the hwmon number changed:
grep -r "" /sys/class/hwmon/*/name 2>/dev/null
If it changed, update the hwmon path in /etc/thinkfan.conf and restart the service.
Tip: The
/etc/modprobe.d/thinkpad_acpi.conffile you created in Step 2 ensures thatfan_control=1is applied automatically on every boot. You should only need to intervene manually if the hwmon numbering changes.
Complete Removal
If you want to revert to BIOS-controlled fan behavior (for example, before selling the laptop or switching to a different OS):
# Stop and disable the thinkfan service
sudo systemctl stop thinkfan
sudo systemctl disable thinkfan
# Remove the thinkfan package
sudo apt remove thinkfan
# Remove the kernel module configuration
sudo rm /etc/modprobe.d/thinkpad_acpi.conf
# Reload the thinkpad_acpi module without fan_control
sudo modprobe -r thinkpad_acpi && sudo modprobe thinkpad_acpi
After this, the fan will revert to BIOS/EC control. It will likely run louder again at idle — that is the default ThinkPad behavior on Linux without thinkfan.
This guide was written from a real debugging session on a ThinkPad L14 Gen 2 running Ubuntu 24.04. Every command was tested on actual hardware.
Related Guides
- System Requirements — Hardware compatibility and what was tested
- Fingerprint Login Setup — fprintd setup and ThinkPad fingerprint reader sleep-state fixes
- Log Analysis — Reading system logs for hardware diagnostics
- Common Issues — FAQ for common problems
Discussion