Installing lm-sensors (hardware sensors) support on Intel(R) Core(TM) i7 CPU on Debian Lenny Linux to track your system hardware temperature

Sunday, 27th June 2010

In this topic I’ll explain you step by step the exact steps I took to install lm-sensors (sensors) support on Debian Lenny GNU/Linux to work with a Quad Core Intel(R) Core(TM) i7 CPU
Normally in most hardware installing lm-sensors and running and completing a simple sensors-detect would be sufficient for lm-sensors to detect most of the system hardwares,
however since Intel i7 architecture is rather new and on the other hand Debian Lenny’s sensors kernel module and lm-sensors packages are comparatively old as Debian’s stable version releases are officially released with the approximately 2 years release cycle.
Thus albeit the usual simple way to detect with the command:

debian-server:~# sensors-detect

wasn’t able to detect any matching lm-sensors supported sensors hardware to track.

A quick google search revealed that other people are experiencing problems with configuring lm-sensors to work on Linux with the i7 intel CPU architecture and luckily some of them even succeeded.

A good forum discussions on the topic that I found were the Ubuntu forums:

lm-sensors and P6T6 WS Revolution mobo with i7 920 CPU as well as the debian.net forum thread:
Where is coretemp module?

Therefore I used the information of both of the aforementioned locations and was able to succesfully install and run the i7 Intel CPU architecture support with lm-sensors in a quick and simple way on a Debian kernel returning an uname of:
Linux debian-server 2.6.26-2-amd64 #1 SMP Tue Jan 12 22:12:20 UTC 2010 x86_64 GNU/Linuxusing the following steps:

1. Download, Compile and install a patched source of the kernel coretemp.ko module– This is an absolute requirement except which you won’t never ever be able to make the sensors work on Debian Lenny.
By the default the coretemp.ko kernel module provided with Debian Lenny prepackaged in the 64 bit kernel image in linux-image-2.6.26-2-amd64 doesn’t have an included support for the i7 intel architecture.
So procceed with downloading:
debian-server:~# wget https://www.pc-freak.net/files/coretemp.zip

2. Install necessary packages which will be required for a succesful compile and install of the patched coretemp.ko kernel module

debian-server:~# apt-get install build-essential gcc linux-headers-`uname -r` module-assistant lm-sensors

If you already have the lm-sensors – 1:3.0.2-1+b2 utilities to read temperature/voltage/fan sensors already installed you can remove the lm-sensors string from the up-mentioned apt-get command line.

3. Configure and Install the new patched version of coretemp.ko which will support the I7 Intel CPU architecture on Debian

debian-server:~# cd coretemp/
debian-server:/root/coretemp# m-a update
debian-server:/root/coretemp# m-a prepare
debian-server:/root/coretemp# make
debian-server:/root/coretemp# make install

You should see an output similar to if the new coretemp.ko is properly installed:

mv /lib/modules/2.6.26-2-amd64/kernel/drivers/hwmon/coretemp.ko /lib/modules/2.6.26-2-amd64/kernel/drivers/hwmon/coretemp.ko.old
cp coretemp.ko /lib/modules/2.6.26-2-amd64/kernel/drivers/hwmon/
depmod -a

4. Load the intel i7 lm-sensors necessary kernel modules and configure the modules to be loaded on Linux System Boot

First we load the necessary modules into the kernel:

debian-server:~# modprobe coretemp
debian-server:~# modprobe w83627ehf force_id=0x8860

Next we schedule the modules to automatically load in debian boot time:

debian-server:~# echo "w83627ehf force_id=0x8860" >> /etc/modules
debian-server:~# echo "coretemp" >> /etc/modules

Now you could try out the sensors if they already report properly the CPU and system temperatures and statuses using:

debian-server:~# sensors
w83627ehf-isa-0ca0
Adapter: ISA adapter
VCore: +0.99 V (min = +0.00 V, max = +1.74 V)
in1: +6.34 V (min = +4.59 V, max = +7.66 V)
AVCC: +3.34 V (min = +3.12 V, max = +0.03 V) ALARM
3VCC: +3.34 V (min = +2.05 V, max = +2.78 V) ALARM
in4: +1.22 V (min = +0.08 V, max = +1.94 V)
in5: +0.97 V (min = +0.87 V, max = +0.35 V) ALARM
in6: +3.07 V (min = +2.71 V, max = +2.87 V) ALARM
VSB: +3.33 V (min = +2.53 V, max = +3.49 V)
VBAT: +3.28 V (min = +3.36 V, max = +2.51 V) ALARM
in9: +0.00 V (min = +0.70 V, max = +0.82 V) ALARM
Case Fan: 0 RPM (min = 1506 RPM, div = 128) ALARM
CPU Fan: 0 RPM (min = 703 RPM, div = 128) ALARM
Aux Fan: 0 RPM (min = 2636 RPM, div = 128) ALARM
fan4: 0 RPM (min = 3515 RPM, div = 128) ALARM
fan5: 0 RPM (min = 703 RPM, div = 128) ALARM
Sys Temp: +32.0°C (high = +72.0°C, hyst = -34.0°C) sensor = thermistor
CPU Temp: -31.5°C (high = +80.0°C, hyst = +75.0°C) sensor = thermis
AUX Temp: +29.0°C (high = +80.0°C, hyst = +75.0°C) sensor = thermis
cpu0_vid: +3.500 V

