Thermal Sensors

From ThinkWiki
Revision as of 03:25, 6 March 2009 by Hmh (Talk | contribs) (Accessing the sensors: remove outdated stuff that is too old to be useful, and add new information)
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 thinkpad-acpi module, up to 16 sensors are supported. When the module is loaded, the sensors (some of which may be inactive) are shown through the standard sysfs hwmon interface used by the lm-sensors utilities, and also in /proc/acpi/ibm/thermal (which is deprecated, and will be removed someday).

lm-sensors/libsensors uses the hwmon interface exposed through /sys/bus/platform/devices/thinkpad_hwmon/ to read the temperatures, note that the sysfs interface returns normal open errors instead of weird values for sensors that are not active (which the simplistic sensors command ignore). lm-sensors/libsensors can be configured to give proper names to each sensor, which will be used by any properly written sensor applet.

# sensors
thinkpad-isa-0000
Adapter: ISA adapter
fan1:                3914 RPM
CPU:                  +45.0°C
LAN/Heatsink/HDAPS:   +44.0°C
PC-CARD slot:         +35.0°C
GPU:                  +48.0°C
Main battery charger: +35.0°C
ERROR: Can't get value of subfeature temp6_input: Can't read
Bay battery charger:   +0.0°C
Main battery cells:   +30.0°C
ERROR: Can't get value of subfeature temp8_input: Can't read
Bay battery cells:     +0.0°C
MCH:                  +42.0°C
PLL clock/ICH/WLAN:   +50.0°C
Voltage regulator:    +43.0°C

The old method to access the thermal readings is through the /proc interface:

# 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.

If the ThinkPad supports the extended sensor set, eight more values will be displayed:

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

HDAPS temperature sensor

The Active Protection System firmware also reports a temperature, which is identical to one of the ACPI sensors. The corresponding sensor is actually not inside the HDAPS chip, and sometimes not even close to it.

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

Harddisks SMART temperature sensor

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.

Reading this sensor will typically cause a drive spin-up and head unload.

Hitachi harddisks SENSE CONDITION temperature sensor

Recent Hitachi disks provide a non-standard SENSE CONDITION command which reads the disk temperature without causing a spin-up or head load. The reported value is the same as when using SMART. This can be invoked, e.g., using # hdparm -H, or the relevant code in tp-fancontrol (download). When using the libata driver, this requires kernel >= 2.6.19-rc1.

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).
  • Kima is a KDE applet that can display the 8 first ACPI sensors as well as the HDAPS sensor.
  • IBMDoK, another KDE applet. Shows 4 specific sensors (out of up to 11). So far only tested at the T60.
  • There is an ibm_acpi plugin for Munin.
  • GNOME Sensors Applet supports ibm_acpi.

Sensor locations

This information is model specific.

ThinkPad A31

Found by Milos Popovic using cooling spray to cool down components on a completely removed, running motherboard, to locate the sensors. Also reported here.

EC offset   Index in "thermal"   Location (estimated)
0x78        1                    CPU
0x79        2                    Battery        (this one heats up when on battery power)
0x7A        3                    Power          (sensor near power diodes and CPU; heats up when high power consumption, has crosstalk from CPU)
0x7B        4                    Ultrabay 2000 battery?
0x7C        5                    Northbridge    (sensor next to Northbridge, also somewhat near GPU)
0x7D        6                    PCMCIA/ambient (sensor is a National Semiconductor LM75 Digital Temperature Sensor/Thermal Watchdog chip
                                                 next to the 9-pin VGA connector; sits right under PCMCIA slots but doesn't touch)
0x7E        7                    Battery        (this one stays near ambient temperature, even when on battery power)
0x7F        8                    Ultrabay 2000 battery?
0xC0        none                 zero
0xC1        none                 zero
0xC2        none                 zero

The following photos (resolution reduced for server space) show the locations found for the listed temperature sensors.


Photos (click to see full size)
ThinkPad A31 sensor locations on top of motherboard.
ThinkPad A31 sensor locations on bottom of motherboard.

On this A31 systemboard (FRU 26P8398), there is a Maxim MAX1668 5-channel remote/local temperature sensor (4 remote + 1 self temperature) on top of the systemboard, and a National Semiconductor LM75 single-channel "digital temperature sensor and thermal watchdog" chip. It would appear that the LM75 has the ability to hard shutdown the processor (without software intervention) if its temperature exceeds a given threshold. I'm not sure if it is wired for this, nor whether the Thinkpad changes the threshold temperature from the chip's power-up default of 80°C. A software application with drivers on the LM75 webpage is available that claims to allow direct access to the thermal sensor chip (this hasn't been tried, but could be useful in other models to determine if this sensor is somewhere on the MB, and which register it corresponds to). The MAX1668's self-temperature reading does not appear anywhere in the above temperature registers; it's not clear whether it is read at all, and whether it is to be found elsewhere in the EC memory. These two chips (LM75 and MAX1668) account for some of the sensors.

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; Ethernet chip
0xC1        none                 Southbridge, WLAN and clock generator (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.

ThinkPad T61

Found By Daniel Castro. There are two sensors for the battery but I'm not sure of the difference or exact location of them. There are still 3 sensors that I couldn't figure out. If anyone can help please update it.

Index in "thermal"   Location
1                    CPU
2                    MiniPCI
3                    HDD
4                    n/a (-128)
5                    Battery 1
6                    n/a (-128)
7                    Battery 2
8                    n/a (-128)
9                    ?
10                   ?
11                   ?
12                   n/a (-128)
13                   n/a (-128)
14                   n/a (-128)
15                   n/a (-128)
16                   n/a (-128)

The reading for Battery 1 is always 50C, even right after turning the computer on, and it never seems to change, so I monitor the other one.

--Lunatico 23:44, 10 August 2008 (CEST)

ThinkPad X31

I figured these out by myself (BDKMPSS), as there are just a few available, this wasn't a huge problem. I verified my presumptions with a contactless thermometer.

EC offset   Index in "thermal"   Location (estimated)
0x78        1                    CPU
0x79        2                    n/a
0x7A        3                    GPU?
0x7B        4                    near or the ICH4M Southbrige, on the back of the Motherboard
0x7C        5                    Battery
0x7D        6                    Extended-Life-Battery; may also UltraBay battery
0x7E        7                    Battery
0x7F        8                    Extended-Life-Battery; may also UltraBay battery
0xC0        none                 n/a
0xC1        none                 n/a
0xC2        none                 n/a

0x7A "GPU?" is pretty hot and seems like the GPU, but as the Chipset and the GPU are cooled with the same heatsink it is difficult to separate them without roasting the machine. However the left and GPU side of the heatsink is much closer to the shown value than the right Chipset side.