News for hackers. Stuff that matters.
Re:USB3: Why it's a bit harder than USB2 by usr1106 on Wednesday October 07, 2020 @01:22AM (#24705533)
We are using Intel Realsense cameras in our product. Sometimes the USB connection fails completely, sometimes it is USB2 only and the camera cannot work. Sometimes a reboot helps, but sometimes power cycling is required. This is without plugging the cable, plugging adds its own unreliability. From reading the product support forums we are not alone.

As a SW engineer my interpretation has always been that USB3 speeds are just too high to work really reliably with consumer grade hardware. This article gives technical details that tell me I have been correct.

Re:USB3: Why it's a bit harder than USB2 by colechristensen on Wednesday October 07, 2020 @03:37AM (#24706088)
> As a SW engineer my interpretation has always been that USB3 speeds are just too high to work really reliably with consumer grade hardware. This article gives technical details that tell me I have been correct.

The last section of the article is the most relevant: the hardware, tools, and documentation for USB3 are of mediocre quality. The whole history of moving bits over cables is adding and adapting tricks for getting more and more data through, we’ve always been at the point where poorly implemented solutions would cause problems, and we’re several orders of magnitude away from it being possible for a novice to implement a hardware and software solution from scratch (bit banging a serial interface on a microcontroller GPIO is possible for a reasonable person to do in a week to achieve less than a megabit connection). Super fast data rates are all over and most of them are very reliable, USB isn’t up to the same quality. You can make any speed reliable and fool proof, you just have to do it.

Re:USB3: Why it's a bit harder than USB2 by segfaultbuserr on Wednesday October 07, 2020 @04:28AM (#24706324)
+1. It's true that designing an USB 3.0 PHY/controller is a serious challenge, and bad signal integrity in PCB design can cause many problems, but almost nobody implements one's own USB transceiver or controller from scratch. They're all standard off-the-shelf chips. If the PCB design is careful and a good cable is used, Layer 1 should be relatively stable.

A large number of problems appear to be bad hardware compliance, documentation, firmware or driver. For example, I have a PC with an early Renesas USB 3.0 controller. Once in a while, the controller could become completely unresponsive. The reason was that the controller has a firmware bug, and you can actually get some reverse-enginnered firmware update tool on GitHub to fix it.

Re:USB3: Why it's a bit harder than USB2 by jk700 on Wednesday October 07, 2020 @07:58AM (#24707310)
Bad hardware compliance is only part of the problem. With higher speeds all the user facing stuff, like cables, connectors, power without noise - all start to matter too. You know how 100 mbit ethernet works well even with crappy connectors and crappy wires, you literally don't need even a twisted pair for it, but pushing gigabit ethernet over that doesn't work reliably anymore or even at all. It's very much a universal problem with higher speeds. And the notion that "you can make any speed reliable and fool proof" is just absurd denying physics.
Re:USB3: Why it's a bit harder than USB2 by fpoling on Wednesday October 07, 2020 @10:14AM (#24708415)
Well, you can use fiber optics. For their VR headsets Oculus sells 5 meter USB cable that uses that internally with optical<->electrical transformers inside the connectors.
Re:USB3: Why it's a bit harder than USB2 by segfaultbuserr on Wednesday October 07, 2020 @06:50PM (#24713733)
> But pushing gigabit ethernet over that doesn't work reliably anymore or even at all. It's very much a universal problem with higher speeds. And the notion that "you can make any speed reliable and fool proof" is just absurd denying physics.

I'm not denying physics. Funny that you use Gigabit Ethernet as an example... I'm still debugging a hobby Gigabit Ethernet project. For some complicated reasons, It has to use a standard BASE1000-T PHY, but instead of communicating over a CAT-6 cable, it has to communicate over the circuit board backplane. Previous prototypes couldn't even reliably auto-negotiate. Apparently, in Ethernet, not only a long cable and heavy attenuation can be the problem, an extremely short link with low attenuation can also confuse the "Feed-Forward Equalization" DSP algorithm in the PHY and create problems. I totally understand the inherent challenges of high-speed designs and have some hand-on experience.

But I have to say, yes, you can make any speed reliable, given a controlled environment and a reasonable technical constraints. It's called engineering. Howard Johnson (the author of the famed engineering handbook High-Speed Digital Design - A Handbook of Black Magic), in a 1997 article on Gigabit Ethernet, which he heavily involved in its standardization, he discussed its enormous challenges [0]...

> Key ingredients in any Gigabit Ethernet design will include:

> Careful control of clock skew on the 125-MHz 10-bit bus.

> Attention to crosstalk between massive, 125 MHz TTL-level parallel buses and critical high-speed serial circuits.

> EMI considerations on the serial cables (if you are not an expert in this area, I suggest choose fiber)

> Huge pin counts, especially on complex switching or routing ASICS, some of which will be using 512-bit bus interconnections

