4

I want to read the temperature out from an Advanced Micro Devices [AMD] nee ATI RS880 [Radeon HD 4290] card if possible. It is integrated on an ASUS M4A89GTDPRO/USB3 motherboard.

sensors-detect reports the following:

Do you want to probe the I2C/SMBus adapters now? (YES/no):
Using driver `i2c-piix4' for device 0000:00:14.0: ATI Technologies Inc SB600/SB700/SB800 SMBus
Module i2c-dev loaded successfully.

Next adapter: Radeon i2c bit bus 0x90 (i2c-0)
Do you want to scan it? (yes/NO/selectively): yes

Next adapter: Radeon i2c bit bus 0x91 (i2c-1)
Do you want to scan it? (yes/NO/selectively): yes

Next adapter: Radeon i2c bit bus 0x92 (i2c-2)
Do you want to scan it? (yes/NO/selectively): yes

Next adapter: Radeon i2c bit bus 0x93 (i2c-3)
Do you want to scan it? (yes/NO/selectively): yes

Next adapter: Radeon i2c bit bus 0x14 (i2c-4)
Do you want to scan it? (yes/NO/selectively): yes

There is nothing related in the output of the sensors command.

The x.org website provide with this info:

Thermal sensors are implemented via external i2c chips or via the internal thermal sensor (rv6xx-evergreen only; supported in 2.6.36 or newer); not all OEMs implement a thermal sensor. To get the temperature on asics that use i2c chips, you need to load the appropriate hwmon driver for the sensor used on your board (lm63, lm64, etc.). The drm will attempt to load the appropriate hwmon driver. On boards that use the internal thermal sensor, the drm will set up the hwmon interface automatically. When the appropriate driver is loaded, the temperatures can be accessed via lm_sensors tools or via sysfs in /sys/class/hwmon.

The hw.i2c module parameter is 0 by default. From the module's description (modinfo radeon) it is not clear to me what it does exactly. Does enabling it help to get the temperatures?

1 Answer 1

4

I am able to read the temperature from my AMD Radeon HD 8670 / R7 250 card (OLAND chipset family) using Ubuntu 14.04 with kernel 3.14.

$ sensors
[…]    
radeon-pci-0100
Adapter: PCI adapter
temp1:        +50.0°C  (crit = +120.0°C, hyst = +90.0°C)
[…]

However, sensors-detect does not detect the temperature sensor of the Radeon card. sensors "sees" the sensor still because it is accessible through the kernel's hwmon interface, i.e. the radeondriver actively "exposes" the sensor to the system.

In the directory /sys/class/hwmon you will find a list of all hwmon interfaces:

$ ls -l /sys/class/hwmon/
total 0
drwxr-xr-x  2 root root 0 Jun 28 15:02 ./
drwxr-xr-x 56 root root 0 Jun 28 15:02 ../
lrwxrwxrwx  1 root root 0 Jun 28 15:02 hwmon0 -> ../../devices/virtual/hwmon/hwmon0/
lrwxrwxrwx  1 root root 0 Jun 28 15:02 hwmon1 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon1/
lrwxrwxrwx  1 root root 0 Jun 28 15:02 hwmon2 -> ../../devices/platform/coretemp.0/hwmon/hwmon2/
lrwxrwxrwx  1 root root 0 Jun 28 15:02 hwmon3 -> ../../devices/platform/nct6775.2560/hwmon/hwmon3/

Interim conclusion: For reading the temperature of your Radeon card, it should not matter if I²C works or not.

According to http://xorg.freedesktop.org/wiki/RadeonFeature/ the temperature sensor is supported on HD4290 cards as it is on my card (HD8670). However, the documentation says "i2c chip or internal sensor" (footnote 28).

On the same site you can find the following quote:

Thermal sensors are implemented via external i2c chips or via the internal thermal sensor (rv6xx-evergreen only; supported in 2.6.36 or newer); not all OEMs implement a thermal sensor. To get the temperature on asics that use i2c chips, you need to load the appropriate hwmon driver for the sensor used on your board (lm63, lm64, etc.). The drm will attempt to load the appropriate hwmon driver. On boards that use the internal thermal sensor, the drm will set up the hwmon interface automatically. When the appropriate driver is loaded, the temperatures can be accessed via lm_sensors tools or via sysfs in /sys/class/hwmon.

Bottom line: It could be that the temperature sensor on your board is attached via I²C. In this case, sensors-detect should be able to find it. Nevertheless, it is also possible that your graphics card does not have a temperature sensor.

Postscript

To me it looks like the semantic of the hw_i2c parameter is 0=disable and 1=enable:

$ modinfo -p radeon
[…]
hw_i2c:hw i2c engine enable (0 = disable) (int)
[…]

On my system, cat /sys/module/radeon/parameters/hw_i2c gives 0, still I have 8 I²C buses that all originate from the Radeon driver:

$ ls -l /sys/bus/i2c/devices/
total 0
drwxr-xr-x 2 root root 0 Jun 28 14:31 ./
drwxr-xr-x 4 root root 0 Jun 28 14:31 ../
lrwxrwxrwx 1 root root 0 Jun 28 14:31 i2c-0 -> ../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/i2c-0/
lrwxrwxrwx 1 root root 0 Jun 28 14:31 i2c-1 -> ../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/i2c-1/
lrwxrwxrwx 1 root root 0 Jun 28 14:31 i2c-2 -> ../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/i2c-2/
[…]
lrwxrwxrwx 1 root root 0 Jun 28 14:31 i2c-7 -> ../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/i2c-7/

$ grep . /sys/bus/i2c/devices/i2c-*/name
/sys/bus/i2c/devices/i2c-0/name:Radeon i2c bit bus 0x90
/sys/bus/i2c/devices/i2c-1/name:Radeon i2c bit bus 0x91
/sys/bus/i2c/devices/i2c-2/name:Radeon i2c bit bus 0x92
/sys/bus/i2c/devices/i2c-3/name:Radeon i2c bit bus 0x93
/sys/bus/i2c/devices/i2c-4/name:Radeon i2c bit bus 0x94
/sys/bus/i2c/devices/i2c-5/name:Radeon i2c bit bus 0x95
/sys/bus/i2c/devices/i2c-6/name:Radeon i2c bit bus 0x96
/sys/bus/i2c/devices/i2c-7/name:Radeon i2c bit bus 0x97

I am able to "talk" to my HDMI-connected display through I²C using the ddccontrol tool e.g. to adjust the backlight brightness. So, I²C definitely works.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .