USB port disconnected with NVMe drive enclosure

ok… followup… no good news unfortunately… I enabled webdav on my VIM4 and writing one file – ok just a piece of the file triggered the following and game is over for USB2…

[Thu Oct 20 23:42:58 2022] usb 1-1.2: reset high-speed USB device number 4 using xhci-hcd
[Thu Oct 20 23:43:04 2022] usb 1-1.2: device descriptor read/64, error -110
[Thu Oct 20 23:43:04 2022] usb 1-1.2: Device no response
[Thu Oct 20 23:43:19 2022] usb 1-1.2: device descriptor read/64, error -110
[Thu Oct 20 23:43:19 2022] usb 1-1.2: Device no response
[Thu Oct 20 23:43:20 2022] usb 1-1.2: reset high-speed USB device number 4 using xhci-hcd
[Thu Oct 20 23:43:20 2022] usb 1-1.2: device descriptor read/64, error -71
[Thu Oct 20 23:43:20 2022] usb 1-1.2: device descriptor read/64, error -71
[Thu Oct 20 23:43:20 2022] usb 1-1.2: reset high-speed USB device number 4 using xhci-hcd
[Thu Oct 20 23:43:20 2022] usb 1-1.2: Device not responding to setup address.
[Thu Oct 20 23:43:21 2022] usb 1-1.2: Device not responding to setup address.
[Thu Oct 20 23:43:21 2022] usb 1-1.2: device not accepting address 4, error -71
[Thu Oct 20 23:43:21 2022] usb 1-1.2: reset high-speed USB device number 4 using xhci-hcd
[Thu Oct 20 23:43:21 2022] usb 1-1.2: Device not responding to setup address.
[Thu Oct 20 23:43:21 2022] usb 1-1.2: Device not responding to setup address.
[Thu Oct 20 23:43:21 2022] usb 1-1.2: device not accepting address 4, error -71
[Thu Oct 20 23:43:21 2022] usb 1-1.2: USB disconnect, device number 4
[Thu Oct 20 23:43:22 2022] blk_update_request: I/O error, dev sdb, sector 453253128 op 0x1:(WRITE) flags 0x0 phys_seg 1 prio class 0
[Thu Oct 20 23:43:22 2022] EXT4-fs warning (device sdb1): ext4_end_bio:309: I/O error 10 writing to inode 14155785 (offset 0 size 4096 starting block 56656642)
[Thu Oct 20 23:43:22 2022] Buffer I/O error on device sdb1, logical block 56656385
[Thu Oct 20 23:43:22 2022] blk_update_request: I/O error, dev sdb, sector 453253144 op 0x1:(WRITE) flags 0x0 phys_seg 1 prio class 0
[Thu Oct 20 23:43:22 2022] EXT4-fs warning (device sdb1): ext4_end_bio:309: I/O error 10 writing to inode 14155784 (offset 0 size 4096 starting block 56656644)
[Thu Oct 20 23:43:22 2022] Buffer I/O error on device sdb1, logical block 56656387
[Thu Oct 20 23:43:22 2022] blk_update_request: I/O error, dev sdb, sector 474228504 op 0x1:(WRITE) flags 0x800 phys_seg 7 prio class 0
[Thu Oct 20 23:43:22 2022] JBD2: Detected IO errors while flushing file data on sdb1-8
[Thu Oct 20 23:43:22 2022] Aborting journal on device sdb1-8.
[Thu Oct 20 23:43:22 2022] blk_update_request: I/O error, dev sdb, sector 474220544 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
[Thu Oct 20 23:43:22 2022] Buffer I/O error on dev sdb1, logical block 59277312, lost sync page write
[Thu Oct 20 23:43:22 2022] JBD2: Error -5 detected when updating journal superblock for sdb1-8.
[Thu Oct 20 23:43:22 2022] usb 1-1.2: new high-speed USB device number 5 using xhci-hcd
[Thu Oct 20 23:43:22 2022] usb 1-1.2: device descriptor read/64, error -71
[Thu Oct 20 23:43:22 2022] usb 1-1.2: device descriptor read/64, error -71
[Thu Oct 20 23:43:23 2022] usb 1-1.2: new high-speed USB device number 6 using xhci-hcd
[Thu Oct 20 23:43:23 2022] usb 1-1.2: device descriptor read/64, error -71
[Thu Oct 20 23:43:23 2022] usb 1-1.2: device descriptor read/64, error -71
[Thu Oct 20 23:43:23 2022] usb 1-1-port2: attempt power cycle
[Thu Oct 20 23:43:24 2022] usb 1-1.2: new high-speed USB device number 7 using xhci-hcd
[Thu Oct 20 23:43:24 2022] usb 1-1.2: Device not responding to setup address.
[Thu Oct 20 23:43:24 2022] usb 1-1.2: Device not responding to setup address.
[Thu Oct 20 23:43:24 2022] usb 1-1.2: device not accepting address 7, error -71
[Thu Oct 20 23:43:24 2022] usb 1-1.2: new high-speed USB device number 8 using xhci-hcd
[Thu Oct 20 23:43:24 2022] usb 1-1.2: Device not responding to setup address.
[Thu Oct 20 23:43:25 2022] usb 1-1.2: Device not responding to setup address.
[Thu Oct 20 23:43:25 2022] usb 1-1.2: device not accepting address 8, error -71
[Thu Oct 20 23:43:25 2022] usb 1-1.2: the parent's name is 1-1
[Thu Oct 20 23:43:25 2022] usb 1-1-port2: Device no response
[Thu Oct 20 23:43:25 2022] usb 1-1-port2: unable to enumerate USB device

