Do you have a USB4 device and a Thunderbolt enabled system? I need you

I know USB4 devices are very new, hence uncommon, so I may not get a reply. Fingers are crossed :slight_smile:

I’m at the point in coding an IOMMU parser where I need data I can’t get from my own hardware. Once I have the needed info I’ll post an UPDATE: section here so folks know it’s handled and another one when I have a github link to the working script.


Request:

If you have a system with:

  • Thunderbolt bus (don’t need Thunderbolt 4, 3 should do fine)
  • USB4 device(s) (any should work, net, storage, whatever)
  • (optional) Thunderbolt HUB
  1. Run these 2 commands (just doing this and not #2 or #3 is still very useful):

    A. echo "# 1.A" > ./1a.txt; ls -aFld /sys/bus/thunderbolt/devices/* >> ./1a.txt

    B. echo "# 1.B" > ./1b.txt; ls -aFld /sys/bus/usb/devices/* >> ./1b.txt

    NOTE: Make sure thunderbolt and USB4 dev are bound to the host (might need to echo 1 > /sys/bus/pci/rescan) … ie, don’t leave them attached to a running VM

  2. If you have one, attach the USB4 device to a lower generation USB-C port (ie, USB3.2 or earlier) (I don’t know if USB4/Thunderbolt mobos have lower speed USB-C ports)

    A. echo "# 2.A" > ./1a.txt; ls -aFld /sys/bus/thunderbolt/devices/* >> ./2a.txt

    B. echo "# 2.B" > ./2b.txt; ls -aFld /sys/bus/usb/devices/* >> ./2b.txt

  3. (optional) if you have a Thunderbolt dock, plug it into the Thunderbolt USB-C port and then attach the USB4 device to it (even better, also attach a USB3 or earlier device to the dock at the same time)

    A. echo "# 3.A" > ./3a.txt; ls -aFld /sys/bus/thunderbolt/devices/* >> ./3a.txt

    B. echo "# 3.B" > ./3b.txt; ls -aFld /sys/bus/usb/devices/* >> ./3b.txt

Take whatever results you have (files: 1a.txt, 1b.txt, etc) and submit them to me in whatever way is most convenient. A pastebin link reply here is great. Or a PM here. Or if you want, PM me and I’ll send you my email address and you can send me a .zip or .tar.gz archive.

What I’m looking for is the sysfs symlink path to each device, along with that device name, so if you see a bunch of stuff that seems extra in the symlink … it actually is needed.

Background:

I’m working on a script to associate attached devices by IOMMU grouping.

I’m at the point where I can output groups like this:

➤ group: 20
   └── 08:00.1 <USB> "Matisse USB 3.0 Host Controller" (AMD) [1022:149c]
       └── usb1 <usb> "xHCI Host Controller" (Linux kernel) [1d6b:0002] {1:1}
           ├── 1-1 <usb> "ITE Device(8595)" (ITE) [048d:8297] {1:2}
           │   ├── 1-1:1.0 <usbhid>
           └── 1-6 <usb> "USB2.0 Hub" [05e3:0608] {1:4}
               └── 1-6.1 <usb> "Patriot Memory" [13fe:1f00] {1:10}
                   └── 1-6.1:1.0 <usb-storage>
                       └── disk: sdk <iso9660> "label=ISOIMAGE"
                           ├── part: sdk1 <no filesystem> "type=Microsoft basic data"
                           └── part: sdk2 <vfat> "type=EFI System"

(ie, associated tree of IOMMU > PCI > USB > USB Device > Block Device > partitions)

I’d like to get this working with USB4 and Thunderbolt but … I have neither. The code should be mostly the same as how I parse /sys/bus/usb but I would like to see actual working examples to be sure I haven’t missed something in the way the structure is attached/named.

Still in need of data? Now that my eGPU enclosure arrived can now finally use actual PCIe devices instead of only the USB3 controllers integrated into all the TB controllers…