> More than usual emphasis on time-to-market; everybody will want their products ASAP

> If you thought Fast Ethernet 100BASE-T layouts were tricky, think again. Gigabit Ethernet is going to be faster, with more parallel signals, and tighter layout constraints.

However, he also said,

> It will work, and it will work reliably, but you will have to follow the rules.

You can make any speed reliable within a reasonable engineering constrict, and in a controlled setup. Using off-the-shelf PHYs and controllers, doing hardware compliance testing, and installing good cables are all supposed to create this controlled setup. Failures to do so is what we call "hardware compliance problems". I agree that it's definitely not foolproof. Saying it is would be denying physics, but I didn't say that. EMI/EFI is a serious problem for USB 3.o. I'm only saying that a lot of USB 3.0 problems in practice is bad hardware compliance, true electrical problems can be fewer.

[0] http://www.sigcon.com/Pubs/straight/gigabit.htm

Re:USB3: Why it's a bit harder than USB2 by ladberg on Wednesday October 07, 2020 @03:27AM (#24706041)
I've had nearly the same experience! I was working on a project for a robotics class and my team could not figure out why our object tracking went from 30fps to ~5fps seemingly randomly. It turns out the USB3 cable wasn't fully plugged in and couldn't make full contact so it was running on USB2 and didn't have the bandwidth to send the video at 30fps.

It took a while to debug because I was absolutely convinced the slowdown was a software or GPU issue. After all, wouldn't you expect most digital ports to be binary: either be plugged in or not? It turns out with USB3 there's a third state.

Re:USB3: Why it's a bit harder than USB2 by usr1106 on Wednesday October 07, 2020 @08:41PM (#24714475)
> After all, wouldn't you expect most digital ports to be binary: either be plugged in or not?

No. USB-A plugs for 2.x have 4 contacts that extend close to the outer edge. USB-A plugs for 3.x have additional 5 contacts close to the inner edge. If you don't insert the plug fully, you physically just get a USB 2.x connection. Nothing magic there.

https://www.techspot.com/guides/235-everything-about-usb-30/

There are more subtle problems with 3.0.

Re:USB3: Why it's a bit harder than USB2 by Isthatablackgsd on Wednesday October 07, 2020 @12:04PM (#24709564)
> it was running on USB2 and didn't have the bandwidth to send the video at 30fps.

Mmm, I am surprised about that because USB 2.0 is fully capable of 1080p60 without issues. I have Logitech C910 and it does 1080p60 flawlessly. I wonder if it is not actually 2.0 but USB 1.1 which made sense since the transfer rate is abysmally low (1.1 does up to 12 Mbps, 2.0 is up to 480 Mbps).

But again, computers does have their quirks and can do weird & strange things that seem impossible but it is possible.

Re:USB3: Why it's a bit harder than USB2 by usr1106 on Wednesday October 07, 2020 @12:41PM (#24710009)
> Mmm, I am surprised about that because USB 2.0 is fully capable of 1080p60 without issues. I have Logitech C910 and it does 1080p60 flawlessly. I wonder if it is not actually 2.0 but USB 1.1 which made sense since the transfer rate is abysmally low (1.1 does up to 12 Mbps, 2.0 is up to 480 Mbps).

I am not who you were responding to, but I can confirm that at 480 Mbps our Intel Realsense does not work, 5000 Mbps are mandatory. We use an Infrared stereo mode at 30 fps. I am not a my desk now and don't remember the exact details by heart.

Re:USB3: Why it's a bit harder than USB2 by rasz on Thursday October 08, 2020 @11:19AM (#24719892)
>USB 2.0 is fully capable of 1080p60 without issues. I have Logitech C910 and it does 1080p60 flawlessly

mjpeg compressed

https://telestreamforum.forumbee.com/t/6363z0/psa-windows-10...

Re:USB3: Why it's a bit harder than USB2 by rangibaby on Wednesday October 07, 2020 @08:59AM (#24707692)
> After all, wouldn't you expect most digital ports to be binary: either be plugged in or not?

It's always a good idea to have a known-good extra cable or two and laptop that you know has good ports. All the time and frustration you will save is definitely worth the hassle.

Re:USB3: Why it's a bit harder than USB2 by raxxorrax on Wednesday October 07, 2020 @04:12AM (#24706248)
Full HD raw image data nets you about 5.something FPS on ~480 mbit/s USB2, which already hits physical limits. Higher standards basically just increase the number of data lanes, but we still call that serial.
Re:USB3: Why it's a bit harder than USB2 by MrBuddyCasino on Wednesday October 07, 2020 @03:06AM (#24705967)
Apple/Intel Thunderbolt does not have this problem in my experience. USB has always been the cheapest alternative (remember Firewire?). Add to that the sheer incompetence of the USB committee (see the USB PD spec, or USB Audio) and its a miracle anything works at all.
Re:USB3: Why it's a bit harder than USB2 by baybal2 on Wednesday October 07, 2020 @04:56AM (#24706430)
> Add to that the sheer incompetence of the USB committee

