You are not logged in.

#1 2013-03-20 21:49:56

jtts
Member
Registered: 2011-05-11
Posts: 19

[SOLVED] k10temp: Calculating the real processor temperature

Hi,

I've tried both searching these forums and searching with Google, but I haven't been able to find an answer to this question: Since k10temp doesn't report real processor temperature, how can I calculate the real temperature from the values that k10temp provides?

I know that the readme-file from kernel states that the temperature value that k10temp-module provides is supposed to be relative to something and not the actual temperature, but what is it supposed to be relative to? And how can I use this information to calculate the actual temperature (in Celsius)?

Last edited by jtts (2013-03-22 23:15:08)

Offline

#2 2013-03-20 23:08:53

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

Re: [SOLVED] k10temp: Calculating the real processor temperature

Kind of depends on the chip and the system - the way I calibrated mine was I assumed that the system reporting in my BIOS was correct, I then checked the k10 temp while my computer was idling and quickly rebooted into my BIOS and looked at the temp there. I assumed it would drop about 2 degrees in BIOS as the CPU cooled down a bit, and then I knew how many degrees off my k10 report was and then wrote a correction factor in my conky config.

Not very scientific but close enough for me.


Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

#3 2013-03-22 23:04:14

jtts
Member
Registered: 2011-05-11
Posts: 19

Re: [SOLVED] k10temp: Calculating the real processor temperature

I decided to go a bit further:

Let's assume the temperature reported by BIOS is accurate.

First I let my computer idle for couple of hours. Then I run sensors, quickly rebooted and check the CPU temperature from BIOS.

sensors_min = 26.9
bios_min = 47

Then I run mprime torture test to heat up my machine. After a couple of hours, I run sensors, quickly rebooted and checked CPU temperature from BIOS.

sensors_max = 52.5
bios_max = 54 + 3 = 57 (I added a couple of degrees due to CPU cooling down a bit)

With these figures I made the following equation:

real_temp = bios_min + ((sensors_temp - sensors_min) * (bios_max - bios_min)) / (sensors_max - sensors_min)

With the values I got from the above mentioned test, the equation is reduced to following:

real_temp = (sensors_temp / 2.56) + 36.4921875

I put the equation to configuration file /etc/sensors.d/k10temp.conf:

chip "k10temp-*"

   label temp1 "CPU Temp"

   compute  temp1  (@/2.56)+36.4921875, (@-36.4921875)*2.56

It's not exactly accurate, but close enough for me.

Offline

#4 2013-03-23 00:30:33

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,257

Re: [SOLVED] k10temp: Calculating the real processor temperature

If I understand correctly, the K10temp is an internal sensor built into the AMD die; as such it should be pretty good representative of the junction temperature.  When the junction temperature increases, heat flows out of the processor package to the heatsink, where it is ultimately carried away by either passive or active convection.  The die has a low thermal mass, and there can be significant thermal resistance between the die, through the case, into the heat sink.  A heat sink can have a significant thermal mass.

What the heck does all of this mean?  You might be astonished how fast the K10temp changes when the processor is working hard given even a small thermal resistance from the die to the heatsink.  I would easily believe that a processor going from idle to 100% could see temperature changes of 10 to 20 degrees C per second in the K10temp.  Heat sink temperatures, given these conditions might be one or two degrees per second until the fans spin up.

Since k10temp doesn't report real processor temperature, how can I calculate the real temperature from the values that k10temp provides?

What do you mean by 'Real Temperature' ??
The case temperature of the processor?  You need to know the thermal resistance of the package, the thermal resistance to the heatsink, and the thermal mass of the heatsink.
The exhaust air temperature or the heat sink temperature?  To many variables to enumerate.

In my mind, the real temperature is the junction temperature.  Everything else predicts whether T sub J can be maintained in the ambient conditions.
From what I read, people are trying to calculate the case temperature from the junction temperature given a constant processor  load.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2013-03-23 14:12:51

jtts
Member
Registered: 2011-05-11
Posts: 19

Re: [SOLVED] k10temp: Calculating the real processor temperature

ewaller wrote:

Since k10temp doesn't report real processor temperature, how can I calculate the real temperature from the values that k10temp provides?

What do you mean by 'Real Temperature' ??

1)  According to AMD's website, my processors maximum operating temperature is 73 degrees C.

2)  lm-sensors  website's wiki states the following about the coretemp driver (I read somewhere that the same should apply for k10temp):

