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 and several other places that I found where people struggled to get this working.

  • Your devices can misbehave due to out of date firmware
    • RPi5 will likely ship with an old bootloader firmware which may cause issues, sudo rpi-eeprom-update will show you the current bootloader version, and so will the bootloader screen over HDMI
      • Updating bootloader firmware is easy, just boot the official Raspberry Pi OS image flashed onto a mSD card, update OS via sudo apt update && sudo apt upgrade -y and reboot.
      • You can upgrade further to a beta bootloader by means of toggling branch in Advanced settings of sudo rpi-config, and if that's not going to get you the latest beta as per the link, you can upgrade again via rpi-update
    • 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
    • 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
  • Delivering enough power to the USB enclosure and SSD woes - RPi5 with official power supply has total 1.6A amps available for the ports - 5V*1.6A=8W
    • USB POWER IS SHARED WITH THE FAN PORT - if disconnecting fan fixes your issue, you know what's up
    • USB Enclosures have a power limit that they're designed for and won't take more, this shouldn't be a huge problem as the SSDs shouldn't eat their theoretical maximum on the comparably slow USB speeds
    • USB Enclosures can have capacitors, you can abuse those to make boot work even when you don't have enough power. If I connect my enclosure to my PC it always loads fine. After disconnecting it after about 5 seconds and immediately putting it in the Pi, it then loads fine in Pi too
    • 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
    • sudo rpi-eeprom-config -e lets you edit the bootloader config
      • RPi4 by default resets the power to USB devices on boot through USB_MSD_PWR_OFF_TIME, RPi5 supposedly do not seem to do this. Some enclosures do not seem to like this.
      • You can also try playing with USB_MSD_STARTUP_DELAY=3000
      • Not directly related but you can set HDMI_DELAY=0 to not block HDMI output for 5 seconds on boot.