How does physical usb ports correlate to USB Controller

I have three USB controller and have attached each one to its own sys-usb named sys-usb-0, sys-usb-1, sys-usb-2.

I have a usb-c port on my laptop.

  • When I connect a usb-c drive to it, the device shows up in sys-usb-0.
  • When I connect usb-a drive using a usb-a to usb-c adapter the device shows up in sys-usb-2.

My question is how does physical usb ports correlate to usb controller? How does usb controller gets chosen?

Why do you think you have 3 usb controllers?

its in the devices list.

In devices list I have 4 devices but only 2 are actually USB port controllers.
2 others are internal part of first controller.

I have on bus:slot 00:0d - functions are listed as device in PCI devices but are part of one controler

00:0d.0 USB controller: Intel Corporation Alder Lake-P Thunderbolt 4 USB Controller (rev 04)
00:0d.2 USB controller: Intel Corporation Alder Lake-P Thunderbolt 4 NHI #0 (rev 04)
00:0d.3 USB controller: Intel Corporation Alder Lake-P Thunderbolt 4 NHI #1 (rev 04)

And on bus:slot 00:14

00:14.0 USB controller: Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller (rev 01)
3 Likes

Sometimes you will see 1 port with 2 controllers attached, to cover
different USB versions.

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

2 Likes

the sys-usb-0 has 00:0d.0, sys-usb-1 has 00:0d.2 and sys-usb-2 has 00:14.0

So, 00:0d.0 and 00:0d.2 is the same one controller

I am not expert, but the important thing is probably the IOMMU group of each device. If they are in the same group, then it might be unwise to put them in different VMs.

I see similar (not identical) devices all in one group in this post : https://forum.proxmox.com/threads/alder-lake-full-igpu-passthrough-audio-over-hdmi-stops-working-after-vm-reboot.155241/

I imagine it would be very unusual to have a single socket switching from one group to another… so not very surprising.

1 Like

Interesting moment, when he got each interface from every controller into his own IOMMU group.