In contrast to the sheer idiocy of demanding a "pocket change" fee of $1 per port, which made FireWire an instant turnoff for most device makers not targeting Western markets, and singlehandedly killed FireWire as a standard.

FireWire was possibly better engineered, but USB was better marketed.

Re:USB3: Why it's a bit harder than USB2 by throwaway9870 on Wednesday October 07, 2020 @07:40AM (#24707218)
> FireWire was possibly better engineered, but USB was better marketed.

Yes, perhaps, but it had a big drawback. You could not build a Firewire device with a single die because of the high voltages. This added cost to the USB device (memory stick, etc) meant it would never be price competitive with USB. I was a member of a USB working group and was amazed when a member from a large Japanese company explained that to me. Up to that point, I had not been exposed to the low-end (as in price) of the USB market and didn't realize the significance of this issue. These manufactures would bring the 5V straight into their IC and drop the voltage on-chip. That is actually fairly difficult in the age of such small chip geometries, but basically impossible for Firewire which is 8V to 30V. The USB market is driven by the low-end, so Firewire never had a chance because of an engineering specification.

Re:USB3: Why it's a bit harder than USB2 by chungus_khan on Wednesday October 07, 2020 @08:46AM (#24707617)
This isn't brought up enough when people talk about FireWire and "good engineering". Good engineering means practical engineering. It means things like choosing a sane, common voltage that is well suited to the already-existing real world. Picking 8V-30V is the kind of decision that sounds beautiful to a utopian engineer working high in an office tower, and I'm sure it would be lovely if we could have instantly warped into a world of full adoption, but here in the real world your standard is going to have to be useful today, and it's going to have to be useful with more than just brand-new top-of-the-line freshly designed kit. Any engineer who would willingly forgo access to the entire world of already-existing 5V ICs is not a good engineer in my books.

To be fair to them though, it's very easy to get caught up in the beauty of those theoretical designs and forget that the best-selling car is a Toyota Corolla, not a Lamborghini.

Re:USB3: Why it's a bit harder than USB2 by derefr on Wednesday October 07, 2020 @11:25AM (#24709200)
To nit-pick your analogy: is a Lamborghini really “engineered better” than a Corolla, in systems engineering terms? (I.e. the sort of terms a NASA program is budgeted in, when you have to consider the costs of potentially propping up your suppliers in the face of them collapsing, training your future employees to pass on institutional knowledge, etc.)

Or, to put that another way: is the total profit per Lamborghini sold really higher than the total profit per Corolla sold, after the CapEx and OpEx of any maintenance + spare-parts supply logistics + recall costs + training + supply contracts + etc. are taken into account? (I would assume, if it were, Lamborghini would have a higher market cap.)

Re:USB3: Why it's a bit harder than USB2 by chungus_khan on Wednesday October 07, 2020 @12:02PM (#24709545)
I think that actually strengthens my analogy (and was really my point).

A Lamborghini is full of flashy, pie-in-the-sky engineering that often ignores practicality in favour of flash and performance. On paper, it's a beautiful machine, but much like in the case of FireWire, it doesn't meet eye to eye with the real world around it.

The Toyota is less ambitious, more constrained by reality, and while it certainly doesn't match the on-paper specs of the Lamborghini, it is in every way more practical and viable as a system.

I would consider the Toyota to be the better engineered of the two when looking at them as cars and not as toys, even though it lacks the technical wow factor.

Re:USB3: Why it's a bit harder than USB2 by derefr on Wednesday October 07, 2020 @02:02PM (#24710905)
I always understood Firewire to be a standard designed for complementary use-cases to USB. Firewire isn't an attempt at "USB but better" (though devices could theoretically be made to use it that way); it's an attempt at "powered SCSI, but smaller and more ruggedized." It's a professional-equipment port, designed—on the one hand—for devices like laptops that can't fit the older, full-scale professional-equipment port (like SAS or mini-XLR); and on the other hand, for manufacturers of high-BOM high-margin professional equipment, as an extra port they can slap onto their device to allow these portable devices to connect to them.

In that sense, Firewire is less analogous to a Lambo ("a better car"), and more akin to a truck. But a very tiny truck, designed for both off-roading and portability. Which is to say: an ATV.

An ATV isn't better at being a car than a car is, but it is better at being a truck than a car is (though worse at being a truck than a truck is.) But sometimes, especially in constrained environments (e.g. search-and-rescue in the Alaskan wilderness), a truck won't fit, and a car won't work. So you need an ATV. It's well-engineered for that particular set of constraints.

Which is also the deal with Thunderbolt: it's PCI-e, but smaller and ruggedized, for places PCI-e itself wouldn't work (like a laptop), but where you nevertheless still need PCI-e -alike performance and bus semantics.