In this scenario it doesn’t even reconnect … the drive just disappears and that’s it… oh well… easy come and easy go.

If someone knows of a working USB enclosure – or anything that will allow me to hookup large storage using NVMe let me know… I like the VIM4 and not really wanting to fire up the RPI again…

My Fideco enclosure with the Netac drive has remained connected on USB3 with no problem for a full day now apart from when I removed and re-inserted the USB keyboard/mouse dongle.

That seems to have caused Linux to rescan the ports and drop the drive. Hopefully it wouldn’t do that if everything was connected through a powered hub.

I remounted it and it has been OK since.

There are a lot of powered hub options and was thinking about more of a name-brand hoping that they perhaps used a more reasonable chipset for handling the USB protocols and such… One that i found on Amazon is this one by tp-link. This other one seems a bit more interesting to me — another smaller company but bigger than most on Amazon that are ultimately no-name companies using perhaps questionable chipsets.

I think I’ll order the StarTech one — it lists for almost $70 but can be found at Amazon for $31.50 at the moment.

Ps. The USB caddy I’ve got by UGreen was giving me some odd behavior today when plugged into my MacBook Pro — even to the point where it hung the finder and I had to manually unplug it. I have a feeling that the chipsets must have some odd behaviors that may stretch the USB spec a little in certain areas… Maybe I’m wrong but I think sticking with bigger companies in this case might be prudent.

As it happens, I ordered one of those very TP Link Powered USB 3 hubs yesterday.

I have a number of other uses for it if the VIM doesn’t work out.

I ended up plugging in a Samsung 500Gb SSD that I had sitting around. I deleted the partitions, put a single huge partition on it, formatted it as ext4 and am in the process of copying about 7Gb of movies to it and no issues whatsoever. I’m really starting to believe many of these issues are perhaps associated with not super great quality USB chipsets used in these cheap no-name drive enclosures. This Samsung T5 is working perfectly.

Hello @ps23Rick , is your USB attached SSD still working okay? I am still having problems, arguably worse since the October image with a USB-3 SSD enclosure and Kingston A2000 250 GB nvme. One the VIM4 the machine now reboots after an hour or so of copying 50 GB of data in a loop. Either from a network attached driver or copying between two directories on the A2000. I sound like a broken record, however exact same copy scripts and exact same SSD when moved to MeLE x86 USB-3 port and the copies run without any issues. @numbqq , are you considering the nvme problems fixed with the October release, because that is not my experience.

Thanks.

Hello @deepvim

What’s your issue now? Still have NVMe SSD errors?

Hi @numbqq in the desktop image prior to your most recent Oct release, I got errors and the volume would go away. Now, the whole VIM4 will simply reboot. I am not that versed on how to debug such an event. No errors show in either syslog or dmesg. In prior image, I would see I/O errors and then volume dismount. Now the only thing you see is the new boot of the VIM4. The only oddity I see in the logs, prior to the reboot is it seems the time starts to drift forward prior to the reboot. As and example, the time on the last messages (which are just ‘normal’ messages) have time stamps that appear to be ‘newer’ than the time stamps after the machine reboots. In other words the clock seems to be running fast, when the machine reboots, it get set back to correct time.

