General Raspberry 5 Knowledge Base
Camera firmware issues
For cameras based on ov9281 connected via the MIPI port, such as the Arducam UC-599 Rev-B, you need to set up explicit firmware overlay. This is set up in /boot/firmware/config.txt. You need to disable automatic detection of cameras by commenting out or setting to 0 the line:
camera_auto_detect=1
and adding the following lines into the [all] section:
dtoverlay=ov9281
dtoverlay=ov9281,cam0
dtoverlay=ov9281,cam1
The cam# lines set the camera to be detectable on both the MIPI ports.
It may also be necessary to comment out the line
dtoverlay=arducam-pivariety
Do not install the vcdbg package - it will remove the overlays needed for MIPI camera use.
It seems that the package is currently only compatible with older versions of the Raspberry Pi.
If you did this, remove all packages that were installed with vcdbg and reinstall raspi-firmware.
Using GPU acceleration in Singularity
By default, the Ubuntu 20.04 Singularity image we use to run ROS on the device has older MESA drivers that do not support hardware acceleration on the onboard Broadcom V3D 7.1 GPU. This can be overcome by manually adding a non-official ppa to upgrade the drivers in Singularity.
First, you need an overlay with enough space - at least 2GB should do it. If you already have an overlay image file that is too small, you can expand it using:
e2fsck -f overlay.img
resize2fs overlay.img 2000M
Next, load up the Singularity container with root privileges using
sudo ./wrapper.sh
and when inside do the following:
sudo apt-get install software-properties-common # adds the missing add-apt-repository command
chmod 1777 /tmp # necessary, since adding the ppa will be making temporary files here and by default it is not writable in the container
add-apt-repository ppa:kisak/kisak-mesa # press Enter when prompted
sudo apt install libglx-mesa0 libgl1-mesa-dri
This should have upgraded the MESA drivers to the newest version. Lastly, note that the V3D 7.1 GPU only supports GLSL 3.10 - if you are using a shader that explicitly requires a newer version, try manually rewriting the requirement in the code, it may work. If not, you may be out of luck.
Missing or corrupted firmware
If you have a Raspberry Pi 5 that doesn't show any output on HDMI and only has a red LED on (not green), it might be a firmware issue (I don't know if it is missing completely, outdated or corrupted).
To fix this, flash firmware to an SD card using Raspberry Pi Imager. I recommend using a different SD card than the one for the OS, so that you don't have to re-flash the OS after you're done with the firmware.
Raspberry Pi Imager:
- on the "Select your Raspberry Pi device" select "Raspberry Pi 5"
- on the "Select operating system" page select "Misc utility images"
- select "Bootloader (Pi 5 family)"
- select "SD Card Boot" (or potentially one of the other options if you're also using an NVMe SSD or something else)
- select your SD card and flash it. Everything that was on the SD card before that will be wiped!
Once you have the firmware flashed on the SD card, plug the SD card into the Raspberry and power it on. After a few seconds the green LED should start flashing. This means that it's done and you can power it down, remove the SD card and try booting the OS again.