You are here

Setting up temperature sensors with Ksysguard

Submitted by Druss on Sat, 2007-11-03 18:49

Following my recent adventures with my motherboard, I wanted to set up a temperature sensor on my Kubuntu desktop, so that I could keep an eye on my motherboard temperature. Searching the repository came up with a number of potential options including ksensors. However, when I installed ksensors I couldn't find a temperature option; just memory usage and stuff.

As per usual, some Google wisdom pointed out Ksysguard as the ideal solution, including confirmed reports that it definitely does support temperature sensors. Furthermore, it is installed by default in KDE and the only reason I didn't find it with my initial search was because of its rather .. generic nature. But, desafortunadamente, looking at the options in Ksysguard revealed nothing temperature related.

Back to google and I found that if things were alright, there should have been an ACPI or similar option in the sensor list in Ksysguard; conclusion: it was either a configuration issue or my system just didn't support ACPI. The latter was not true as I was sure my mobo did support ACPI as was evident when I checked the BIOS and also confirmed with the manual. So, either Linux wasn't detecting it right or it was, but the application wasn't configured right.

Further googling to check for the detection of ACPI in Linux informed me that if I had a /proc/acpi directory, it had been detected fine. I did and furthermore, I had a suspicious looking thermal_zone directory (amongst other interesting tid-bits) listed below it.

So, more googling and a quick trip to IRC took me to a rather complicated looking Sensor Install Howto page. Reading through all the steps made my heart murmur in distress :| But, luckily, a kind soul had added a short-and-sweet comment right at the bottom of the page that applied specifically to Gutsy Gibbon that cut all the excess fat off the proposed solution:

In Gutsy the process to configure lm-sensors is much simpler. I installed lm-sensors and sensors-applet, ran sudo sensors-detect (and said yes to everything). It asks if I want it to automatically add the modules to /etc/modules, I said yes. Then restart to get the modules (one could do some modprobing, but just restarting is easier) . Then I added the sensor applet to my panel. -- SamTygier

So, essentially:

  1. sudo apt-get install lm-sensors
  2. sudo sensors-detect
  3. Answer YES to all questions and it will generate the appropriate "module list" for you.
  4. Say YES when it asks you whether it can add append all the required stuff to /etc/modules automatically. Make a backup as a precaution if necessary.
  5. Restart your PC to get the sensors working. Alternatively, use modprobe to detect the modules and avoid the restart. For e.g., if i2c-sensor was the name of a module detected by sensor-detect, then type sudo modprobe i2c-sensor to detect the component directly without having to restart.
  6. If you check Ksysguard now, you should be able to see a new section titled "Hardware sensors" with various options. On my PC, CPU_TEMP indicated the CPU temperature while B_TEMP (in an M subtree :S) indicated the motherboard temperature.
  7. KDE comes with a kicker panel applet for Ksysguard where you can keep an eye on these values. Once you have enabled the applet, just drag one of the sensors (not the graph) to one of the applet displays.

This has turned into a rambling essay. Hope this helps somebody :)