Thermal Sensors

From ThinkWiki
Revision as of 16:53, 23 July 2006 by Thinker (Talk | contribs) (fixed wikilink)
Jump to: navigation, search

This page summarizes known information about the locations and properties of thermal sensors on ThinkPad laptops.

Accessing the sensors

Basic ACPI system temperature sensors

The primary means of accessing the thermal sensors is through the ibm-acpi module. When the module is loaded, the first 8 sensors (some of which may be inactive) are shown in /proc/acpi/ibm/thermal:

# cat /proc/acpi/ibm/thermal
temperatures: 44 41 33 42 33 -128 30 -128

A value of -128 (i.e., 0x80 hex) means the sensor is not connected. For example, above the two -128 values belong to the UltraBay battery, which is not plugged in.

Extra ACPI system temperature sensors

On recent ThinkPad models, three extra sensors are accessible through ACPI at Embedded Controller offsets 0xC0 to 0xC2. There are two ways to access them:

Accessing the extra ACPI sensors through ecdump

Load ibm-acpi with the experimental=1 option, and parse /proc/acpi/ibm/ecdump:

# perl -ne 'm/^EC 0xc0: .(..) .(..) .(..) / or next; print hex($1)." ".hex($2)." ".hex($3)."\n"' < /proc/acpi/ibm/ecdump
40 48 43

Future models might provide additional extra sensors beyond those three. To see all candidates:

# perl -ne 'print join(" ",map(hex,m/\w+/g))."\n" if s/^EC 0xc0://' < /proc/acpi/ibm/ecdump
40 48 43 128 128 128 128 128 0 0 0 0 0 0 0 0

Patch for accessing the extra ACPI sensors through thermal

To make the extra 3 sensors show up on /proc/acpi/ibm/thermal just like the 8 basic sensors, apply this kernel patch to ibm-acpi.

Then:

# cat /proc/acpi/ibm/thermal
temperatures: 44 41 33 42 33 -128 30 -128 40 48 43

If you apply this patch in conjunction with tp-fancontrol, you'll need tp-fancontrol 0.2.9 or newer.

HDAPS temperature sensor

The Active Protection System accelerometer also reports a temperature, which is identical to one of the ACPI sensors. The corresponding sensor is actually not inside the HDAPS chip, but fairly close.

# cat /sys/bus/platform/drivers/hdaps/hdaps/temp1
41

Harddisks SMART temperature sensor

Finally, the system hard disk temperature can be read through the disk's SMART interface:

# smartctl -A /dev/hda | grep Temperature
194 Temperature_Celsius 0x0022 145 097 000 Old_age Always - 31

Or, for SATA-equipped models running a recent Linux kernel (see Problems with SATA and Linux):

# smartctl -A -d ata /dev/sda | grep Temperature
194 Temperature_Celsius 0x0022 145 097 000 Old_age Always - 31

When the UltraBay Slim HDD Adapter or UltraBay Slim SATA HDD Adapter are used, the second hard disk will typically provide another temperature readout via its SMART interface, analogously to the above.

Utilities for viewing temperatures

The following utilities display the ThinkPad-specific thermal sensor readouts:

  • The above shell commands.
  • The "Sensors" builtin of GKrellM can show 6 specific ACPI sensors (out of up to 11).
  • CPU Info is a KDE applet that can display the 8 first ACPI sensors as well as the HDAPS sensor. Limited to showing one sensor at a time.
  • IBMDoK, another KDE applet. Shows 4 specific sensors (out of up to 11). So far only tested at the T60.

Sensor locations

This information is model specific.

ThinkPad R51

The ibm-acpi documentation includes the report by Thomas Gruber:

EC offset   Index in "thermal"   Location (estimated)
0x78        1                    CPU
0x79        2                    Mini-PCI
0x7A        3                    HDD
0x7B        4                    GPU
0x7C        5                    System battery
0x7D        6                    UltraBay battery
0x7E        7                    System battery
0x7F        8                    UltraBay battery
0xC0        none                 ?
0xC1        none                 ?
0xC2        none                 ?

ThinkPad T40

The location of one of the sensors is identified here.

EC offset   Index in "thermal"   Location (estimated)
0x78        1                    CPU
0x79        2                    System board under rear left corner of Mini-PCI module
0x7A        3                    ?
0x7B        4                    GPU
0x7C        5                    Battery
0x7D        6                    n/a
0x7E        7                    Battery
0x7F        8                    n/a
0xC0        none                 n/a
0xC1        none                 n/a
0xC2        none                 n/a

ThinkPad T43, T43p

Found by Shmidoax using cooling spray to cool down components and observe the effect on the sensors.

EC offset   Index in "thermal"   Location (estimated)
0x78        1                    CPU
0x79        2                    Between PCMCIA slot and CPU (same as HDAPS module)
0x7A        3                    PCMCIA slot
0x7B        4                    GPU
0x7C        5                    System battery (front left = charging circuit)
0x7D        6                    UltraBay battery?
0x7E        7                    System battery (rear right)
0x7F        8                    UltraBay battery?
0xC0        none                 Bus between Northbridge and DRAM
0xC1        none                 Southbridge (under Mini-PCI card, under touchpad)
0xC2        none                 Power circuitry, on underside of system board under F2 key

Photos (click to see full size)
ThinkPad T43 sensor locations
ThinkPad T43 sensor locations detail
ThinkPad T43/p 26xx Embedded Controller Renesas H8S/2161BV

ThinkPad T60

Found by Marco Kraus for use in IBMDok.

EC offset   Index in "thermal"   Location (estimated)
0x78        1                    CPU 0
0x79        2                    HDD
0x7A        3                    HDD
0x7B        4                    GPU
0x7C        5                    Battery
0x7D        6                    n/a
0x7E        7                    Battery
0x7F        8                    n/a
0xC0        none                 ?
0xC1        none                 ?
0xC2        none                 ?

The CPU thermal sensors seem to be exposed in both /proc/acpi/thermal_zone/THM0/temperature and /proc/acpi/thermal_zone/THM1/temperature, though the latter curiously seems to exist only in this file and nowhere in /proc/acpi/ibm/ecdump.