Coding with Titans

so breaking things happens constantly, but never on purpose

SSD over USB 3.0 on Raspberry Pi 4

I wasn't even surprised, when I plugged-in an SSD via USB 3.0 into Raspberry Pi 4 and it didn't work at all. That became a killer for my idea of keeping data outside of the Pi's microSD card. Observed suspicious symptoms were too obvious:

  • booting time increased from 20 seconds to 3 minutes
  • LED light of the drive was constantly blinking
  • some commands took extremely long time to execute (sudo blkid, sudo fdisk -l)
  • and even later mounting finished failing or partition formatting hanged indefinitely.

I was, however, sure all the SSD drives, I tried to connect (Samsung 860 Evo, Crucial MX500, Adata SU900, Adata SU800), ran greatly with my desktop machine and also as external drives connected into my Windows laptop and MacBook via Gembird EE2-U3S-2 enclosure. Performance for all of them was outstanding. Additionally, when I used USB 2.0 of Raspberry Pi (or any of previous editions of Pi!), all was working fine too. So where lied the incompatibility?

On Raspberry Pi forum I found some threads that could point the issue (here and here). People had problems related to low SSD performance and whole source of problems was the USB<->SATA adapter and its miserable support of UASP. Pi 4 has UASP enabled by default for all USB 3.0 storage devices, while my enclosure seems not to support it. This could put the driver into a strange state or the adapter stop responding after unrecognized command. Thankfully there is a way to disable it from Raspberry Pi side.

  1. First - list the messages print during booting by:

    sudo dmesg

    and find a section about USB:

    [1.233487] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.20
    [1.234768] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
    [1.235461] usb 1-1: Product: USB2.0 Hub
    [1.237765] hub 1-1:1.0: USB hub found
    [1.238615] hub 1-1:1.0: 4 ports detected
    [1.381899] usb 2-2: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
    [1.413048] usb 2-2: New USB device found, idVendor=152d, idProduct=0578, bcdDevice= 2.04
    [1.414504] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [1.415260] usb 2-2: Product: USB to ATA/ATAPI Bridge
    [1.416022] usb 2-2: Manufacturer: JMicron
    [1.416771] usb 2-2: SerialNumber: 0123456789ABCDEF
    [1.440055] scsi host0: uas
    [1.442317] scsi 0:0:0:0: Direct-Access     JMicron  Generic          0204 PQ: 0 ANSI: 6
  2. Add into /boot/cmdline.txt file a proper command to avoid UASP for that particular device:


    While first number is the value of idVendor, second idProduct.

Unfortunately it didn't help me at all. Symptoms were as bad as before. People in mentioned threads were also talking about different adapters, unfortunately they are not available in Poland. I guessed a bit and bought another one, but this time something with UASP build-in support. It turned out a bull's-eye shot. My new Unitek SATA6G Y-3257 enclosure now works like a charm. I also tested positively Unitek SATA6G Y-3036 enclosure, Unitek USB3.0 Y-1096 converter and SilverMonkey 2.5’’ HDD enclosure.

I hope this short info will help you, too.