Best Linux Distro

How To Monitor Temperature In Ubuntu-Linux?

Temperature is an essential matter of your computer’s hardware and its performance. When you run your PC it will generate heat. If your PC overheats, you will lose performance.

So monitoring your PC’s thermal condition is essential. In this blog post, I will walk you through how you can monitor your PC’s temps in Ubuntu/Linux. Before that, let’s see why you should care about it and what problems you may face if your PC gets overheated.

Why Should You Care About Your PC’s Temperature?

Heat is one of the worst enemies of a Laptop and Desktop. For example, if your CPU or GPU gets hot, it will thermal throttle, your SSD’s NAND flash will degrade, and your RAM will lose performance. There are so many things that can go wrong.

If your CPU and GPU thermal throttle, you will lose significant performance. If you want optimal performance from your PC, you need to keep it cool.

So it is crucial to monitor the temperatures of every component.

How To Monitor Temperature In Ubuntu/Linux?

You can monitor your PC’s temperature using a command line utility and also a GUI tool. Both options are available.

Monitor Temperature Using Command Line Tool

Terminal Logo

For the command line tool, you can use sensors combined with the watch command to keep on monitoring the temperature.

You can use the following command to monitor the temperature in the terminal.

watch -n 2 sensors

watch -n 2 sensors

This command will show the temperature of every component and refresh every 2 seconds. But before that, make sure you have installed the sensors or lm-sensors package. Without this package, the command won’t work.

If you are in Ubuntu or any Ubuntu-based distros like Linux Mint, Zorin OS, Pop OS, KDE Neon, etc., you can install lm-sensors using the following command.

sudo apt install lm-sensors

How To Monitor Temperature Using Psensor?

Psensor logo

We will use Psensor to monitor the temperature. It’s a GUI tool for Linux that uses lm-sensors for CPU, Chipset, and CPU Fan, NVCtrl for nVidia GPU, gtop2 for CPU and Memory usage, and hddtemp, libatasmart, udisks2 for monitoring HDD and SSD.

Psensor uses all of these packages to gather all the data in one place. With Psensor you can monitor the following sensors:

  • the temperature of the motherboard and CPU sensors
  • the temperature of the NVidia GPUs
  • the temperature of the hard disk drives
  • monitor the speed of the fans
  • monitor CPU and Memory usage

It has an applet indicator that allows you to monitor all the sensors easily. You can also set an alarm for each sensor with High and Low thresholds. Psensor will send a desktop notification if the temperature exceeds the limit.

To install Psensor, use the following command in the Ubuntu terminal.

sudo apt install psensor

Make sure you have all the prerequisite packages installed. After installing Psensor, run it and you will see a window like this one. Check the sensor from the Graph column to show graphs in the Graph Panel.

PSensor Window

You can edit these sensors from the Sensor Preferences settings. Click on Pesensor from the menu bar and select Sensor Preferences.

Sensor Preferences

How To Monitor Temperature Using XSensors?

xsensors

XSensors is another GUI tool for Linux to see system temperature. It is not as robust as Psensor but gets the job done. If you only want a simple temp monitor, XSensors is a good choice.

XSensors uses the lm-sensors package to pull the data. It only shows the CPU and chipset temperatures and battery voltage.

To install XSensors, use the following command in the Ubuntu terminal.

sudo apt install xsensors

Problems You May Face Due To Overheating

Overheating is bad for your PC components. You will lose performance if your PC overheats. That is the ultimate problem.

Your CPU and GPU will thermal throttle to compensate for the heat. If you want to overclock the CPU, GPU, and RAM, you need to make sure it has a better cooling system.

Motherboard VRMs are essential when it comes to overclocking. VRM consists of 3 components – MOSFETs, Chokes, and Capacitors. These components are usually located on the left or top side of the CPU socket.

VRMs deliver power to the CPU, GPU, RAM, SSD, and other devices connected to the motherboard with an appropriate voltage.

Motherboard VRMs get hot if you overclock your CPU and RAM. If you are running a high-end motherboard then you are probably running a high-end CPU. A high-end CPU uses more power causing more heat. And if you push the CPU too far, you may end up frying your CPU and VRMs.

So you need to monitor your PC’s thermal condition for better health and better performance.

How To Improve Your Laptop’s Thermal Condition?

Laptops generally produce more heat than desktops. This is because of their compact design and less airflow. Many high-end laptops do have better airflow and thermal solutions. But in the mid and lower segment, thermal solutions are not that great.

Even a low-powered laptop can be overheated if the thermal condition is bad and the system uses excessive system resources.

To reduce the overheating issue, you can use the following tools in Linux to reduce heat and improve battery life without sacrificing performance.

Use TLP To Optimize Laptop’s Battery Life And Thermal Condition

TLP is a daemon that reduces overheating and optimizes battery life by providing pre-configured configurations for many laptops. It’s a must-have tool for any laptop running Linux. It works on almost any laptop running any Linux distro.

It’s a daemon tool that autostarts on every boot and keeps running in the background. If you are running a laptop, install TLP now. It will help you improve battery life as well as reduce overheating.

To install TLP, use the following command in the Ubuntu/Linux terminal.

sudo apt install tlp

If TLP is not available in your distro’s official repositories then you can use the PPA to install TLP. The following command only works on Ubuntu or Ubuntu-based linux distributions.

sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tlp-rdw

After installing TLP, restart your system and it will start working. TLP is pre-configured so you do not need anything to do.

Use Thermald To Optimize Thermal Condition

Thermald is another tool for laptops running an Intel CPU. Intel Open Source Technology Center developed it. Linux Thermal Daemon or thermald is a tool that monitors CPU temperature and reduces overheating by using a DTS temperature sensor and Intel P state driver, Power clamp driver, Running Average Power Limit control, and cpufreq as cooling methods.

To install Thermald, use the following command in the Ubuntu/Linux terminal.

sudo apt-get install thermald

Remove Any Buggy Software To Optimize Thermal Condition

The above-mentioned tools are good and significantly improve thermal performance but a faulty or buggy program can hamper your PC or laptop a lot.

After installing any program, if you see any unusual resource hogging, check for that program. Sometimes poorly coded applications cannot handle tasks very well and use too many hardware resources.

Or even updating your system may contain bugs that can spike the CPU up and generate heat. To find out what’s going on, open up your system monitor tool and look for the program that has high CPU usage. Check if it is really doing something or just hogging your CPU.

If you see any unusual resource hogging, remove that program if removable. Find any alternative until the bugs are getting fixed.

Conclusion

In this tutorial, we have learned how we can monitor the temperature in Ubuntu/Linux and how we can improve our laptop’s thermal condition.

This is an easy tutorial and I hope you liked it. You can ask me in the comment section below if you have any questions or suggestions. I would love to answer your questions and take the suggestions to improve myself.

Until then, have a nice day.

Leave a Reply

Your email address will not be published. Required fields are marked *

2 × five =