Register now for better personalized quote!

How to better monitor your Ubuntu Linux PC's temperature and voltage

May, 31, 2023 Hi-network.com
eyetoeyePIX/Getty Images

Recently, I switched from Pop!_OS to Ubuntu Budgie as my primary operating system. For the most part, the transition went fairly smoothly. There was, however, something interesting happening with mySystem76 Thelio desktop that I'd never before experienced. Once on a different OS, the fans ran constantly. This led me down a few rabbit holes before I could fix the problem. Ultimately, the issue was resolved by installing the System76 firmware that is required to properly control the fans. However, the process reminded me of a tool that can give Linux a boost with your hardware.

Also: The best Linux distros for beginners

You see, every motherboard contains various sensors that monitor things like temperature -- and the temperature of your PC is pretty important. Those CPUs can run very hot. If they overheat, your computer can crash (or worse). Because every PC manufacturer does things differently, and because PC internals vary from iteration to iteration, it's not always 100% certain that an operating system you install will pick up on every one of your motherboard's sensors. Most often, the OS installation does a good job but you might find (as I did) that your fans are running constantly, even when you're not using the machine.

Also: The best laptop cooling pads (that really work)

Should that happen, you need to use thesensors-detectcommand. Let me show you how it's done on Ubuntu-based Linux distributions.

How to install and use sensors-detect

What you'll need: The only things you'll need for this are a Ubuntu-based Linux distribution and a user with sudo privileges. 

1. Open a terminal window

As many Linux distributions do not ship with the necessary software installed, you'll need to add it manually. Open your desktop menu and select the terminal application.

2. Install lm-sensors on Ubuntu-based distributions

From the terminal window, issue the following command on a Ubuntu-based distribution:

sudo apt-get install lm-sensors -y

Once lm-sensors is installed, you're ready to use the sensors-detectcommand.

3. Running sensors-detect

At the terminal window, issue the command:

sudo sensors-detect

4. Answer the questions

After running thesensors-detect command, you'll be asked a number of questions, which include:

  • Some south bridges, CPUs or memory controllers contain embedded sensors. Do you want to scan for them? This is totally safe. (YES/no):
  • Some Super I/O chips contain embedded sensors. We have to write to standard I/O ports to probe them. This is usually safe. Do you want to scan for Super I/O sensors? (YES/no):
  • Some systems (mainly servers) implement IPMI, a set of common interfaces through which system health data may be retrieved, amongst other things. We first try to get the information from SMBIOS. If we don't find it there, we have to read from arbitrary I/O ports to probe for such interfaces. This is normally safe. Do you want to scan for IPMI interfaces? (YES/no): 
  • Some hardware monitoring chips are accessible through the ISA I/O ports. We have to write to arbitrary I/O ports to probe them. This is usually safe though. Yes, you do have ISA I/O ports even if you do not have any ISA slots! Do you want to scan the ISA I/O ports? (yes/NO):
  • Do you want to probe the I2C/SMBus adapters now? (YES/no): 

Also: How to install Linux on an old laptop

Answer Yes to all questions. When all questions are answered, it will ask if you want it to present a summary. Press Enter on your keyboard to display the results. Once the results are displayed, sensors-detect will then ask if you want it to automatically add the necessary items to /etc/modules. For mine, it lists coretemp as a module that I should add. Type Yes and those modules will be added. Do note, if sensors-detect lists a large number of modules, you should do a bit of research before allowing the tool to add them all. You might wind up adding modules that are already built into your installed kernel.

5. Reboot your machine

If sensors-detect added modules to /etc/module, you can go ahead and reboot so those modules will take effect.

And that's it! Hopefully, your operating system will now have better control over your hardware to improve the Linux experience.

Also: The most important reason you should be using Linux at home

See also

How to install Ubuntu Linux (It's easy!)How to run a Windows app on Linux with WineHow to get started with Git on LinuxHow to kill a process in Linux
  • How to install Ubuntu Linux (It's easy!)
  • How to run a Windows app on Linux with Wine
  • How to get started with Git on Linux
  • How to kill a process in Linux

tag-icon Hot Tags : Services & Software Open Source

Copyright © 2014-2024 Hi-Network.com | HAILIAN TECHNOLOGY CO., LIMITED | All Rights Reserved.