Page 1 of 1

What is the maximum temperature of the CPU before it gets demaged ?

Posted: Sat Nov 09, 2019 9:01 am
by LinuxTux23
Hi folks,

I have a Raspberry Pi 4 with a fan, to avoid a overheating of the CPU.
The fan isnt so quietly. Thats why i wanna write a little python programm, that turn on the fan if the CPU gets to hot.

Now my question is, what is the maximum temperature wich the CPU can survive ?

Thank you,
LinuxTux23

PS: Sorry for my English I´m not a natíve speaker. :lol:

Re: What is the maximum temperature of the CPU before it gets demaged ?

Posted: Sat Nov 09, 2019 11:41 am
by timg236
The CPU frequency is automatically reduced in order to avoid damage due to overheating so you don't need a fan to prevent damage. In the very worst case you will just see a performance reduction when running CPU intensive tasks e.g. compiling the Linux Kernel.

First, make sure you have the latest software which reduces power consumption. Install the latest Buster image from the downloads page or if you have already installed Raspbian

Code: Select all

sudo apt update
sudo apt upgrade
# Then reboot 
If you only want to run the fan when the CPU is getting warm then 80 C might be a reasonable threshold but lots you'll have to experiment with different workloads and will depend on heatsink/case or not etc

The bcmstat utility is very useful for determining if/when you want active cooling
https://github.com/MilhouseVH/bcmstat

Re: What is the maximum temperature of the CPU before it gets demaged ?

Posted: Sat Nov 09, 2019 12:05 pm
by DougieLawson
The true answer would appear to be the melting point of lead free solder and best of luck to the OP trying to run their Raspberry at the temperature.

The in-built throttling means you can't practically run over 85°C without using mythical overclocking settings that would be outside the spec for the processor.

Re: What is the maximum temperature of the CPU before it gets demaged ?

Posted: Sat Nov 09, 2019 12:32 pm
by jbudd
You don't actually need to write a program for this, it is possible to control a fan automatically using a device tree overlay and a transistor-

For example, this line in /boot/config.txt will set GPIO 12 high when the CPU temperature reaches 65C and low again when it cools down by 10 degrees.

Code: Select all

dtoverlay=gpio-fan,gpiopin=12,temp=65000
See https://raspmer.blogspot.com/2019/02/co ... o-fan.html for more details

Re: What is the maximum temperature of the CPU before it gets demaged ?

Posted: Sat Nov 09, 2019 1:04 pm
by jahboater
DougieLawson wrote:
Sat Nov 09, 2019 12:05 pm
The in-built throttling means you can't practically run over 85°C without using mythical overclocking settings that would be outside the spec for the processor.
With the latest firmware, there seems to be no risk of even reaching 85C now.
My Pi4 has no fan, and the maximum temp is about 72C when running the cpuburn stress test for an hour.
Running huge compilations like building GCC brings it up to around 63C.
And that's overclocked!
Idles around 40C or less now.

Cooling problems and throttling are a thing of the past, unless you have a silly unventilated case.

Code: Select all

Time         ARM    Core    H264 Core Temp (Max)  IRQ/s      RX B/s      TX B/s
======== ======= ======= ======= =============== ====== =========== ===========
13:08:43 1600Mhz  500Mhz    0Mhz 39.92C (40.89C)  4,772       4,089      16,728
13:08:45 1600Mhz  500Mhz    0Mhz 39.43C (40.89C)     87         129         113
13:08:47 1600Mhz  500Mhz    0Mhz 39.43C (40.89C)     82          32         105
13:08:49  640Mhz  200Mhz    0Mhz 39.43C (40.89C)     99         158         104
13:08:51  640Mhz  200Mhz    0Mhz 39.43C (40.89C)     88         158         100
13:08:53  640Mhz  200Mhz    0Mhz 39.43C (40.89C)     88          32         100
13:08:55  640Mhz  200Mhz    0Mhz 39.43C (40.89C)     95         200         163
13:08:57  640Mhz  200Mhz    0Mhz 39.43C (40.89C)     86         128         100
13:09:00  640Mhz  200Mhz    0Mhz 39.43C (40.89C)     89          32         100
13:09:02  640Mhz  200Mhz    0Mhz 38.95C (40.89C)     98         196         142
13:09:04  640Mhz  200Mhz    0Mhz 38.95C (40.89C)     92         158         100
13:09:06  640Mhz  200Mhz    0Mhz 38.95C (40.89C)     92          74         139
13:09:08  640Mhz  200Mhz    0Mhz 38.95C (40.89C)     86         128         100
13:09:10  640Mhz  200Mhz    0Mhz 37.97C (40.89C)     85          96         100

