Intel Core Duo/Solo Temperature Monitoring Working On Intel DG965Motherboard

From: Justin Piszcz
Date: Sat Mar 10 2007 - 07:16:38 EST


DISCLAIMER: This patch is still experimental. AUTHOR: Rudolf Marek has written the coretemp module for Intel Core Duo/Solo
processors.

Without this patch, you cannot monitor your CPU temperature, at least not on a DG965 motherboard.

From the readme (second patch):

+Kernel driver coretemp
+======================
+
+Supported chips:
+ * All Intel Core family
+ Prefix: 'coretemp'
+ Addresses scanned: CPUID (family 0x6, models 0xe, 0xf)
+ Datasheet: Intel 64 and IA-32 Architectures Software Developer's Manual
+ Volume 3A: System Programming Guide
+
+Author: Rudolf Marek
+Contact: Rudolf Marek <edited_out>

+Description
+-----------
+
+This driver permits reading temperature sensor embedded inside Intel Core CPU.
+Temperature is measured in degrees Celsius and measurement resolution is
+1 degree C. Valid temperatures are from 0 to TjMax degrees C, because
+the actual temperature is in fact a delta from TjMax.
+
+Temperature known as TjMax is the maximum junction temperature of processor.
+Intel defines this temperature as 85C or 100C. At this temperature, protection
+mechanism will perform actions to forcibly cool down the processor. Alarm
+may be raised, if the temperature grows enough (more than TjMax) to trigger
+the Out-Of-Spec bit. Following table summarizes the exported sysfs files:
+
+temp1_input - Core temperature (in milidegrees of Celsius).
+temp1_crit - Maximum junction temperature (in milidegrees of Celsius).
+temp1_crit_alarm - Set when Out-of-spec bit is set, never clears.
+ Correct CPU operation is no longer guaranteed.
+temp1_label - Contains string with the "Core X", where X is processor
+ number.
+
+The TjMax temperature is set to 85C if undocumented model specific register
+(UMSR) 0xee has bit 30 set. If not the TjMax is 100C as documented in processor
+datasheet. Intel will not disclose this information to individuals.

How to get it working:
----------------------------------------------------------------------------
Per: http://www.lm-sensors.org/wiki/Devices

Scroll down to:
Intel Core/Core2 yes coretemp Integrated
sensor in CPU, patch is here.

Here is the post:
http://lists.lm-sensors.org/pipermail/lm-sensors/2007-January/018676.html

Patch1: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20070114/e666982f/attachment-0002.bin

Patch2: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20070114/e666982f/attachment-0003.bin

Applies clean under 2.6.20.2:
p34:/usr/src/linux-2.6.20.2# patch -p1 < /home/user/attachment-0002.bin
patching file drivers/hwmon/coretemp.c
patching file drivers/hwmon/Kconfig
patching file drivers/hwmon/Makefile
p34:/usr/src/linux-2.6.20.2# patch -p1 < /home/user/attachment-0003.bin
patching file Documentation/hwmon/coretemp
p34:/usr/src/linux-2.6.20.2#

In the Kernel I selected the following two options under:
-> Hardware Monitoring support
<M> Hardware Monitoring support
<M> Intel Core (2) Duo/Solo temperature sensor

Then recompile/reboot/etc.

You will need:
http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-2.10.2.tar.gz

1. You will need to remove or overwrite your old libsensors3 if you have it
installed.
2. You need to make sure you have libsysfs-dev and flex installed to compile
the latest lm_sensors.

Once everything is compiled, load the modules and run sensors:

p34:~# modprobe coretemp
p34:~# lsmod
Module Size Used by
coretemp 5120 0
hwmon 2372 1 coretemp
p34:~#

root@p34:~/lm_sensors-2.10.2/prog/sensors# ./sensors coretemp-isa-0000
Adapter: ISA adapter
temp1: +40°C (high = +85°C) (Core 1/2)

coretemp-isa-0001
Adapter: ISA adapter
temp1: +39°C (high = +85°C) (Core 2/2)

Run 10 bzip2s to test to make sure its working correctly.

root@p34:~/lm_sensors-2.10.2/lib$ ps auxww | grep -v grep | grep -c bzip2
10
root@p34:~/lm_sensors-2.10.2/lib$

Watch temps:

root@p34:~/lm_sensors-2.10.2/prog/sensors# ./sensors Adapter: ISA adapter
temp1: +54°C (high = +85°C)
temp1: +53°C (high = +85°C)

( .. a few minutes later .. )

temp1: +57°C (high = +85°C) temp1: +55°C (high = +85°C)

( .. a few minutes later .. )

temp1: +58°C (high = +85°C) temp1: +57°C (high = +85°C)

( .. a few minutes later .. )

temp1: +60°C (high = +85°C) temp1: +58°C (high = +85°C)

( .. a few minutes later .. )

temp1: +62°C (high = +85°C) temp1: +60°C (high = +85°C)

root@p34:~/lm_sensors-2.10.2/lib$ killall -9 bzip2

temp1: +52°C (high = +85°C) temp1: +51°C (high = +85°C)

( .. a few minutes later .. )

temp1: +48°C (high = +85°C) temp1: +48°C (high = +85°C)

Setup:

p34:~# sensors coretemp-isa-0000
Adapter: ISA adapter
temp1: +41°C (high = +85°C)

coretemp-isa-0001
Adapter: ISA adapter
temp1: +39°C (high = +85°C)

p34:~#

Commentary:
It will probably be a few weeks until this is incorporated into Linus' tree, hopefully it can make it into 2.6.22, then userland support should follow over time.

p34:~# mbmon
No Hardware Monitor found!!
InitMBInfo: Success
p34:~#

Justin.