Skip to main content

Raspberry Pi 5, NVMe and USB woes

If you have not bought an enclosure/SSD yet, PLEASE make triple sure that what you're buying is compatible between each other and it's not the same cursed enclosure chip I bought. Ideally buy an M.2 hat instead to save yourself some of the issues. You still have to verify compatibility with the SSD if you'll choose a HAT.

After buying a Raspberry Pi 5 8GB, Orico NVMe USB enclosure and ADATA XPG SX8200 Pro 2TB for an SSD, I had an awesome time debugging it for hours, here's some things for you to check to save time.

This thread is linked on GitHub

  • Your devices can misbehave due to out of date firmware
    • RPi5 will likely ship with an old bootloader firmware which may cause issues
      • Update is easy, just boot the official updated Raspberry Pi OS image and reboot.
      • Grab an image here, flash it onto an mSD card, boot it, run sudo apt update && sudo apt upgrade -y && reboot, sudo rpi-eeprom-update will show you the current bootloader version, and so will the bootloader screen over HDMI
      • You can further upgrade again to beta bootloader by means of toggling it in Advanced settings of sudo rpi-config, and if that's not going to get you the latest as per the link, you can upgrade to the beta beta firmware via rpi-update.
    • SSD firmware can be out of date, you will not be able to flash it over USB, you have to connect it to actual PCIe, sorry
    • USB Enclosure firmware can be out of date
      • If you made the same mistake like me and bought an enclosure with an RTL9210 chip, update FW as per here
  • Delivering enough power woes
    • USB Enclosures have a power limit that they're designed for and won't take moremore,
        this
      • Ishouldn't havebe a veryhuge weirdproblem issue whereas the enclosureSSDs doesshouldn't noteat liketheir totheoretical show upmaximum on the Pi,comparably butslow ifUSB speeds
      • USB Enclosures (or the SSDs? Unlikely) can have capacitors that you can use to work around the next boot. If I connect itmy enclosure to my PC it always loads finefine. After disconnecting it after about 5 seconds and THENimmediately putting it in the Pi, it then loads fine in Pi too. I do not think it is connected to how warm the enclosure is as I can do these connections very quickly and it will always work like this.
      • Your USB port may not have enough juice for that, RPi5 has total 1.6A amps available for the ports - 5V*1.6A=8W - THIS IS SHARED WITH THE FAN PORT
      • If you're using your RPi5 with an unofficial power supply, it is likely you are using the wrong cable and not getting the full 28W and ports are limited further
      • The SSD may be designed to take more power than the enclosure can theoretically provide, my enclosure is 796mA*5V=3.98W, and the SSD I use can apparently peak at about 4.1W. Keep in mind the enclosure will take some minimal power for itself. The peak power consumption is on connect, and presumably on maxed out IO, you are not going to max out IO on the Pi, so you can theoretically run a more power hungry SSD fine
      • Cable issues can cause this
        • You can be using a USB 2.0 cable/adapter, which will limit power to 500mA, verify communicated USB protocol via lsusb -v and checking maxPower and bcdUSB attributes
        • Your cable can be broken, causing the above
        • Your cable can be too long, causing the above, even in-spec cables are at risk
        • Just because it works with another device does not mean it will work with the RPi5, which seems to have worse ports than RPi4 where it confusingly might work
    • More compatibility issues
      • Enclosure chip and SSD chip may not like each other
      • RPi5 and the enclosure chip may not like each other
      • Enclosure chip can announce UAS support but not support it. RTL9210 does this, but if you try to use it with the UAS driver it will crash the moment you put any amount of IO into it. It needs to be added to the quirks blacklist by VID:PID (can get it from lsusb) in Linux to work. RTL9210 has made it onto the blacklist in Linux by default for this reason.
      • Enclosure can be set to autosleep, disconnecting the OS drive after X minutes of inactivity. This can be worked around by either modifying the firmware or constantly writing files.
      • RPi5 by default resets the power to USB devices on boot. Some enclosures do not seem to like this. sudo rpi-eeprom-config -e lets you edit the bootloader config.