If you can give me some idea of how to capture something useful, I am happy to continue to tests.

Again, as I said, the specific USB SSD is running fine on the MeLE SBC, going on 24 hours of the same copy script that reboots the VIM4 every 3 to 4 hours.

Hello @deepvim

How you supply the power? Do you use our 24W PD adaptor?

What SSD model you used?

1 Like

@deepvim
Power is important.
Many of the USB cables are using the small signal wires for power, then factor in the length for IR loss. Must use a cable that clearly states it is rated for 5 amps.

Ours on the lab power supply are set at 6.2 volts to compensate for the current induced voltage drop in the connector and cable. Ours with NVMe run without any problems at 6.2 volts. From the schematic the video chip has a 4.8V minimum. Instantaneous power demands of the ARM and NVMe require a very stiff power supply or bump the V up to compensate for the loss.

Pretty sure that many of the issues regarding this would be resolved if the board had a standard barrel connector instead of the USB connector for power.

Hi @deepvim … I didn’t get it to work reliably unless I was using a Samsung Gold USB drive — which I think I linked to earlier. That worked OK but using an NVMe based USB enclosure was a no-go for me… but I did not try to update the kernel and was using Ubuntu Server 22.04 from a few months ago …

For the moment I’m using another machine that I had in my closet but will come back to this at some point when things settle down in my life a bit more than they are right now.

Regarding power… Much of my testing was using a non-name power brick from Amazon in conjunction with my MacBook Pro power cable which I think can handle about 60W if I recall…

Hi @numbqq

Your USB-C power adapter was the only bit of every part of your VIM4 options that was not available at Amazon when I purchased everything else. I have been using a number of different GAN USB power bricks, all claiming to be able to deliver at least 3 amps at 5, 9, 15 or 20 volts on the USB-C port. I will try again here with the beefiest one I have. It claims, 130 watt on the 110 volt input and able to change two MacBooks at same time on two USB-C ports at 100 watts. Best I got. Info and line below. The whole USB-C PD thing is a real wild west.

As for the SSD unit, I will expand on what provided above, here is lsusb output below on the USB-3/c to M.2 adapter. I have been using it on various machine with no issues since 2019, link below. And again, the SSD unit is the Kingston A2000 250 GB nvme, that I seem to remember that you guys said worked:

lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 10000M
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M/x2

khadas@Khadas:~$ lsusb -v

Bus 002 Device 002: ID 152d:0562 JMicron Technology Corp. / JMicron USA Technology Corp. JMS567 SATA 6Gb/s bridge
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.20
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         9
  idVendor           0x152d JMicron Technology Corp. / JMicron USA Technology Corp.
  idProduct          0x0562 JMS567 SATA 6Gb/s bridge
  bcdDevice            2.04
  iManufacturer           1 JMicron
  iProduct                2 External
  iSerial                 3 DD56419883893
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0079
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              896mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           4
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     98
      iInterface             10 MSC USB Attached SCSI
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst               0
        Command pipe (0x01)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst               0
        MaxStreams             32
        Status pipe (0x02)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
        MaxStreams             32
        Data-in pipe (0x03)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
        MaxStreams             32
        Data-out pipe (0x04)
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength       0x002a
  bNumDeviceCaps          3
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000f0e
      BESL Link Power Management (LPM) Supported
    BESL value     3840 us
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x000e
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   1
      Lowest fully-functional device speed is Full Speed (12Mbps)
    bU1DevExitLat          10 micro seconds
    bU2DevExitLat          32 micro seconds
  SuperSpeedPlus USB Device Capability:
    bLength                20
    bDescriptorType        16
    bDevCapabilityType     10
    bmAttributes         0x00000001
      Sublink Speed Attribute count 1
      Sublink Speed ID count 0
    wFunctionalitySupport   0x1100
    bmSublinkSpeedAttr[0]   0x000a4030
      Speed Attribute ID: 0 10Gb/s Symmetric RX SuperSpeedPlus
    bmSublinkSpeedAttr[1]   0x000a40b0
      Speed Attribute ID: 0 10Gb/s Symmetric TX SuperSpeedPlus
Device Status:     0x0000
  (Bus Powered)

