Phil Perry | www.pendre.co.uk

lm_sensors and coretemp on CentOS 5.3

March 11th, 2009

In a previous entry I talked about the importance of reading release notes. One of the things I wanted to test in the CentOS 5.3 QA was the rebase of lm_sensors to 2.10.7. This is of relevance for my coretemp kmod package as this requires lm_sensors >= 2.10.2 and CentOS 5.2 shipped with 2.10.0 thus requiring an update to work. So I was kind of hoping that with the rebase of lm_sensors to 2.10.7 in CentOS 5.3, kmod-coretemp would Just Work.

So lets look at what the upstream release notes have to say, and I quote:

"lm_sensors needs the kernel module coretemp.ko to sense temperatures of certain Intel processors including the Core 2 Duo processor family and Core 2 Solo processor family. Although drivers to support the temperature sensors of these processors are included in Red Hat Enterprise Linux 5, the supporting kernel module is not included. This means that while the "sensors-detect" command will report that the "Intel Core family thermal sensor" "detects correctly", the "sensors" command will report "No sensors found!" The drivers for the temperature sensors of these Intel processors are being removed until a future kernel update includes the coretemp.ko module (which will also require an update of lm_sensors). With these drivers removed, "sensors-detect" will no longer falsely appear to detect the temperature sensors of these processors."

OK, that doesn't sound too good. The release notes suggest the lm_sensors driver for coretemp has been removed from the upstream package.

However, it's actually not that bad. Examination of the upstream source reveals they haven't actually removed the driver from lm_sensors, only the ability for sensors-detect to detect the presence of the Intel Core thermal sensor. What does this mean? Well, it means that if you already have coretemp set up and working under 5.2 then updating lm_sensors in CentOS 5.3 will be fine and all will contine to work - nothing breaks. On the other hand, if you try to install and configure the coretemp sensor for the first time on CentOS 5.3, sensors-detect will fail to detect the Intel Core thermal sensor. To this end, I've patched lm_sensors to reinstate detection of the Intel Core thermal sensor. Updated packages can be downloaded here.

Now when we run sensors-detect we see the correct detection of the Intel Core family thermal sensor:

[root@Quad]# sensors-detect

Some south bridges, CPUs or memory controllers may also contain
embedded sensors. Do you want to scan for them? (YES/no): yes
Silicon Integrated Systems SIS5595...                     No
VIA VT82C686 Integrated Sensors...                        No
VIA VT8231 Integrated Sensors...                          No
AMD K8 thermal sensors...                                 No
AMD K10 thermal sensors...                                No
Intel Core family thermal sensor...                       Success!
    (driver `coretemp')
Intel AMB FB-DIMM thermal sensor...                       No

and now life is again good...

[phil@Quad ~]$ rpm -q lm_sensors
lm_sensors-2.10.7-4.1.el5.x86_64

[phil@Quad ~]$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0:  +25°C (high = +100°C)

coretemp-isa-0001
Adapter: ISA adapter
Core 1:  +24°C (high = +100°C)

coretemp-isa-0002
Adapter: ISA adapter
Core 2:  +21°C (high = +100°C)

coretemp-isa-0003
Adapter: ISA adapter
Core 3:  +21°C (high = +100°C)

I guess the next thing on the ToDo list is to set up a repo and get the packages signed given that there's little hope of getting these packages into an official (or 3rd party) repo given the dependency on a patched lm_sensors.