Do you feel that your laptop is overheating abnormally under Ubuntu? This article offers a completesoftwareapproach tocool, monitor et control the temperatureof your machine.

Objective of this guide

  • Reduce the overall temperature of the computer

  • Optimize power management

  • Monitor critical components (CPU, GPU, etc.)

  • Avoid slowdowns due tothermal throttling

gestion thermique

Prerequisites

  • An Ubuntu machine (20.04 or higher recommended)

  • Internet connection

  • Command line skills (beginner to intermediate level)

Install and configure tools

lm-sensors to detect sensors

sudo apt install lm-sensors
sudo sensors-detect
sensors

Answer`YES`all the questions from`sensors-detect`to detect modules.

tlp: intelligent power manager

sudo apt install tlp tlp-rdw
sudo systemctl enable tlp
sudo systemctl start tlp
tlp etat

cpufrequtils: limit CPU frequencies

sudo apt install cpufrequtils
cpufreq-info
sudo cpufreq-set -g powersave
  • powersave: limits frequency spikes

  • performance: favors performance at the expense of temperature

auto-cpufreq: simplified dynamic management

git clone https://github.com/AdnanHodzic/auto-cpufreq.git
cd auto-cpufreq
sudo ./auto-cpufreq-installer
sudo auto-cpufreq --install
auto cpufreq cycle

thermald: automatic thermal protection

sudo apt install thermald
sudo systemctl enable thermald
sudo systemctl start thermald

Real-time monitoring

sensors via command line

watch -n 2 sensors

GUI Option: psensor

sudo apt install psensor

Simple graphical interface for CPU, GPU, fans.

Additional tips

  • Close tabs and heavy applications (e.g., browsers)

  • Avoid intense use on battery

  • Monitor processes via`htop`:

sudo apt install htop
htop

Clean the system to limit overloads

sudo apt autoremove
sudo apt autoclean
sudo journalctl --vacuum-time=3d

To go further

You can create a custom`systemd`service to automatically apply certain settings at startup. Would you like an example in a future article? Let me know!

📚 Conclusion

By combining these simple tools, you will gain:

  • Controlled CPU temperature

  • Less fan noise

  • Better battery life

Remember to monitor your temperatures regularly to prevent any overheating.

_ Better safe than melting your CPU. _

Related articles