Re: What is the maximum temperature of the CPU before it gets demaged ?

Posted: Sat Nov 09, 2019 1:14 pm
by jbudd
With the latest firmware, there seems to be no risk of even reaching 85C now.
Is "firmware" different from the kernel version as shown by uname -r?
If it is, does it get updated by apt update? How do we tell what version we have?

My Pi4 does seem to run cooler than it first did. I'd put it down to the weather.

Re: What is the maximum temperature of the CPU before it gets demaged ?

Posted: Sat Nov 09, 2019 1:18 pm
by DougieLawson
There's a new piece rpi-eeprom that updates the bootcode stored in EEPROM on your RPi4B. The RPF/RPTL folks have now forced a package on every Raspbian Buster user to run that automagically at boot time (which will be all good fun until they ship bootcode with a catastrophic bug and then the brown stuff will make quick company with the air movement device).

Re: What is the maximum temperature of the CPU before it gets demaged ?

Posted: Sat Nov 09, 2019 1:48 pm
by jamesh
Just for completeness, the CPU's are tested to over 120degC during MTBF testing. They are still undamaged at that temperature, but we do not allow to get anywhere near that hot in the real world.

Re: What is the maximum temperature of the CPU before it gets demaged ?

Posted: Sat Nov 09, 2019 2:08 pm
by jbudd
Hmm I knew about changes for network booting, didn't realise the bootcode also related to thermal issues.

So "firmware" version is revealed by sudo vl805 (000137ab)
It is updated by apt update and possibly at every boot. (I don't like that but I guess it's important to keep bootcode and kernel in sync)

I disabled my fan and ran sysbench --test=cpu --num-threads=4 --cpu-max-prime=80000 run The maximum temperature reached was 74C and the CPU was not throttled.

Did I miss an announcement somewhere to say the temperature issue is now resolved? Good job RPT engineers anyway!

Re: What is the maximum temperature of the CPU before it gets demaged ?

Posted: Sun Nov 10, 2019 8:07 am
by HermannSW
jahboater wrote:
Sat Nov 09, 2019 1:04 pm
My Pi4 has no fan, and the maximum temp is about 72C when running the cpuburn stress test for an hour.
Running huge compilations like building GCC brings it up to around 63C.
Can you try it not overclocked?
I did compile OpenCV in >40min, and did log all relevant data, CPU frequency was 1.5GHz the whole time.
Maximal temperature was 81°C, average was 76.7°C:
https://www.raspberrypi.org/forums/view ... 1#p1561520

SInce I don't have fans, your and my measurements should match somehow.
Perhaps your overclocking reduced heat (should not), or you did not push the CPUs like OpenCV compilation did ...

Re: What is the maximum temperature of the CPU before it gets demaged ?

Posted: Sun Nov 10, 2019 9:00 am
by sparkyhall
Board orientation makes a difference, vertical seems best for cooling and I recall jahboater saying his was vertically mounted.

Re: What is the maximum temperature of the CPU before it gets demaged ?

Posted: Sun Nov 10, 2019 2:16 pm
by HermannSW
sparkyhall wrote:
Sun Nov 10, 2019 9:00 am
Board orientation makes a difference, vertical seems best for cooling and I recall jahboater saying his was vertically mounted.
I need to try vertical next time, I thought air from above and below is good enough.
My Pi was 45°, only the edge of a small box did touch the bottom side.

You made a good point with vertical, I will hammer in Nx2 nails into book shelve 5.8cm apart.
That way I can just hang the PIs with GPIO up, power and HDMI connectors down, when running.
In addition to better cooling, they don't use space on working plate that way!
I did use that hanging concept before, but with wooden back which means no air from bottom (Wooden Board Pi):
https://www.raspberrypi.org/forums/view ... ?p=1550484

Re: What is the maximum temperature of the CPU before it gets demaged ?

Posted: Sun Nov 10, 2019 9:40 pm
by Paul Hutch
DougieLawson wrote:
Sat Nov 09, 2019 12:05 pm
The in-built throttling means you can't practically run over 85°C without using mythical overclocking settings that would be outside the spec for the processor.
Not quite true. I've made multiple Pi3B+'s hit 94°C when running flat out in a 65°C oven, with clock throttling enabled. So when running in an environment that hot I include code to stop non-essential tasks after it reaches 85°C and to shut itself down at 90°C to try not to shorten the Pi's life too much.

