UTM: Failed to attach m.2 to usb converter

Describe the issue I have an SSD enclosure(m.2 to USB converter) that uses an RTL9210B chip, when attaching this to a Linux VM (I tested it on the Debian VM from the UTM gallery) it doesn’t work and gives errors in the kernel log(log attached below). Note that the same enclosure works fine under Linux( tested on an intel machine running Linux and also tested under Asahi Linux running on the same MacBook I’m running UTM on.

Configuration

  • UTM Version: 3.1.5
  • OS Version: 12.3.1
  • Intel or Apple Silicon? apple silicon

Crash log N/A

Debug log The log below is when the enclosure doesn’t work after attaching to utm:

[   50.131278] usb 3-3: new high-speed USB device number 2 using xhci_hcd
[   50.259530] usb 3-3: device descriptor read/64, error 18
[   50.503453] usb 3-3: device descriptor read/64, error 18
[   50.750657] usb 3-3: new high-speed USB device number 3 using xhci_hcd
[   50.887526] usb 3-3: device descriptor read/64, error 18
[   51.133088] usb 3-3: device descriptor read/64, error 18
[   51.240131] usb usb3-port3: attempt power cycle
[   51.443229] usb 3-3: new high-speed USB device number 4 using xhci_hcd
[   51.464661] usb 3-3: Invalid ep0 maxpacket: 9
[   51.591345] usb 3-3: new high-speed USB device number 5 using xhci_hcd
[   51.611845] usb 3-3: Invalid ep0 maxpacket: 9
[   51.612125] usb usb3-port3: unable to enumerate USB device

The log below when running under asahi linux(the enclosure works fine):

[ 1531.664694] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 1531.664712] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[ 1531.664899] xhci-hcd xhci-hcd.0.auto: hcc params 0x0238ffcd hci version 0x110 quirks 0x0000000000010010
[ 1531.664920] xhci-hcd xhci-hcd.0.auto: irq 85, io mem 0x502280000
[ 1531.665151] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.17
[ 1531.665159] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1531.665165] usb usb1: Product: xHCI Host Controller
[ 1531.665170] usb usb1: Manufacturer: Linux 5.17.0-rc7-asahi-next-20220310-5-1-ARCH xhci-hcd
[ 1531.665175] usb usb1: SerialNumber: xhci-hcd.0.auto
[ 1531.665424] hub 1-0:1.0: USB hub found
[ 1531.665446] hub 1-0:1.0: 1 port detected
[ 1531.665701] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 1531.665711] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[ 1531.665718] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.1 Enhanced SuperSpeed
[ 1531.665767] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 1531.665849] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.17
[ 1531.665856] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1531.665862] usb usb2: Product: xHCI Host Controller
[ 1531.665866] usb usb2: Manufacturer: Linux 5.17.0-rc7-asahi-next-20220310-5-1-ARCH xhci-hcd
[ 1531.665870] usb usb2: SerialNumber: xhci-hcd.0.auto
[ 1531.666283] hub 2-0:1.0: USB hub found
[ 1531.666303] hub 2-0:1.0: 1 port detected
[ 1534.674356] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 1534.806377] usb 1-1: New USB device found, idVendor=0bda, idProduct=9210, bcdDevice=20.01
[ 1534.806392] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1534.806398] usb 1-1: Product: RSH-329-RTL9210B-CG
[ 1534.806403] usb 1-1: Manufacturer: Realtek
[ 1534.806407] usb 1-1: SerialNumber: 012345678915
[ 1534.813589] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 1534.813714] scsi host0: usb-storage 1-1:1.0
[ 1535.851141] scsi 0:0:0:0: Direct-Access     Realtek  RSH-329-RTL9210B 1.00 PQ: 0 ANSI: 6
[ 1535.851452] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 1535.865573] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[ 1535.867429] sd 0:0:0:0: [sda] Write Protect is off
[ 1535.867433] sd 0:0:0:0: [sda] Mode Sense: 37 00 00 08
[ 1535.869407] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 1535.894043]  sda: sda1
[ 1535.905733] sd 0:0:0:0: [sda] Attached SCSI disk

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 1
  • Comments: 16 (2 by maintainers)

Most upvoted comments

I investigated this issue a little bit further. The enclosure is based on a RTL9210 Chip. It works flawless with UTM when attached by an USB-2.0-only Cable or when connected over an USB 2.0 Hub. Switching between USB 3.0 (XHCI) and USB 2.0 does not change the behaviour. issue_3995

There is no issue when I connect this case to a virtual machine running on either „Parallels“ or „VMware Fusion“. The Linux Distribution used does no matter.

Getting same issues in UTM 4.1.5 in App Store. Using NVMe enclosure: Having issues with copy/paste from UTM to paste dmesg output. However, exact same error that c-goes posted above.

I think the issue is in “usb usb3-port3: attempt power cycle”. The way macOS support attaching USBs in VM does not allow the USB device to reset or be power cycled.