3 ms·
Because, unlike USB-A hubs, it's not clear what should happen when you plug in a new device. This is mostly due to the existence of alternate modes. For examp
by nespressoAnger 7y ago
Because, unlike USB-A hubs, it's not clear what should happen when you plug in a new device. This is mostly due to the existence of alternate modes.
For example, let's say you have a USB-C hub with 4 downstream ports and two USB devices plugged in. At least one of these is a 10Gbps USB 3.1 device. You plug in a USB-C -> HDMI adapter. Which of the following happens (and how does your grandmother diagnose the problem)?
1. Nothing.
2. The three existing devices detach from the bus and re-enumerate as USB 2.0 at 0.480 Gbps
3. The three existing devices continue to run as 3.0 devices, but only at 5 Gbps
4. The three existing devices continue to run as 3.0 devices at 10 Gbps
Explanation:
1. The hub does not support USB alt modes, so when an HDMI dongle is plugged in, the dongle is ignored.
2. The HDMI dongle is a passive alt mode device, requiring the use of all 4 high speed lanes. The other downstream devices are routed the internal USB 2.0 hub.
3. The HDMI dongle has an active Displayport -> HDMI converter inside, and uses only 2 of the high speed lanes, leaving the other 2 for USB 3.0 data. Since the other peripherals use the 2x 5Gbps USB 3.1 mode and only 1 lane is available in each direction, they revert to 5Gbps
4. Same as #3, except that the peripherals use the 1x 10Gbps USB 3.1 mode, so they continue to operate at 10Gbps with a single lane.
Ok, now 3 ports are occupied and you plug in a pair of USB-C headphones. What happens now?
1. Nothing
2. Your HDMI dongle stops working
3. Everything Just Works
Explanation
1. USB alt modes don't cover the case of a USB Audio Accessory and a Displayport accessory. Since you can't have both, your drivers ignore the new device
2. Same as #1, but your drivers prioritize the new device
3. Maybe your hub secretly has an audio codec inside, and is able to sync and source analog audio to any downstream port.
Bonus points: Ok, now what happens when you chain USB-C hubs? What happens when you try to plug in multiple HDMI adapters? Multiple audio accessories? When things don't work, is the problem the hub, the peripheral, or the drivers?
- Ididntdothis 7y agoThanks! This seems a major shortcoming with USB-C if you want to build docking stations. And it will get worse once everything uses USB-C. I have already converted my USB drives back to USB-A so I can use them with one hub that’s plugged into my laptop.
- cesarb 7y agoFrom what I've read of the official specification, the correct answers are: 1. Plug the HDMI adapter: almost nothing. The HDMI adapter enumerates as an USB 2.0 "billboard device". The operating system can read the descriptor from this device and present a pop-up explaining "you have to plug HDMI adapters directly". This is because, as far as I know, USB hubs can't pass through alternate modes (except for the new USB4 alternate mode, but that is less of "pass through" and more "the hub is a USB4 device itself"). 2. Plug the USB-C headphones: it depends on whether they are analog headphones using the "audio accessory" mode, or digital headphones presenting as an USB audio device. If they are digital headphones, it's the "everything just works" case; if they are analog headphones, it's the "nothing" case (unless there's something in the specification I missed where a hub can detect the "audio accessory" and warn the host, in which case you might get the pop-up explaining "analog headphones are not supported by this computer, even if you had plugged them directly"). Things change a bit with USB4. In the particular case where the HDMI dongle is an active DP to HDMI converter (which is probably the most common case, since from what I've seen computer support for the DP alternate mode is more common than the HDMI alternate mode, so most dongles will cater to that case), and the hub is an USB4 hub, it'll work as if it had been connected directly, since USB4 can tunnel Displayport (together with PCI Express and USB 3).
- nespressoAnger 7y agoExactly, and this is why there are no USB-C hubs. Users (even technical users on Hacker News) keep asking for a "USB-C hub". What do you think they mean by that? "I want to plug in all my USB-C crap" or "I want to plug in all my USB-C crap, except video dongles and some[1] audio dongles" All the use cases for an everything-except-alt-mode USB-C hub are already met by existing USB-A hubs[2]. [1] "And please don't give me an easy way to tell which headphone dongles will work ahead of time. The surprise and anticipation of seeing whether it works makes every plug-in event feel like my birthday." [2] Okay, okay, you do need USB-C connectors for 20 Gbps USB bandwidth. But I've never actually seen a 20 Gbps USB host, device, or hub in the wild.
- nespressoAnger 7y agoSince I can't edit my sibling post: I wanted to address your point about the "correct" answer, because it's actually not so simple: The billboard spec allows for a device to be both a DisplayPort 4-lane and a USB 2.0 device (This isn't theoretical--I have such a device in front of me. It's a passive DisplayPort + 2 port USB2.0 + microSD "hub"). The HDMI adapter I hypothesized in my second scenario is a passive HDMI adapter. You're correct that passive HDMI + USB2.0 is not possible, but substitute a passive DisplayPort for passive HDMI here and the idea is the same. In the third scenario I am hypothesizing an active 2-lane DisplayPort to HDMI adapter (These are also not theoretical--this is how the Apple "HDMI Multiport Adapter" works). The hub I hypothesized for scenarios 2 through 4 (which does not exist) is one that would be smart enough to do the following: 1. Recognize the video dongle's billboard 2. Send the host a "fake" billboard for "DisplayPort 2 lane + USB 3.0" or "DisplayPort 4 lane + USB 2.0" (as appropriate) 3. Re-configure the downstream USB-C as USB 3.0 or 2.0-only ports (again as appropriate) 4. Route DP to the dongle (perhaps via an internal DP -> HDMI converter, if the hub has one), Route USB 2.0 or 3.0 to the internal hub, and route the hub to the downstream USB-C ports. I don't recall if rewriting the billboard is allowed per the USB spec (I think it isn't). But you can see how it would be possible for a hub to support alt-mode routing, even if the spec doesn't formally define it.