Re:USB3: Why it's a bit harder than USB2 by chungus_khan on Thursday October 08, 2020 @09:22AM (#24718852)
FireWire actually predates USB, and was certainly seen as a competitor during the design process for USB. It was originally drawn up as a general-purpose serial bus, but with a particular eye at replacing external SCSI interfaces. Certainly it's designed to interface with all sorts of professional equipment, but even in this space that particular decision is a poor one because of the universality of 5V components. Early FireWire-equipped laptops varied wildly in actual voltage delivery capabilities, and even Apple's generally capped out at around 9V, and the standard is extremely awkward and expensive to implement on the device side for many classes of devices. The main issue is that devices have to be capable of handling unregulated voltage between 8V-30V. For high-end professional equipment this is obnoxious and expensive, but manageable, but it's a complete nonstarter for nearly all other equipment, and that meant that even as the price of implementing FireWire signaling went down, it couldn't expand into a bunch of spaces it was perfectly capable of working in (including lower-end versions of said professional equipment).

Even including an optional 5V power pin would have improved this situation, and could have put FireWire in a similar situation to Thunderbolt 3 now, capable of functioning with both high-end professional equipment and ordinary consumer devices.

Re:USB3: Why it's a bit harder than USB2 by mschuster91 on Wednesday October 07, 2020 @11:20AM (#24709154)
Joke's on FireWire in the end though, USB-C ended up with the abomination that is USB-PD plus a literal shitload of incompatible other power negotiation schemes (Qualcomm and Apple being the most notorious).
Re:USB3: Why it's a bit harder than USB2 by usr1106 on Thursday October 08, 2020 @02:55AM (#24716582)
So you give the technical reasoning to my long-standing intuitive claim: USB3 is too fast for consumer-grade hardware to be really reliable.

With engineering solutions like Firewire it could have been as fast and more reliable. But more expensive, i.e. not mass market or consumer friendly.

Re:USB3: Why it's a bit harder than USB2 by MrBuddyCasino on Wednesday October 07, 2020 @06:42AM (#24706925)
Yes, they were delusional. Economics trumps engineering, always.
Re:USB3: Why it's a bit harder than USB2 by stjohnswarts on Wednesday October 07, 2020 @08:26PM (#24714400)
definitely. Accounting will almost always win the fight unless what they want completely renders the product useless. Apple is one of the few companies I've worked for where that wasn't always the case.
Re:USB3: Why it's a bit harder than USB2 by izacus on Wednesday October 07, 2020 @03:12AM (#24705992)
Yeah, we remember FireWire. And all the burned out FW ports due to poor power regulation on cameras and devices. I don't think I've ever seen a connection protocol more likely to damage a device on either end of the connection. USB is a massive imporovement here.
Re:USB3: Why it's a bit harder than USB2 by crest on Wednesday October 07, 2020 @07:05AM (#24707048)
I remember powering two 3.5" 7200rpm from a single firewire port for years. Even a third disk daisy chained from a single port didn't require an external power supply. I miss the user experience made possible by the high bus voltage. USB PD is worse.
Re:USB3: Why it's a bit harder than USB2 by marcan_42 on Wednesday October 07, 2020 @07:00AM (#24707028)
FireWire is a much better design than USB in many ways. I still use a FireWire audio interface purchased not that long ago (though now it has to go through a Thunderbolt adapter).

The problem with USB 1 and 2 is that it was designed by insane committee. This resulted in stuff like those versions not using true differential signaling (like USB3 does) even though that was common technology at the time. Instead they have end of packets delimited by single-ended conditions. That, coupled with a single ground wire for power and data makes for a world of ground loop issues.

And then they made the frame rate 1kHz, which is right in the peak of human hearing sensitivity. And so, USB's terrible design is single-handedly responsible for a huge amount of, even most, noise and interference issues in audio systems involving it. Especially in low cost consumer hardware, but it has made its way into many professional productions. Any time you hear a constant 1kHz beep of interference, mixed with some fuzzy crackling, nine times out of ten that's a ground loop with USB and audio involved. It's everywhere once you listen closely. Headphone output on your laptop or phone is noisy when you access a USB drive, or has a 1k beep? USB. USB audio widget has background fuzz and a beep? USB. Slight 1k beep in the background of a news cast? Someone had the bright idea of using USB somewhere along the line.

It didn't have to be this way. Ethernet, SATA, plenty of other protocols use proper differential signaling and don't have this issue. How to do this properly was well established long before USB existed.

