raspberry pi 4 status report for 10 april 2020 – running pretty good these days

If there’s one thing I’ve been critical of with regards to the Raspberry Pi 4, it’s been the fact it runs hotter than any prior Raspberry Pi. I run my Pi 4s in a Flirc case (https://flirc.tv/more/raspberry-pi-4-case) in order to keep them as cool as possible during operation. Yet as good as the Flirc case is, the Pi 4 with the Raspbian initial release still easily hit the mid-50°Cs (or hotter) with just regular usage. Recently I’ve noticed that the Pi 4, with the latest version of Buster (including all patches) and the firmware, is running a good 10°C cooler, around the mid-40°C or cooler. When I now put my hand on the case it’s barely warm, not the hot little brick when I first put the Raspberry Pi 4 in the case.

In addition to running cooler, Raspbian Buster appears to be using a lot less memory resources than before, such as when having many open tabs in Chromium. More often than not I could see on htop where swap was being hit with a regular load of Chromium, multiple open tabs on the Terminal with multiple editing sessions, and regular builds with any of Go, C++, Rust, Python 3 or Julia running. I’ve now had the Pi 4 up for five days with continuous use and I haven’t hit swap yet.

And speaking of Julia, I installed version 1.4.0 and then installed all the supporting packages I normally need. One of those packages is Winston, and it has problems. Winston under Julia 1.4.0 is dependent on more packages than ever these days, so much so that any Julia script I’ve written won’t run because not all the current Winston dependencies are met. As a consequence I’ve dropped back to running the prior release, Julia 1.3.1. My scripts still run, and for the time being I’m not updating any of its packages.

raspberry pi 4 cpu temperature observations

The short video above shows the Adafruit Feather displays attached to the Raspberry Pi 4, along with the micro:bit and scroll:bit I wrote about last post. The Adafruit Feather work was done over a year ago. You can find and read about it in the section Golang.

Basically I’m using the USB as well as the GPIO/I2C connections to drive a number of devices. In one terminal I have tempmonitor.py running, and in another I have a Bash script, clock.sh, running. The Bash script uses some of the Go developed apps to manipulate the Adafruit Feather displays using I2C. The Bash script simply displays the system time, sleeps a bit, and then displays the system date. Then it repeats. The script for this is at the bottom of the post.

Observations

  • I’ve taken the top off the official Raspberry Pi 4 case. It’s open now, and as a consequence the CPU is now running a good 15C cooler than it was with the top on. Which begs the question who designed that case that way without any vents at all for circulation of the heat out of the enclosure.
  • Running the same code on the Raspberry Pi 3B+ shows the CPU temp to be a good 20C cooler, and this board is in a case. The case has a lot of ventilation holes in it, and thus probably helps it run cool. Furthermore, that CPU has a heat sink attached to it as well.
  • When the Raspberry Pi 4 is running cooler, the entire board is running cooler, especially the USB chip itself. When it’s hot, USB communication is intermittent and can be seen when the micro:bit/scroll:bit fails to scroll the temperature sent to it. I’ve debugged the original Python script, and know when it’s sending a message to the micro:bit when I see a corresponding message on the terminal. About one out of every eight attempts to send a message fails when the CPU is registering 75C. At this much cooler temperature (around 55C) all messages are sent across and scrolled. You can draw your own conclusions.
  • I’ve ordered a Flirc aluminum case which has a heatsink that’s part of the case and is designed to pull heat away from the CPU. I don’t know when it’ll arrive since this was a pre-order, but it was only about US $12, so I figured why not.
#!/bin/bash## Copyright (c) 2019 William H. Beebe, Jr.## Licensed under the Apache License, Version 2.0 (the "License");# you may not use this file except in compliance with the License.# You may obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "AS IS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License.## ------------------------------------------------------------------------------## A simple clock that uses the Bash shell to send the Unix date and time to a# pair of Adafruit displays.## CTRL C is trapped to turn off the displays before exiting from the script.#trap ctrl_c INTfunction ctrl_c() {display clear > /dev/nullexit}## Get the date from the Unix date command, using +%r to get the time formatted# in the locale's time format. This will give it in 12 hour format, with an# AM or PM. Then use the Bash shell's built-in regex to replace the last ':'# and second digits with a space, so that the time string is in the format# '12:00 PM' and will print across the eight Adafruit hexadecimal digits.#while true; doDATE=$(date +%r)display print "${DATE//:[0-9][0-9] / }" > /dev/nullsleep 3DATE=$(date +%D)display print "$DATE" > /dev/nullsleep 3display clear > /dev/nulldone