Way to keep your cool running a Raspberry Pi 4 (2019)
jeffgeerling.com
jeffgeerling.com
""" Simply moving Raspberry Pi 4 into a vertical orientation has an immediate impact: the SoC idles around 2°C lower than the previous best and heats a lot more slowly – allowing it to run the synthetic workload for longer without throttling and maintain a dramatically improved average clock speed.
There are several factors at work: having the components oriented vertically improves convection, allowing the surrounding air to draw the heat away more quickly, while lifting the rear of the board from a heat-insulating desk surface dramatically increases the available surface area for cooling. """
https://www.raspberrypi.org/blog/thermal-testing-raspberry-p...
Looking through a thermal imaging camera gives all kinds of interesting insights.
All that is needed is a small heatsink to slightly decrease the thermal resistance to ambient air, to stay below the thermal throttling threshold.
Anything more complicated than that is a pointless exercise in pointlessness.
It is good for things like reading a sensor and sending it to some server, but so are ESP32s which are cheaper. You are paying a heavy price to get video output and Linux compatibility. In the current era, it's a bad microcontroller (expensive!) and a bad desktop computer (slow!). When it came out, most people were using $25 MCU boards, so $10 extra to run Linux was a great deal. These days, a massively more capable MCU dev board can be had for $4 (if you want free 2 day shipping, less if you can wait).
I got the flirc usb dongle for remotes at the same time, since I thought I'd want it (my pi is a media center) and there was a discount at the time if you bought both it and the case.. I've been far less impressed. It's a great idea in theory, but in my experience there was enough flakiness/delay with each button press, especially with Kodi for some reason, that it was basically unusable. Also, their utility for programming the dongle did not run well on the pi itself (it stores configuration on-device so you don't need to program it from the device you'll be using it on), and the install process involved setting up a repo that is served over http and does not have an associated gpg key, which gave me a bad feeling (although overall it felt more like a startup flying by the rest of its pants than anything malicious). I am somewhat hopeful that with more time/polish these issues will be fixed in software, but can't currently recommend it.
Note that it's clearly an injection-molded aluminum top-half and the bottom-half is plastic, just used to keep the dust out.
I would describe it as simple and elegant; fit for purpose.
Otherwise I'm quite happy to have a full passive cooling config, as currently my RPi home server must live in the kitchen/dinning room area due to space constraints.
What a pity that there's plastic on the bottom.
For home/hobby use this doesn’t matter too much but you typically want to run as hot as allowable. It’s a win-win since small heat sinks are cheap and don’t have any moving parts.
I have a huge heatsink on mine (40mm cube), and even without the overclock it will crank up to 80C doing long running compiles. Running it at 80C for an hour or two, the temp of everything on the board starts to approach 80C. Touching the usb ports at that point will give you a surprise.
So, I added a small 20mm fan, and set the profile to kick on at 60C, which generally keeps the soc thermals in the 60-70C range. No throttling, and still no noise because with that large of a heatsink it doesn't take much air to cool it.
Add in a couple hundred Mhz of overclocking and that fan stays on pretty much all the time.
I use Samsung Evo cards and haven’t had an issue with them either. My problem is one of confidence. I have no data to suggest that these cards won’t just hard fail at some point in the next five years. Simply doing better than their competitors in the micro SD card space is not good enough.
Anyway, Samsung Evos didn't hard fail for me. They just stopped executing writes (without reporting any errors). So your system seems to work (for a while), but after reboot it's back to where it was previously. It's a pretty stupid way to handle end-of-life condition for the card. I wish samsung decided to report write failures instead of simply ignoring the writes and reporting success.
The current supported solution is boot from read only file system on SD card, overlay file system with writes to the USB drive.
The foundation plan to add support back but for now only supported on Pi 3 and earlier.
That makes me think a lot before choosing passive or active cooling.
The Flirc case-as-heatsink one seems good tho, and on-line with your statement
With an overclock, even a FLIRC would throttle when running our full unit test suite. A 30% reduction in unit test runtime is nothing to sneeze at and I certainly didn't want to downclock to 600-800MHz due to throttling. An ICE Tower was a lifesaver.
one makes sense, the other is hubris.
I'm old school when it comes to overclocking. Stability and sustainability matter to me. I don't always run all cores full-on for hours, but when I do, I want a cooling solution that's up for the job.
> Heatsinks will generally shave 5-10°C off the highest temperatures you encounter, which is significant, but you still need to have air moving across the heatsink for it to do anything. This means either a fully open Pi (great for testing or tinkering, not so great for a semi-permanent installation), a well-ventilated case (with slots or holes in the bottom and top to allow natural convection), or a fan. So not a bad choice, and they're so cheap you should probably stick them on any Pi you can... but heatsinks alone won't solve Pi cooling problems.
If he'd mounted his Pis' GPIO parallel to the ground, heatsink fans perpendicular to it, he would have found his missing convection with or without a heatsink.
This is what I do, and mine haven't reported >45`F ambient under peak load in a passively ventilated area. There is no issue with heat removal with enough air space.
My two 4GB Raspberry Pi 4s have had no thermal issues. Running the same measurement script now, will report back the results.
Edit: Ok, done with the tests. Both RPi4s are bare and should be running exactly the same versions.
RPi4 #1 started at 51C, peak 79C, no throttling at any point. Ambient temperature 24C.
RPi4 #2 started at 54C, peak 82C at which point it started to throttle. Ambient temperature 27C.
I haven't closely followed RPi4 firmware development, but I did notice positive changes since June 2019. I think there have been at least two occasions that dropped the (idle) operating temperatures.
In any case, I'm happy with their thermal performance.
When the pi 4 first came out, mine throttled when driving two screens and that was depressing. I've not tried that setup again since but I really should.
I used the pi for dev work for a few weeks as an experiment. Overclocking is the single-biggest improvement you can make. An overclock combined with the IPC improvements from a 64-bit OS, and load improvements via SSD, the system is probably 75% faster which is a huge deal at that performance level (the difference between extremely frustrating and just mildly annoying at times).
I gather the main temp gain isn't the CPU though but rather on the USB charging circuitry.
Also there a few model of cases on ebay/aliexpress that would be interesting to test such as https://m.aliexpress.com/item/4000509636456.html (with a heatsink added)
https://cdn-shop.adafruit.com/1200x900/4340-08.jpg
It never gets hot that I can't touch it.
- SD card reliability
- techniques for reliably using what we have
?
Given that people are using these for all kinds of stuff there must be some advanced techniques being used (or some basic I have missed).
I am logging everything to ram instead of writing it to the card and that's about it. I never encountered any issue with SD Card reliability, despite me sometimes just pulling the plug instead of properly shutting it down.
Here is a simple guide: https://raspberrypi.stackexchange.com/a/62536
I do have a couple of other raspberries for other uses (e.g. a small rc car) which are also running on their first SD card. Might be just luck, but I do think that it's not necessary to go to extreme lengths to have them run reliably.
Does anyone have any info on this that's more substantial than hearsay? Experiments, measurements or at least a more technical explanation than "bad power source"?
I'm persistently hearing this story that power supply quality affects SD card life. As an electrical engineer, and given what I know about R. Pi design, I fail to see how an SD card could get physically damaged by any reasonable power supply that would otherwise run the rest of the R.Pi.
I suspect people are confusing filesystem corruption due to brownouts/OS not shutting down cleanly with physical damage to the flash (i.e. unreadable sectors on SD card)
Not SD card life indeed (in my case at least), merely IO failing, hosing the filesystem long term because of b0rked writes. The SD card is fine, it's just the data that eventually becomes inconsistent garbage.
I noticed the power LED showed the undervoltage behaviour, measured the power output which indeed showed the voltage not being stable on power spikes, so bought a better power supply, problem gone. Got the same kind of issue with greedy USB devices, so either went the powered hub route or used self-powered hard disks.
I was originally going to recommend checking out this¹ article for instructions on how to do it. However, much of the instructions are no longer valid (as of two weeks ago!) since they assume that the Raspberry Pi 4 doesn’t natively support booting from USB, which finally isn’t the case (although only if you use the current beta bootloader²). I’d still recommend reading it though, as it also mentions known working 2.5″ SATA to USB 3.0, M.2 NVMe to USB 3.0, M.2 SATA to USB 3.0, and mSATA to USB 3.0 adapters. In addition, I’d recommend checking out this³ article with some recommended SSDs; in particular, this⁴ 120 GB Kingston A400 SATA 3 2.5” Solid State Drive coupled with this⁵ StarTech 2.5″ SATA to USB 3.0 Adapter, which also has the added bonus of giving you far better speeds than a microSD card would! As the author of that article mentions:
“The Kingston A400 drive performs really well in the Raspberry Pi Storage Benchmarks⁶. It’s a great drive and is cheaper than many mid-range MicroSD cards.
The 2.5″ SATA to USB adapter above allows us to do this. There is no power adapter needed as SSDs are low power and are powered by the Pi through USB.”
――――――
¹ — https://jamesachambers.com/raspberry-pi-4-usb-boot-config-gu...
² — https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb
³ — https://jamesachambers.com/raspberry-pi-storage-benchmarks-2...
⁴ — https://www.amazon.com/dp/B01N6JQS8C/
――――――
¹ — https://www.jeffgeerling.com/blog/2020/im-booting-my-raspber...
The whole time I had 1 or 2 broken SD cards. Temperature was never an issue.
I put on all SBCs just a passive heatsink (about 30x30x20mm). I installed packs with 4 boards vertical. On the bottom I had 2 large fans for all the SBCs. (sorry no picture)
Debian wiki has a (pretty bad and outdated) page on the subject https://wiki.debian.org/ReadonlyRoot#Enable_readonly_root
https://www.raspberrypi.org/forums/viewtopic.php?p=1158010
I've been using them for the last couple years and haven't had any dead Pis, unlike what happened with a couple other "regular" sd cards.
No noise, no moving parts, excellent cooling.
Notice that it has the only temperature curve where the temperature does not go back to baseline after the stress test. It needs a lot longer to get to equilibrium, and the final temperature is almost certainly hotter than what's shown on the graph.
But overall, this case is still better than bare pi, or regular plastic case (the heat capacitor has much larger surface than the cpu of the pi).
I don't have the hardware to give a proper surface temp reading. I can measure the pi's reported temperature / test for throttling under extended load later, but for now: I stuck an "instant"-read thermometer intended for cooking into one of the usb ports, which was the hottest place I could find on the case. It measures 36.1°, compared to an ambient temp of 23.4°.
I have playing with a PI Zero W over the last weeks. At first everything worked as expected.
But now it developed some strange "hangings" I cannot explain. It kinda randomly freezes in time for a few minutes every now and then.
Sometimes it takes several minutes to ssh into it. Sometimes, the terminal just freezes for several minutes.
Neither top nor iostat seem to show any elevated activity during these periods. Since they hang throughout the freeze, its a bit hard to say though.
The strangest thing: Pings to the PI always come back fast. So its probably not that the hardware really freezes completely.
I compare a number of the different fan / heatsink solutions including pro/cons along with a hacked Noctua fan
I've never had to think about heat dissipation so much. Might try a laptop cooling pad.
Edit: this is my case
https://chicagodist.com/products/black-raspberrypi-4-armor-a...
My Pis are always out of the way and in a shelf somewhere, untouched until I make modifications to the setup, in which case the case is often coming off anyway.
My Pi 3 has little circular holes that I assume are meant to mount into a case, but which I have successfully used to just hang the board on a hook on the wall.