News for hackers. Stuff that matters.
Re:USB-C Has Finally Come into Its Own by Ididntdothis on Thursday October 10, 2019 @05:39PM (#21219452)
Does anybody know why there are no USB-C hubs? With USB-A there are hubs that have four or eight USB-A outputs. But with USB-C I can’t find any hubs that have four USB-C outputs. Some have four USB-A but none have four USB-C output. Pretty strange and quite a loss of functionality.
Re:USB-C Has Finally Come into Its Own by nespressoAnger on Friday October 11, 2019 @10:09AM (#21224497)
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?

Re:USB-C Has Finally Come into Its Own by cesarb on Friday October 11, 2019 @10:48AM (#21224884)
From 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).

Re:USB-C Has Finally Come into Its Own by nespressoAnger on Saturday October 12, 2019 @12:43PM (#21234455)
Since 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.

Re:USB-C Has Finally Come into Its Own by cesarb on Saturday October 12, 2019 @02:25PM (#21235136)
You seem to be confusing the billboard device with the alternate mode negotiation. The billboard device is a normal USB device which shows up once the alternate mode negotiation times out. The alternate mode negotiation happens on the configuration pins over the USB-PD protocol.

The alternate mode discovery is initiated by the host, so the only way the hub could change which alternate modes it supports would be to disconnect from the host (unplugging all the devices on it, which would be particularly bad if some of them were storage devices).

(Also, I believe HDMI alternate mode with USB 2.0 is possible. The only alternate mode I know of which changes the meaning of the USB 2.0 pins is VirtualLink, which uses them for USB 3.x instead.)

Re:USB-C Has Finally Come into Its Own by nespressoAnger on Saturday October 12, 2019 @11:52AM (#21234072)
Exactly, 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.

Re:USB-C Has Finally Come into Its Own by Ididntdothis on Friday October 11, 2019 @10:31AM (#21224708)
Thanks! 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.
Re:USB-C Has Finally Come into Its Own by shantly on Thursday October 10, 2019 @05:43PM (#21219481)
Guesses:

1) not that many people have four USB-C devices they need to plug in at once (unlike USB-A),

2) it'd probably be super expensive and in some cases impossible to support all the abilities of USB-C across 4 ports, leaving only some small subset of capabilities available on all four and maybe forcing you to not use some of the ports at all if one or two of them have higher-end capabilities and you're actually using them for that. Experience is probably confusing and frustrating at best—and expensive anyway.

Re:USB-C Has Finally Come into Its Own by cerberusss on Friday October 11, 2019 @02:53AM (#21222134)
Apple sold them for a certain period, made by Belkin.

https://www.amazon.com/Belkin-Linksys-B2B153-04-BLK-4-Port-D...

Re:USB-C Has Finally Come into Its Own by nespressoAnger on Friday October 11, 2019 @10:13AM (#21224535)
Technically, yes.

But I would point out that the linked device has 1 USB-C Power Delivery pass-through, 1 USB-C data port, and 2 USB-A ports.

Nobody has yet shipped a USB hub with more than 1 USB-C downstream data port.

Re:USB-C Has Finally Come into Its Own by cerberusss on Friday October 11, 2019 @02:24PM (#21227002)
I linked the wrong one. I'm very sure that with the introduction of the (USB-C only) MacBook Pro, they sold a hub with an upstream USB-C port, and four downstream USB-C ports. After some time, it wasn't available anymore.

It was bus-powered, so I'm pretty sure it was simply a bunch of USB-C ports that offered no more than USB 3.0 and that didn't support USB-PD.

Can't seem to find it anymore.

Re:USB-C Has Finally Come into Its Own by cerberusss on Monday October 14, 2019 @02:07AM (#21245627)
Re:USB-C Has Finally Come into Its Own by EwanToo on Thursday October 10, 2019 @06:27PM (#21219830)
I've seen statements (that I can't verify) that chip support doesn't exist yet for additional usb-c ports.

I guess negotiating the bandwidth and power delivery would be pretty complex

Re:USB-C Has Finally Come into Its Own by cerberusss on Monday October 14, 2019 @02:06AM (#21245624)
Found one! Not sure of which countries this brand is sold, though.

https://www.sitecom.com/en/usb-c-hub-4-port/cn-386/p/1881

Re:USB-C Has Finally Come into Its Own by xenadu02 on Friday October 11, 2019 @03:34AM (#21222318)
Supporting the alternate modes, Thunderbolt 3, power delivery, etc with a hub isn't trivial. Thunderbolt requires a PCI bridge for starters.

It is highly likely any such hub would be a USB-3.x hub only but wouldn't support power pass-through properly, you wouldn't be able to connect your monitor to it, etc.

Re:USB-C Has Finally Come into Its Own by zifutreiua on Thursday October 10, 2019 @06:42PM (#21219922)
Maybe there is no market for them yet?

Besides phones and laptops there are not many USB-C devices out there yet. And you don't connect phones and laptops to hubs (as a guest, not a host).

Re:USB-C Has Finally Come into Its Own by pfranz on Friday October 11, 2019 @02:52AM (#21222131)
Sony's pretty popular BT headphones, WH1000XM3, switched to USB-C about a year ago. I've noticed a bunch of external hard drives have, too. I picked up a micro-b to USB-C cable so I wouldn't need an adapter. Nintendo Switch was released in early 2017. It's difficult to even find chargers with more than 1 USB-C port.

Apple has been shipping laptops with only USB-C since 2015. Many people rely heavily on dongles and breakout boxes. A USB-C hub would be welcome even at a steep premium.

My guess is that all of the tech that tunnels through USB-C would be really difficult to hub or to share. Which is why the closest thing I've seen to a hub is a passthrough plus a USB-C for power.

Re:USB-C Has Finally Come into Its Own by greggman2 on Friday October 11, 2019 @02:02AM (#21221921)
> Maybe there is no market for them yet?

Then I guess the title "USB-C Has Finally Come into Its Own" is a lie.