130W USB C Foldable Wall Desktop Charger,100W PD PPS 4-Port GaN II USB C Fast Charging Station with Extent AC Cable Desktop Travel Power Adapter for MacBook, Laptop,iPad,iPhone 14 13,Samsung

SHINESTAR NVME Enclosure, Based on USB 3.1 Gen 2 (10 Gbps) to PCIe Gen 3 x2 Bridge chip, Include 2 USB Cables, Fit for Samsung 970/960 EVO/PRO/WD Black NVME SSD, Hot Swap, Plug and Play

Hi @foxsquirrel thx for your info. USB-C cables I am using for power and SSD enclosure are 12 inches for power and 6 inches for SSD. Both cables claim to be 50 watt or better. Both seem to be quality, I don’t have any USB-C cable testing equipment, so I have to go by the vendor/seller specs. When it comes to voltages on USB-C PD, I have to rely on the manufactures of the (at least) three parts to negotiate the voltage and current: power brick, USB-C cable and target device. Jacking up the volts to 6.2 is way above my ‘pay grade’, anyway I think the VIM4 wants ‘Range from 9V to 20V’ according to the specs I see on the Khadas web page. As I said in my post below to @numbqq I could not purchase the Khadas power brick, so I have been reaching into my drawer of GAN USB-C PD devices. That may well be a source of my NVMe disk problems, as these devices are clearly power hogs. I have GAN bricks that claim 75 watt, 100 watt and 130 watt on their specs, and they are not the lowest cost in the barrel. I am now trying the 130 watt unit.

I note that Khadas is now selling a 30 watt power brick in addition to the 24 watt unit I was not able to buy. Interesting…

I agree with your assessment that a standard barrel connector is the ‘gold standard’, but damn it the EU is going to make every baby born on the planet come equiped with a USB-C connector :wink:

I still cross my fingers everytime I plug in a USB-C connector to something, it does require a lot of ‘faith’ that no ‘magic smoke’ will appear.

1 Like

Hi @ps23Rick thanks for your info. Sounds like you and I have spent a lot of cycles trying to find a solution. Bit frustrating. We shall see if Khadas can get the VIM4 to a level where it can be relied on in the ‘server closet’, however not there yet.

Yes, they do take a good supply. Another board being evaluated was doing the same thing. The lab supply was maxed at 3.2 amp before folding back. That board was flaking out too, finally got smart and configured power supply so both channels are in parallel for 6 amps and that board is doing fine.

When we first got the VIM boards I had a junk power supply that was causing problems. Ours are now on medical device qualified power supplies, those have a much tighter voltage regulation spec.

I was cutting off the USB cables to connect to lab supply and discovered some of those “good” cables are not so good.

The watts are not really the issue, it would be the regulation specs and how clean the DC output is. Noise is another issue, under high load the noise level will increase and cause trouble too.

The VIM4 we have here is doing very well as a server, if you need UFW and NFTables you will have to update your kernel config and build an image in fenix.

Hello @numbqq

I’m continuing to test, things are working solid now on VIM4. However, I can not explain what has changed… I shut down VIM4 completely, checked all cables, inserted a USB-C power monitor dongle between power brick and VIM4. The VIM4 has not exhibited the ‘reboot during file copy on SSD’ problem any further. I have tried both power bricks and neither have shown any problems. VIM4 is drawing around 0.8 amps at 12 volts (a small voltage difference of 0.15 volts between the two power bricks).
Glad to see things working, but frustrating to not yet understand what I changed to improve. I will continue to test. Will install the SSD on the m.2 expansion board after I let the VIM4 run for another period of time in current setup.
Thx for you work and help!

Hello @deepvim

Okay, waiting for your feedback.

Hi @numbqq

The Kingston A2000 250 GB nvme continued to run fine in the external USB-3 SSD enclosure. I moved the Kingston A2000 250 GB nvme to the Khadas m.2 expansion board and I am running the same test scripts. The VIM4 has been running in this configuration for about 12 hours now with no errors in either syslog or dmesg. I do think I am seeing a considerable reduction in disk write performance to the A2000 on the m.2 adapter vs. the same via the USB-3 SSD config. Do you have a recommended disk performance test I can run? I would like to compare what I see to what would be expected by you.

The VIM4 A2000 on the m.2 adapter is drawing about 0.65 to 0.70 amps at 12 volts, somewhat lower power consumption than when the A2000 was attached via the USB-3 connection.

Thx!