raspberry pi 5 nvme ssd not detected

To fix a Raspberry Pi 5 not detecting an NVMe SSD, you need to check the physical flexible flat cable (FFC), update the bootloader, and enable PCIe in the system configuration files.


Step 1: Check and Reseat the FFC Ribbon Cable

A loose, upside-down, or damaged ribbon cable is the most common cause of detection failure.

• Verify orientation: Ensure the copper contact points face the correct direction on both ends (typically inward toward the USB ports on the RPi 5 side, and matching the PCB markings on the HAT/M.2 base side). If you are unsure, try flipping the cable 180 degrees at one or both ends.

• Reseat firmly: Lift the black/grey plastic latches on both the Raspberry Pi 5 PCIe port and the M.2 HAT, push the cable straight and fully into the slot, and snap the latches down.


Step 2: Update the EEPROM Bootloader

Older firmware versions lack proper PCIe/NVMe enumeration.

1. Boot your Raspberry Pi 5 using your standard microSD card.

2. Open a terminal and run the following commands to update the bootloader:
sudo apt update
sudo apt full-upgrade
sudo rpi-eeprom-update -a

3. Reboot the Pi if an update was installed (sudo reboot).


Step 3: Enable PCIe in config.txt and EEPROM

The Pi 5 skips PCIe probing by default unless explicitly told to look for a drive.

1. Open the configuration file:
sudo nano /boot/firmware/config.txt

2. Scroll to the bottom and add the following line to enable the PCIe interface:
dtparam=pciex1

(Optional: If you experience stability issues with faster Gen 3 speeds, you can force Gen 2 speeds by adding dtparam=pciex1_gen=2).

3. Save and exit the editor (Ctrl + O, then Enter, then Ctrl + X).

4. Edit the bootloader EEPROM settings:
sudo rpi-eeprom-config --edit

5. If you are using a non-HAT+ adapter, ensure you add:
PCIE_PROBE=1

Save and exit the editor.


Step 4: Check if the Drive is Recognized

Reboot your Raspberry Pi 5 and run diagnostic commands in the terminal:

• Check the PCIe bus: lspci (Look for a non-volatile memory controller)

• Check block devices: lsblk or lsblk -d | grep -E "nvme|nvme0n"

• Check kernel logs: dmesg | grep -i nvme or dmesg | grep -i pcie


Step 5: Hardware & Compatibility Caveats

• SSD Incompatibility: Certain NVMe drives (such as select models with Phison or Polaris controllers) have known compatibility quirks with Pi 5 adapters. Test the SSD in a standard USB-to-NVMe enclosure on a PC/Mac to verify the drive itself isn't dead.

• Power Supply: Use the official 27W Raspberry Pi USB-C Power Supply. Underpowered supplies can cause PCIe/NVMe link drops.


Back to blog