And to add insult to injury, while USB 2 specifies a transaction translator, so you can run USB 1 devices on a USB 2 bus, USB 3 does not. And so, while USB 3 devices don't have this problem any more, you can't plug in a USB 2 device into a USB 3 bus or a USB 3 hub. And nobody uses USB 3 for low channel count audio interfaces, so this problem will remain forever. Oh sure, you can plug it into a USB 3 port, which is actually a USB 3 port and a USB 2 port in one. And you can plug it into a hub labeled "USB 3" which actually has a whole USB 2 hub along side it in parallel. The communication from USB 2 devices remains USB 2 all the way to the host. And so, not only do USB 2 devices only get 480Mbps of total bandwidth on a USB "3" hub (minus a ton of overhead, because the protocol is terrible), it doesn't fix this issue! And did I mention USB 2 is impossible to galvanically isolate in any kind of cost-effective way?

I could go on and on about how the polled architecture causes performance bottlenecks, about how it's impossible to tunnel without unfixable corner cases, about how its latency requirements preclude lots of innovative ideas, about how the descriptor and device inquiry protocols are practically designed to guarantee that implementations are vulnerable and have exploitable bugs (yes, your USB stack is vulnerable. They all are. This is how the PS3 got hacked. And the Switch. And tons of other devices. USB developers like me know misbehaving USB devices crash hosts all the time).

I don't like USB.

