LinuxTux23
Posts: 1
Joined: Sat Nov 09, 2019 8:51 am

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

Sat Nov 09, 2019 9:01 am

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:

timg236
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 253
Joined: Thu Jun 21, 2018 4:30 pm

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

Sat Nov 09, 2019 11:41 am

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

User avatar
DougieLawson
Posts: 36578
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

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

Sat Nov 09, 2019 12:05 pm

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.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

jbudd
Posts: 1027
Joined: Mon Dec 16, 2013 10:23 am

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

Sat Nov 09, 2019 12:32 pm

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

jahboater
Posts: 4846
Joined: Wed Feb 04, 2015 6:38 pm

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

Sat Nov 09, 2019 1:04 pm

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

jbudd
Posts: 1027
Joined: Mon Dec 16, 2013 10:23 am

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

Sat Nov 09, 2019 1:14 pm

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.

User avatar
DougieLawson
Posts: 36578
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

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

Sat Nov 09, 2019 1:18 pm

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).
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24194
Joined: Sat Jul 30, 2011 7:41 pm

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

Sat Nov 09, 2019 1:48 pm

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.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

jbudd
Posts: 1027
Joined: Mon Dec 16, 2013 10:23 am

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

Sat Nov 09, 2019 2:08 pm

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!

User avatar
HermannSW
Posts: 1667
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

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

Sun Nov 10, 2019 8:07 am

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 ...
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/github_repo_i420toh264
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

sparkyhall
Posts: 152
Joined: Mon Aug 27, 2012 9:14 am

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

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.

User avatar
HermannSW
Posts: 1667
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

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

Sun Nov 10, 2019 2:16 pm

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
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/github_repo_i420toh264
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

Paul Hutch
Posts: 415
Joined: Fri Aug 25, 2017 2:58 pm
Location: Blackstone River Valley, MA, USA
Contact: Website

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

Sun Nov 10, 2019 9:40 pm

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.

jahboater
Posts: 4846
Joined: Wed Feb 04, 2015 6:38 pm

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

Sun Nov 10, 2019 10:51 pm

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.

User avatar
HermannSW
Posts: 1667
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

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

Wed Nov 13, 2019 10:01 pm

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

[email protected]:~ $ vcgencmd measure_temp
temp=80.0'C
[email protected]:~ $ 
... 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

[email protected]:~ $ 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
[email protected]:~ $ 
temp=80.0'C
[email protected]:~ $ 
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/github_repo_i420toh264
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

Return to “General discussion”