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

    aum

    • 329 views
    • 4 minutes
     Share


    • 329 views
    • 4 minutes

    If you have fans running too often or you want to improve how Linux uses your hardware, there's a simple command for that.

     

    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 my System76 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.

     

    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.

     

    Should that happen, you need to use the sensors-detect command. 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-detect command.


    3. Running sensors-detect

     

    At the terminal window, issue the command:

     

    sudo sensors-detect

     

    4. Answer the questions

     

    After running the sensors-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):

     

    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.

     

    Source


    User Feedback

    Recommended Comments

    There are no comments to display.



    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...