Re:USB3: Why it's a bit harder than USB2 by Kliment on Wednesday October 07, 2020 @08:06AM (#24707363)
Someone actually hacked together a TT for USB3. It's unobtainium for mortals but it exists https://www.via-labs.com/product_show.php?id=96
Re:USB3: Why it's a bit harder than USB2 by marcan_42 on Wednesday October 07, 2020 @03:11PM (#24711562)
I'm aware; as you say though, sadly, it's unobtainium (and non compliant, so it's guaranteed to have compatibility problems with some devices and drivers).

Real transaction translators in USB 2 work with host cooperation and specific support for USB 1 devices in the protocol, while this is trying to do transparent protocol conversion. Sadly, due to USB's design, this runs into the same corner case problems as any other kind of tunneling.

The main problem is the polled architecture. Host asks device for data; translator has to reply immediately so it has to say there is no data yet and ask the device for data. Translator buffers data and delivers it to the host the next time it asks. Except the host is allowed to never ask, again. Now the translator has data it has to drop on the floor. Not good. And this all requires heuristics to decide what to do. It's a mess.

Re:USB3: Why it's a bit harder than USB2 by Pet_Ant on Wednesday October 07, 2020 @12:23PM (#24709781)
As a public service:

TT = Transaction Translator

Re:USB3: Why it's a bit harder than USB2 by shawnz on Wednesday October 07, 2020 @08:02AM (#24707339)
These factors don't come close to negating the incredible convenience that USB has afforded me over the last couple of decades. So, the committee must have done something right.
Re:USB3: Why it's a bit harder than USB2 by marcan_42 on Wednesday October 07, 2020 @03:15PM (#24711598)
Just because a technology is better than nothing or became popular doesn't mean it's good. There is plenty of bad engineering in the world that might be better than no engineering, but that doesn't mean we wouldn't have all been better off with a good design from the start.
Re:USB3: Why it's a bit harder than USB2 by shawnz on Wednesday October 07, 2020 @07:01PM (#24713822)
But it's not just better than nothing. It is good, even great. It does exactly what I need without issue and has worked reliably for me for decades. It may not be perfectly elegant and beautiful in every technical aspect of its design but that doesn't really matter to me.

You might say Firewire could have provided the same for me, but Firewire wasn't widely deployed or adopted. Therefore it could not have replaced USB for my use cases. That may not be a technical issue, but I don't really care as a user if the failure of Firewire is technical or not. Technical superiority is only a small piece of the puzzle. Plus, I think you are underestimating the technical advantages which led to USB's success (e.g. low cost).

Re:USB3: Why it's a bit harder than USB2 by usr1106 on Thursday October 08, 2020 @03:08AM (#24716651)
> It is good, even great. It does exactly what I need without issue and has worked reliably

USB1 and USB2 still work fine despite being less than ideal engineering. Tolerances are big enough at lower speeds. USB3 can be unreliable (e.g. for cameras) because limits set by the laws of physics get too close for cheap implementations. That's no longer good. Especially if we are forced to use that in professional set-ups, where a couple of cents or even Euros/dollars would not harm. The problem is now that you cannot put that tiny bit of money on the table and you get a reliable product. As the discussion showed even certified and known brands' USB3 products can be unreliable.

Re:USB3: Why it's a bit harder than USB2 by fomine3 on Friday October 09, 2020 @02:22AM (#24727353)
Some of these merits depends on DMA support on IEEE1394 but it's actually an security risk without separation by IOMMU that implemented on CPU since around 2012.
Re:USB3: Why it's a bit harder than USB2 by my123 on Wednesday October 07, 2020 @07:12AM (#24707079)
And the iPhone too... (checkm8 is... a USB stack bug)
Re:USB3: Why it's a bit harder than USB2 by scld on Thursday October 08, 2020 @10:55PM (#24726280)
The lack of isolation options is so brutal
Re:USB3: Why it's a bit harder than USB2 by mixmastamyk on Monday October 12, 2020 @04:42PM (#24759218)
> FireWire --> burned out ports

Sounds like it delivered what it said on the tin!

Re:USB3: Why it's a bit harder than USB2 by TonyTrapp on Wednesday October 07, 2020 @04:27AM (#24706310)
And USB being the cheapest option is the main reason why we finally have a connector and almost all hardware can agree on. Remember that even the fact that the original USB plug is not symmetrical is to due to cost savings - if they added four extra wires for symmetry, we might still not have USB everywhere.
Re:USB3: Why it's a bit harder than USB2 by MrBuddyCasino on Wednesday October 07, 2020 @06:43AM (#24706930)
> we finally have a connector and almost all hardware can agree on.

Do we?

Re:USB3: Why it's a bit harder than USB2 by horsawlarway on Wednesday October 07, 2020 @12:47PM (#24710077)
Yup. It's going to be a bit before it percolates through to lower price point devices, but I'm a very, very happy usb-c/thunderbolt user.

My phone, headphones, drawing tablet, personal laptop, work laptop, and monitors all plug in using a single port.

Not just for connectivity, but also for power.

It's incredibly liberating. Everything charges from the same charger, everything plugs together.

I vividly remember the days of trying to find the right wall wart for the right device. I can't tell you how happy I am that my work laptop and personal laptop can both share chargers. That alone would make me ecstatic. That my phone/headphones/tablet also all work with just that charger is candy on top. That my monitor can provide that power while also using the same cable for display in? Incredible!

There are absolutely still issues, and it requires more research than it should, but once it works, it's SO DAMN NICE that I simply can't imagine going back.

Re:USB3: Why it's a bit harder than USB2 by TonyTrapp on Wednesday October 07, 2020 @07:23AM (#24707141)
Compared to what we had at the dawn of USB - yes, absolutely.
Re:USB3: Why it's a bit harder than USB2 by josefx on Wednesday October 07, 2020 @03:16AM (#24706006)
Any external Thunderbolt device also gains direct memory access to your system, resulting in a list of related security issues. Of course speed over security is classic Intel.
Re:USB3: Why it's a bit harder than USB2 by segfaultbuserr on Wednesday October 07, 2020 @04:06AM (#24706226)
A few months ago, another HN user raised an objection to FireWire due to DMA attacks in another thread. I wrote a 1000-word response on why it's a valid but unfair criticism [0]. The same response is also applicable to Thunderbolt - DMA attacks are a symptom, not the problem (which is the lack of IOMMU).

[0] https://news.ycombinator.com/item?id=23991732

Re:USB3: Why it's a bit harder than USB2 by MrBuddyCasino on Wednesday October 07, 2020 @06:53AM (#24706989)
And even then, you might not want to activate the IOMMU, as the performance impact can be prohibitive in certain scenarios.

https://dl.acm.org/doi/pdf/10.1145/3230543.3230560 "For 64B DMA Reads it drops by almost 70% and even for 256B DMAs the drop is still a significant 30%".

Re:USB3: Why it's a bit harder than USB2 by segfaultbuserr on Wednesday October 07, 2020 @07:11AM (#24707073)
At least a choice exists here. For an external port on a laptop, degraded performance is better than a disabled/unusable port, or a hacked computer. And for an internal PCI-E device, it can be turned off if risk is acceptable.
Re:USB3: Why it's a bit harder than USB2 by MrBuddyCasino on Wednesday October 07, 2020 @07:27AM (#24707164)
Right. I think for most people, if it cannot be remotely exploited, its a non-issue and a deactivated IOMMU is the right choice. Once you really have to worry about an attack vector where your adversary has physical access, its a whole different game anyway and just flipping on the IOMMU won’t safe you.
Re:USB3: Why it's a bit harder than USB2 by josefx on Wednesday October 07, 2020 @08:28AM (#24707495)
> Once you really have to worry about an attack vector where your adversary has physical access

There is crack the PC open physical access and just connect a device to a readily available connection access. With the later the adversary doesn't even need physical access himself, he just needs an unwary victim.

Smartphones had been plagued by something as simple as a public charging station getting compromised when Android was configured to just grant access to the file system and debug interface without requiring user confirmation. Before that Windows stopped auto playing software because it was used to infect systems from compromised devices.

Re:USB3: Why it's a bit harder than USB2 by wtallis on Wednesday October 07, 2020 @03:32AM (#24706073)
Those DMA attacks can be blocked by the OS properly configuring an IOMMU. Intel stopped using IOMMU support on CPUs for product segmentation by the time Thunderbolt 3 arrived, and even before that it was difficult to find a Thunderbolt-equipped system that didn't have IOMMU capability.
Re:USB3: Why it's a bit harder than USB2 by josefx on Wednesday October 07, 2020 @04:58AM (#24706435)
> Those DMA attacks can be blocked by the OS properly configuring an IOMMU

Wikipedia seems to state no OS has managed to do so (as of 2019). Thunderbolt had been around since 2011.

> Intel stopped using IOMMU support on CPUs for product segmentation by the time Thunderbolt 3 arrived

So it couldn't possibly be made secure before 2015 and still wont be secure until $UNIVERSE_HEATDEATHDATE .

Re:USB3: Why it's a bit harder than USB2 by wtallis on Wednesday October 07, 2020 @08:35AM (#24707540)
> So it couldn't possibly be made secure before 2015

You're wildly misunderstanding things. Up to 2015, it was possible to build a new PC that lacked the necessary hardware features, primarily by choosing one of Intel's enthusiast-oriented overclockable CPU models (which used to have the IOMMU disabled for product segmentation reasons). But it was still very much possible to get all the necessary hardware features by selecting the next slower speed grade of the same chip, or by buying almost any pre-built system equipped with Thunderbolt ports. And since then, it's been almost impossible to build a PC that lacks the necessary hardware security features, because pretty much the only Intel CPUs still in production that lack IOMMU capabilities are Atom parts which aren't socketed and probably aren't used in any Thunderbolt-capable machines.

> Wikipedia seems to state no OS has managed to do so (as of 2019). Thunderbolt had been around since 2011.

You should read more carefully, and preferably follow the link to the source paper. That paper points out how Mac OS X started using the IOMMU to protect against DMA attacks in 2012, Linux and FreeBSD likewise have such capabilities, Windows pretty much doesn't (no longer true).

The point of that paper cited on Wikipedia was to show that when operating systems poke holes in the IOMMU protection to allow certain devices to perform DMA, it's possible to open up a more exploitable hole than you might expect. In particular, data structures may need to be rearranged to align with the 4kB page protection granularity, or else information that should remain inaccessible to peripherals may be exposed alongside legitimate DMA payload. And it's also possible for a malicious device to spoof the device IDs of a trusted device type and be granted access by default, but that's a class of vulnerability that exists for plain old USB, too.

So as I originally stated, the IOMMU is the hardware feature needed to block DMA attacks. But it's only effective when used properly by the OS. That's not trivial—but also not impossible.

Re:USB3: Why it's a bit harder than USB2 by kps on Wednesday October 07, 2020 @10:04AM (#24708307)
> Intel's enthusiast-oriented overclockable CPU models (which used to have the IOMMU disabled for product segmentation reasons).

That doesn't seem obvious to me. Is there evidence it wasn't just binning?

Re:USB3: Why it's a bit harder than USB2 by wtallis on Wednesday October 07, 2020 @10:36AM (#24708671)
When parts of a chip are turned off for binning reasons, it's because those features take up a large area and those large units containing a defect can be disabled wholesale and still leave you with a usable chip. This usually manifests as disabling either whole cores, or substantial portions of last level cache memory.

Features like HyperThreading or IOMMU are integral to the design of functional units that aren't optional. Those features aren't implemented as separate physical regions of silicon that take up non-trivial space, so it's very unlikely that a defect could break HyperThreading without breaking the entire CPU core, or that a defect could break IOMMU functionality without breaking the entire PCIe root complex. Disabling features like this does not meaningfully change the fraction of dies that pass quality control.

The IOMMU in particular is probably not going to be affected by overclocking, because it's probably in the same clock domain as the rest of the PCIe IO stuff, and that clock domain doesn't usually get overclocked when the CPU or DRAM is overclocked. So there's no reason to expect IOMMU functionality to affect what CPU clock speed a given die can reach.

Re:USB3: Why it's a bit harder than USB2 by numpad0 on Wednesday October 07, 2020 @06:05AM (#24706751)
DMA stands for Direct Memory Access, and it is called so for the fact that the peripheral device directly read from or write to memory bus while CPU is not accessing it. So CPU internal states or protection are in theory irrelevant.

In a most rudimentary implementation, a device doing DMA is physically wired to the main memory in parallel with CPU. The device will set something like `data, addr, CS, WR = 0xCAFE, 0x1000, TRUE, TRUE` and send a clock pulse. Then when CPU comes back to check address `0x1000`, the data `0xCAFE` is magically “there”, so programs on CPU don’t have to waste cycles polling the device to get the value. Naturally, some arbitration is necessary because trying to change bus states from both sides will mess things up.

Above was probably the case until 1980s or 90s, and DMA in modern days instead goes through bus masters and memory controllers. Since it’s not going directly to physical RAM anymore, such controllers can be configured in such ways as to prevent unwanted accesses.

But it’s more of “can be used to protect against”, not “won’t be possible if done correctly”.

Re:USB3: Why it's a bit harder than USB2 by wtallis on Wednesday October 07, 2020 @08:08AM (#24707368)
> So CPU internal states or protection are in theory irrelevant.

Go look up what IOMMU means. We're not talking about a feature inside an individual CPU core, but in the PCIe Root Complex that implements DMA capabilities in the first place; it's the thing that sits between peripheral devices and the DRAM controller. That functionality is on the CPU die these days.

Re:USB3: Why it's a bit harder than USB2 by FpUser on Wednesday October 07, 2020 @05:38AM (#24706600)
I use thunderbolt gizmos for few things and would rather have the speed which I immensely enjoy. I can't live my life worrying about every step I make.
Re:USB3: Why it's a bit harder than USB2 by raxxorrax on Wednesday October 07, 2020 @02:38AM (#24705845)
This has also been a problem with USB2 cameras. The signal rates reach physical limits. A 5m cable is probably too long for high speed applications, most camera vendors say that they support only 3m. But if you have a camera in any rugged device, even a bit of EM (electro magnetism) can ruin your connection.
Re:USB3: Why it's a bit harder than USB2 by cpach on Wednesday October 07, 2020 @02:39AM (#24705853)
What does EM mean in this context?
Re:USB3: Why it's a bit harder than USB2 by tW4r on Wednesday October 07, 2020 @02:42AM (#24705869)
Based on the context I would guess it stands for electromagnetic interference
Re:USB3: Why it's a bit harder than USB2 by segfaultbuserr on Wednesday October 07, 2020 @04:14AM (#24706261)
Electromagnetism. On the other hand, obviously any electronic circuit, including USB, is electromagnetic. A more accurate choice of word would be EMI (i.e. electromagnetic interference), or EMC problems (i.e. electromagnetic compatibility problems).
Re:USB3: Why it's a bit harder than USB2 by oso2k on Wednesday October 07, 2020 @02:43AM (#24705876)
Probably short for Electromagnetism or short for EMF which is short for Electro Magnetic Field.
Re:USB3: Why it's a bit harder than USB2 by tinus_hn on Wednesday October 07, 2020 @05:40AM (#24706608)
If it starts working again after a reboot it’s a problem that can be solved in software. It’s just hard so consumers instead have been trained to accept unreliability.
Re:USB3: Why it's a bit harder than USB2 by tonyedgecombe on Wednesday October 07, 2020 @08:48AM (#24707630)
Consumers drive this by buying the cheapest device that just about works.
Re:USB3: Why it's a bit harder than USB2 by Pet_Ant on Wednesday October 07, 2020 @12:30PM (#24709870)
Manufacturers aide this by not making their devices apples-to-apples comparable and using brand specific marketing terms. Worrying about buying something from a better brand that is the same thing but marked up is real.
Re:USB3: Why it's a bit harder than USB2 by echelon on Wednesday October 07, 2020 @05:23AM (#24706539)
> We are using Intel Realsense cameras in our product.

That's an interesting domain. What are you working on? Any reason for choosing Realsense over Azure Kinect or other sensors?

Re:USB3: Why it's a bit harder than USB2 by kypro on Wednesday October 07, 2020 @09:16AM (#24707824)
As someone who was involved in a RealSense project I might be able to answer...

Firstly, RealSense cameras are really affordable. I think the cameras we were using were around $80 a piece. Cost was an important consideration for us because we were building a multi camera device and to do something similar with Azure Kinect would have cost us several thousand dollars.

Another thing we like was how great the Intel RealSense SDK is. They have official wrappers for multiple languages along with sample code to get you started.

The RealSense ecosystem is quite healthy too – at least for a niche technology. RealSense cameras have a proven track record in various commercial devices and the development forums are fairly active. We found we could find answers to most common questions and problems we had.

Another nice thing about RealSense is that they have a great range of cameras so they have something perfectly suited for every application. For example, some of their cameras use stereo vision while others use LIDAR or structured light. They also use the same SDK for every camera which makes swapping out cameras fairly easy. We were using structured light cameras, but we were able to swap them out with Stereo and LIDAR cameras with no problems at all.

Azure Kinect looks interesting. I've wanted to play around with one of a while, although given its price and feature set it wouldn't have been the right camera for us. It's probably a good all-rounder for general robotics / vision projects though.

Re:USB3: Why it's a bit harder than USB2 by rubicks on Wednesday October 07, 2020 @08:45AM (#24707603)
I can always rely on our Intel Realsense cameras -- to magically transform themselves into USB 2.1 devices after a couple hours' use.
Re:USB3: Why it's a bit harder than USB2 by swiley on Wednesday October 07, 2020 @08:22AM (#24707461)
IMO: It's not the speed that's the problem, lots of consumer hardware has very fast networks/buses like ethernet. It's the huge number of states and the communication required to negotiate them.