Tuesday, April 25, 2023

USB-C and the plague of grackles

Everyone knows "universal" USB-C cables are a hot mess -- different power and data speed ratings, charge-only cables, Thunderbolt or DisplayPort over USB-C, wave after wave of logo grawlix.
But at least we knew that the problem of which way do we plug it in was solved. USB-C cables were bidirectional and flippable, no sweat. Right?
Last week I bought a couple of USB-C cables:
Two USB-C cables with tags.
The tag says:
If you hook up a USB-C 2.0 peripheral to this USB-C3.2 extension cable and it doesn't work as you expected, flip the connector over and try once more. It happens as a result of the compatibility issue of USB-C protocols and you need to connect a USB-C 2.0 peripheral to a USB-C 3.2 port in a specific direction.
(The other cable has the same tag, except it's "...to this USB-C 3.1 extension cable" rather than "3.2".)
I twooted that photo and man, did people have a lot to say about it.

To be clear, these aren't regular USB-C cables. These are extension cables -- that is, male-to-female. That's where the trouble starts.
I suppose I should explain how I record-scratched here. It's simple enough: I use an iMac. The iMac has no front ports. Plugging my USB security key into the back of an iMac is a pain in the, um, backside. My USB keyboard has side ports, but they're recessed in such a way that the security key can't be used with them.
Fine, I said, I'll just buy this nice USB-C multiport hub and solve my problem. So I did. But the hub's built-in cable is six inches long! With my iMac up on a stand (I'm tall), its ports are seven inches above the desk.
This is not an acceptable solution.

(Yes, my computer stand is a Red Hat Linux reference manual. RH 5.2 if you must know. "My Mac runs on Linux!" is now a 25-year-old joke, and nobody's laughed once.)
So, long cable story short, I need a USB extension cable.
(Or I could buy the hub I've got, but with a 12" cable instead of a 6" cable. That would be in spec! But Belkin doesn't offer that option.)

The first thing I learn is that there's no such thing as a USB-C extension cable. The standard doesn't allow for it.
Or at least I think that's true? Several people in the Mastodon thread told me it was true. But of course I found that out after buying two of them! There's scads of extensions and adapters and gender-changers on the market. I have no problem believing that they're all dodgy, but how dodgy? Shrug.
I realize that we're years past the point of "just make the wires longer". Cables are micro-hubs these days; they have to negotiate all those power and data options with the host computer. I appreciate that they don't burst into flame, I really do.
Still, those warning tags are gibberish. Nobody cares about the difference between USB-C 2 and USB-C 3.1 and USB-C 3.2. People want to plug things in and they work. Once you say "You have to flip the cable in this specific situation," it doesn't matter what the situation is or how dodgy the connectors are. People just learn that USB-C sometimes doesn't work until you flip the cable, which means we're going to spend the rest of our lives unplugging and flipping cables to see if that fixes the problem.
However, TLDR, if you don't own a male-to-female USB-C cable you can skip this entire post. The "regular" male-to-male cables have no polarity issues. I think.
By the way, the warning was absolutely true. I plugged in the extension cable, and then I shoved my security key in the other end, and nothing happened. I pulled out the key and flipped it over, and that fixed the problem. My soul died that day, on schedule.

When I did the original twoot, I twitted EU regulators for mandating USB-C connectors.
Cause: EU regulators move to force everybody to standardize on USB-C.
Effect: USB-C starts to lose the features that made it minimally acceptable in the first place.
That was a joke. There is no cause-effect relationship. But this does underscore the basic annoyance of legislating technical standards, which is that legislation can't keep up with the technology. The standard can barely keep up with the technology! Look at this mess!
The ostensible point of the EU regulation is to simplify the confusion of chargers and cables and ports, but USB-C is a confusion of chargers and cables and ports. It's never going to be anything else -- unless USB-D sorts it out, but now there will never be a USB-D. All future USB specs will be called "USB-C". This is not a benefit.
But I feel like mandating a technical standard isn't just an error; it's a category error.
People think "Oh, a technical standard is a set of rules, and governments can make rules." But this is wrong! I've been involved with a lot of technical standards. Okay, standards about IF virtual machines, which are not very important in this big old world. But I know how the process runs.
A technical standard is an agreement about how to divvy up the bug reports. That's all it is! I plug in the stupid security key, and it doesn't work, so whose fault is that? The key's fault, the cable's fault, the iMac's fault, my fault? Whose responsibility is it to fix the problem? That's as far as the spec takes you.
If you think that a spec is a set of rules, then you have to respond to my dilemma by saying "That cable is against the law." Which is patently silly, but in fact several people said that to me!
I believe (I'm pretty sure) that the cable is a violation of the spec. Not because the manufacturer is incompetent, though. You can't make a male-to-female USB-C cable that works in all situations, because the agreements on How This Works are messy and full of compromises and they started with the idea that nobody would do this.
But people want these cables anyway! The spec can't make them not! Well, here we are with another compromise. Hey, the cable works in most situations. It's just this USB-C 2.0 compatibility blah blah corner case.

Oh, sure, there are lots of technical standards which are subject to government regulation. The wiring of electrical outlets -- buckets of legal requirements. Why? Because the bug reports go "My sister stuck a paper clip in the electrical outlet and fried herself like a pickle." This bug report is a wrongful death lawsuit! Of course the government is involved.
(I once did catch my sister sticking a paper clip in the electrical outlet. I think she was seven. Sorry, M__. I remember thinking "She's not dead, so that must be the cold side" very quickly before I yanked it out and shouted "No!" It was the cold side.)
Anyway, I suppose there could be a lawsuit over USB-C extension cables that you have to flip over to work right, but it won't be a very interesting one.
If I tried to recharge my phone through this extension cable, it might go really badly. That's where the micro-hub power-rate negotiation comes into play. Flames, headlines, interesting lawsuit, etc. I plan to not find out.

Oh, right, the grackles? Just an image. You see a spec as an infallible stone tablet handed down by the authorities. I see it as a flock of grackles flapping around screaming at each other. If everything is okay, they all settle down and peck at seeds and bugs in some kind of neighborly order. If not, they'll have to work it out.
A flock of grackles is called a "plague", but that's not their fault.


  1. Of course the reason we got this legislative… mess in the first place is because Apple, bless their hearts, has always insisted on having their own incompatible proprietary connectors and cables for their hardware. I'm sure it's because of the benefits to the user of magic Apple hardware, as it couldn't possibly be just because Apple wants huge proprietary markups on things like serial ports and battery chargers. So now the EU et al, a fun group, try to give the Apple consumer some exit strategy, and here we are.

    Hackaday has this excellent article on your issue: https://hackaday.com/2022/12/27/all-about-usb-c-illegal-adapters/
    It suggests that this extension cable https://thepihut.com/products/usb-c-extension-cable-for-raspberry-pi-4 should work in either orientation. Basically, the ones you bought are cheap knockoffs that aren't wired symmetrically; sigh.

    You should also be able to buy a USB 3 hub with a long USB 3 stub, or use a USB 3 extender. Then use a USB3 ←→ USB C adapter at your Mac to finish the cabling. This should be reliable, as the USB 3 spec is reasonable.

    1. I am well familiar with Apple's tricks, as you can tell by the photo of my desk. However, the Story Everybody Loves To Tell About Apple doesn't particularly match up with either reality (Apple chargers are all USB-C and third-party Lightning cables are cheap) or with the proposed solution (USB-C is the confusing solution with too many incompatible cables).

      The Hackaday article is useful. Thanks! But as I read it, it confirms that there really is no spec-compliant extension cable. You have your choice of hacky solutions, all of which fail to cover some situations. The tag I've got (also noted in the article) seems like the *narrowest* set of failure cases.

      > You should also be able to buy a USB 3 hub with a long USB 3 stub

      This is my current hope.

  2. I'm not sure what you're seeing in the Hackaday article? The cable I linked from there apparently has both CC pins forwarded, as opposed to only one in yours, and should work fine in either orientation as I understand it. https://community.silabs.com/s/article/what-s-the-role-of-cc-pin-in-type-c-solution

    It looks to me to be possible to build a valid, legal USB-C 3.2 extension cable back-compatible with earlier standards. It would require active circuitry at both ends to configure the cable, though, which would make it quite expensive. I'm assuming no one thinks there's a market for $40 USB-C extension cables that work right when $6 USB-C cables that "mostly work" are available.