Re: What is the maximum temperature of the CPU before it gets demaged ?

Posted: Sun Nov 10, 2019 10:51 pm
by jahboater
HermannSW,
HermannSW wrote:
Sun Nov 10, 2019 8:07 am
Can you try it not overclocked?
Yes. It didn't seem to make any (easily) measurable difference.
But 100MHz is a small, safe, overclock for the Pi4.
HermannSW wrote:
Sun Nov 10, 2019 8:07 am
Since I don't have fans, your and my measurements should match somehow.
Perhaps your overclocking reduced heat (should not), or you did not push the CPUs like OpenCV compilation did ...
Try this:-

Code: Select all

wget https://raw.githubusercontent.com/ssvb/cpuburn-arm/master/cpuburn-a53.S
gcc -o cpuburn-a53 cpuburn-a53.S
./cpuburn-a53
It uses NEON on all four cores. I don't know of anything else that raises the temp so quickly.
In the early days of the Pi3 it would crash in less than 10 seconds!

My Pi4 is mounted vertically in free air. There is a small stick-on heat sink on the SoC with the fins aligned vertically.
The unused sockets have short cables plugged in (because the PCB ground plane and the sockets dissipate heat).
With this latest software, I suspect the little heat sink is not really needed.

Re: What is the maximum temperature of the CPU before it gets demaged ?

Posted: Wed Nov 13, 2019 10:01 pm
by HermannSW
jahboater wrote:
Sun Nov 10, 2019 10:51 pm
Try this:-

Code: Select all

wget https://raw.githubusercontent.com/ssvb/cpuburn-arm/master/cpuburn-a53.S
gcc -o cpuburn-a53 cpuburn-a53.S
./cpuburn-a53
It uses NEON on all four cores. I don't know of anything else that raises the temp so quickly.
In the early days of the Pi3 it would crash in less than 10 seconds!
I did -- thanks for that.

"top shows":

Code: Select all

top - 22:54:06 up 11 min,  3 users,  load average: 3.97, 2.51, 1.09
Tasks: 121 total,   5 running, 116 sleeping,   0 stopped,   0 zombie
%Cpu(s): 99.9 us,  0.1 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :   3727.6 total,   3460.4 free,     97.8 used,    169.4 buff/cache
MiB Swap:    100.0 total,    100.0 free,      0.0 used.   3503.7 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND    
  907 pi        20   0    1724     64      0 R 100.0   0.0   4:54.18 cpuburn-a+ 
  908 pi        20   0    1724     64      0 R 100.0   0.0   4:54.18 cpuburn-a+ 
  909 pi        20   0    1724     64      0 R 100.0   0.0   4:53.80 cpuburn-a+ 
  906 pi        20   0    1724    312    256 R 100.0   0.0   4:53.97 cpuburn-a+ 
   40 root      20   0       0      0      0 I   0.3   0.0   0:00.90 kworker/3+
...
And only 80°C without fan ...

Code: Select all

pi@raspberrypi4B:~ $ vcgencmd measure_temp
temp=80.0'C
pi@raspberrypi4B:~ $ 
... after I did what I said -- running the Pi4 (left) that way works like a charme:
Image


P.S:
Update, after 30 minutes of cpuburn still at 80°C!

Code: Select all

pi@raspberrypi4B:~ $ top -bn 1 -1 | head -15
top - 23:21:09 up 38 min,  3 users,  load average: 4.02, 4.01, 3.53
Tasks: 122 total,   5 running, 117 sleeping,   0 stopped,   0 zombie
%Cpu0  :100.0 us,  0.0 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu1  :100.0 us,  0.0 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu2  : 88.9 us, 11.1 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu3  :100.0 us,  0.0 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :   3727.6 total,   3418.3 free,     99.8 used,    209.5 buff/cache
MiB Swap:    100.0 total,    100.0 free,      0.0 used.   3492.4 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
  906 pi        20   0    1724    312    256 R  94.1   0.0  31:56.13 cpuburn-a+
  907 pi        20   0    1724     64      0 R  94.1   0.0  31:56.36 cpuburn-a+
  908 pi        20   0    1724     64      0 R  94.1   0.0  31:57.14 cpuburn-a+
  909 pi        20   0    1724     64      0 R  88.2   0.0  31:55.69 cpuburn-a+
 1125 pi        20   0   10188   2756   2444 R   5.9   0.1   0:00.01 top
pi@raspberrypi4B:~ $ 
temp=80.0'C
pi@raspberrypi4B:~ $