coretemp returns unrealistic values

The temperature value returned by the coretemp driver isn't absolute. It's a thermal margin from the critical limit, and the greater the margin, the worse the accuracy. It isn't really returning degrees Celsius. At high temperatures, the (small) thermal margin is almost expressed in degrees Celsius, but at low temperature, the (high) thermal margin is no longer expressed in actual degrees Celsius.

So, if the temperature value reported by coretemp is unrealistically low, all it means is that you are far away from the critical limit so your systems are running totally fine and cool and you don't have to worry at all. Unfortunately, there is no way to improve the readings, this is a hardware limitation.

Additionally, the critical limit value may be wrong on come CPU models. We may be able to address this problem over time, but again it's not really a problem in the first place. All that really matters is how far the measurement is from that limit. If the difference is above 40 pseudo degrees Celsius (again these are not real degrees Celsius!) then you're safe.

3)  k10temp module documentation states the following:

There is one temperature measurement value, available as temp1_input in
sysfs. It is measured in degrees Celsius with a resolution of 1/8th degree.
Please note that it is defined as a relative value; to quote the AMD manual:

  Tctl is the processor temperature control value, used by the platform to
  control cooling systems. Tctl is a non-physical temperature on an
  arbitrary scale measured in degrees. It does _not_ represent an actual
  physical temperature like die or case temperature. Instead, it specifies
  the processor temperature relative to the point at which the system must
  supply the maximum cooling for the processor's specified maximum case
  temperature and maximum thermal power dissipation.

The maximum value for Tctl is available in the file temp1_max.

If the BIOS has enabled hardware temperature control, the threshold at
which the processor will throttle itself to avoid damage is available in
temp1_crit and temp1_crit_hyst.

Now, if I've understood all the above correctly (I might not have, I found it quite confusing), module k10temp reports the following values:

temp1_crit: 68000
When temp1_input reaches this value, more cooling is applied.

temp1_crit_hyst: 66000
When temp1_input cools down to this value, less cooling is applied.

temp1_input: 52000 (for example)
Current processor temperature in pseudo degrees.

temp1_max: 70000
Maximum allowed processor temperature in pseudo degrees.

The above mentioned "thermal margin" is calculated like this:
"thermal margin" = temp1_max - temp1_input
(70000 - 52000 =18000 in my example)

When thermal margin is small (i.e. temp1_input is close to temp1_max), the "margin" is expressed in approximately C degrees.
When thermal margin is big (i.e. temp1_input is a lot lower than temp1_max), the "margin" is no longer expressed in C degrees (the actual C degrees value is smaller).

Am I right or have I completely misunderstood the above quotes?

And also: since my processors maximum operating temperature is so close to 70 C degrees, is it safe to assume that the temp1_max is approximately  70 C degrees?

Anyway, I guess what I'm looking for in the "Real Temperature" is how to approximate the pseudo degrees to real C degrees, if that's even possibly in any feasibly way. In the right ballpark would suffice.

Offline

#6 2013-03-23 14:25:46

jtts
Member
Registered: 2011-05-11
Posts: 19

Re: [SOLVED] k10temp: Calculating the real processor temperature

jtts wrote:

3)  k10temp module documentation states the following:

...Please note that it is defined as a relative value; to quote the AMD manual:

  Tctl is the processor temperature control value, used by the platform to
  control cooling systems. Tctl is a non-physical temperature on an
  arbitrary scale measured in degrees. It does _not_ represent an actual
  physical temperature like die or case temperature. Instead, it specifies
  the processor temperature relative to the point at which the system must
  supply the maximum cooling for the processor's specified maximum case
  temperature and maximum thermal power dissipation.

The maximum value for Tctl is available in the file temp1_max.

If the BIOS has enabled hardware temperature control, the threshold at
which the processor will throttle itself to avoid damage is available in
temp1_crit and temp1_crit_hyst.

Now, if I've understood all the above correctly (I might not have, I found it quite confusing), module k10temp reports the following values:

temp1_crit: 68000
When temp1_input reaches this value, more cooling is applied.

temp1_crit_hyst: 66000
When temp1_input cools down to this value, less cooling is applied.

OK. I see now that I might have been wrong about the above mentioned values. At those values the processor starts and stops to throttle itself. More cooling is applied even before temp1_input reaches above mentioned values. At least that is my own observation. I haven't been able to reach any value above 52500 with temp1_input even with full processor usage.

Offline

Board footer

Powered by FluxBB