coretemp-isa-0000
Adapter: ISA adapter
Core 0: +55.0°C (high = +80.0°C, crit = +100.0°C)

coretemp-isa-0001
Adapter: ISA adapter
Core 1: +53.0°C (high = +80.0°C, crit = +100.0)

coretemp-isa-0002
Adapter: ISA adapter
Core 2: +53.0°C (high = +80.0°C, crit = +100)

coretemp-isa-0003
Adapter: ISA adapter
Core 3: +52.0°C (high = +80.0°C, crit = +100)

coretemp-isa-0004
Adapter: ISA adapter
Core 4: +55.0°C (high = +80.0°C, crit = +100.0)

coretemp-isa-0005
Adapter: ISA adapter
Core 5: +53.0°C (high = +80.0°C, crit = +100)

coretemp-isa-0006
Adapter: ISA adapter
Core 6: +53.0°C (high = +80.0°C, crit = +100)

coretemp-isa-0007
Adapter: ISA adapter
Core 7: +52.0°C (high = +80.0°C, crit = +100)

Yeah! It’s pretty handsome that lm-sensors reports the CPU system statuses for each of the Intel i7 cores 🙂
debian-server:~# unzip coretemp.zip
debian-server:~# cd coretemp/

Share this on:

Download PDFDownload PDF

Tags:

6 Responses to “Installing lm-sensors (hardware sensors) support on Intel(R) Core(TM) i7 CPU on Debian Lenny Linux to track your system hardware temperature”

  1. Rafael says:
    Epiphany 2.22 Epiphany 2.22 GNU/Linux x64 GNU/Linux x64
    Mozilla/5.0 (X11; U; Linux x86_64; en; rv:1.9.0.19) Gecko/20080528 Epiphany/2.22

    Hello,

    I had a problem when run:

    [root@cuda] ~/coretemp >> modprobe coretemp
    FATAL: Error inserting coretemp (/lib/modules/2.6.26-2-amd64/kernel/drivers/hwmon/coretemp.ko): No such device

    COuld you help, please?

    View CommentView Comment
    • admin says:
      Epiphany 2.30.6 Epiphany 2.30.6 Debian GNU/Linux x64 Debian GNU/Linux x64
      Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+ Debian/squeeze (2.30.6-1) Epiphany/2.30.6

      What kind of distribution are you on? And what kind of kernel do you run?

      Regards,
      Georgi

      View CommentView Comment
  2. stan says:
    IceWeasel 3.5.15 IceWeasel 3.5.15 GNU/Linux x64 GNU/Linux x64
    Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101028 Iceweasel/3.5.15 (like Firefox/3.5.15)

    Hello,

    I’ve same problem.
    I’m on Debian GNU/Linux squeeze/sid, kernel: 2.6.36.1

    May I ask for help ?
    Thank you in advance

    View CommentView Comment
    • admin says:
      Epiphany 2.30.6 Epiphany 2.30.6 Debian GNU/Linux x64 Debian GNU/Linux x64
      Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+ Debian/squeeze (2.30.6-1) Epiphany/2.30.6

      Didn’t the things described in the articles works for you? What exactly is your problem?
      Give me some more info, maybe I can help.

      looking forward to hearing from you,
      Georgi

      View CommentView Comment
  3. syats says:
    IceWeasel 3.5.16 IceWeasel 3.5.16 GNU/Linux x64 GNU/Linux x64
    Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110107 Iceweasel/3.5.16 (like Firefox/3.5.16)

    I have two Intel Xeon E5620 running Debian with the 2.6.32-5-amd64 kernel.

    I have the same problem as described above. After building coretemp and installing it, it still seems the module is not detecting my processors and refuses to load.

    Perhaps the version of coretemp you provided in this post is now out of date? do you know where can I get the latest from?

    Thank you.

    View CommentView Comment
    • admin says:
      Firefox 3.0.19 Firefox 3.0.19 Ubuntu 8.04 Ubuntu 8.04
      Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.19) Gecko/2010040119 Ubuntu/8.04 (hardy) Firefox/3.0.19

      hi hi,
      Sorry I don’t know about the latest version. It’s possible that you might need a newer version as you just noted.
      Make sure you execute compiled instead of a precompiled binary installed from a package this might be the problem.

      best

      View CommentView Comment

Leave a Reply

CommentLuv badge