News for hackers. Stuff that matters.
Re:Raspberry Pi 4 not working with some chargers by pavlov on Friday July 05, 2019 @08:43AM (#20362080)
Before we had separate ports and cables for power, USB and Thunderbolt. There was no way to plug the wrong cable in the wrong port.

With USB-C, we still have separate cables for these three types, but they all look confusingly the same. Not convinced this is an improvement.

Re:Raspberry Pi 4 not working with some chargers by arghwhat on Friday July 05, 2019 @09:41AM (#20362407)
Just to be entirely clear: While a cheap cable may be wrong, good (i.e. fully featured) cables will always work in all combinations.

Having gone all in on Type-C, I have only ever gotten a "bad" cable as a cheap charge cable, and have never had issues with cable incompatibilities.

Re:Raspberry Pi 4 not working with some chargers by nemetroid on Friday July 05, 2019 @09:52AM (#20362486)
> Just to be entirely clear: While a cheap cable may be wrong, good (i.e. fully featured) cables will always work in all combinations.

Per the spec, yes. But devices may have hardware design issues making this untrue, as in the article. As I understand it, the Pi 4 works correctly with cheaper cables, but not with more expensive ones:

> When combined with more capable cables (handling SuperSpeed data, or 5A power) this configuration will cause compliant chargers to provide 0V instead of 5V to the Pi.

Re:Raspberry Pi 4 not working with some chargers by arghwhat on Friday July 05, 2019 @09:57AM (#20362521)
> But devices may have hardware design issues making this untrue, as in the article.

Yes, but defective devices do not really go into the USB-C complexity consideration. They go into the trash bin.

We can't blame USB-C for people disregarding the spec, especially as this is not a hard part of it. We can only blame it for the fact that we do have different "classes" of devices, where the main way out is to only get the highest class.

Having run all-USB-C (and not using Apple products) for a few years now, I have never myself bumped into a product that was defective. Everything always worked as advertised.

Re:Raspberry Pi 4 not working with some chargers by amluto on Friday July 05, 2019 @10:31AM (#20362767)
I personally blame the spec for making it far too complicated to build compliant devices and far too easy to build non-compliant devices
Re:Raspberry Pi 4 not working with some chargers by snops on Friday July 05, 2019 @12:09PM (#20363593)
The spec does try and make it simple to build compliant devices for basic features. It's only if you want higher power or bandwidth than the existing USB 2.0 that you need any kind of digital logic.

For instance, a USB-C analog headphone adaptor is just some resistors and the connectors themselves, and a USB A-C cable just requires a single extra resistor so the USB C device knows there is a USB A plug on the other end and not to draw too much current. Unfortunately, dodgy manufacturers got even that wrong, see https://www.extremetech.com/computing/217556-google-engineer...

Re:Raspberry Pi 4 not working with some chargers by amluto on Friday July 05, 2019 @08:28PM (#20366932)
Simple to build simple devices is the wrong metric. The goal should have been that simple devices would be cheap enough at scale and, critically, the the correct way to build a simple device would be at least as easy as the lazy way that sort of works.
Re:Raspberry Pi 4 not working with some chargers by arghwhat on Friday July 05, 2019 @02:42PM (#20364752)
The spec sure is a mouthful, but I find strong evidence that the spec isn't at fault.

The reason is the most common type of error: USB type A to type C cables using a wrong termination resistor value, signalling far too high current. We're talking about a table of currents to resistors with 3 rows: Default USB current (56K), 1.5A (22K) and 3.0A (10K).

Now, if the mistake had been in the parts that deal with orientation detection, PD protocol, alternate modes, or just dealing with the high speed signals pumping up to 40Gb/s through these cables, then we could agree that it might be complicated.

But if you can't pick a resistor from 3 values, then I don't know how one would write a spec that would be readable to you.

EDIT: s/that\ the\ evidence/that\ the\ spec/

Re:Raspberry Pi 4 not working with some chargers by toomuchequate on Friday July 05, 2019 @10:49AM (#20362908)
Easy to say.

I can't imagine doing signaling and having to build a spec.

Re:Raspberry Pi 4 not working with some chargers by amluto on Friday July 05, 2019 @12:21PM (#20363677)
As far as I can tell, the spec could have been designed so that having so resistor at all would indicate a baseline cable. Since no resistor is cheaper than a resistor, the cheap cables would omit the resistor and all would be well.
Re:Raspberry Pi 4 not working with some chargers by cesarb on Friday July 05, 2019 @12:51PM (#20363946)
> As far as I can tell, the spec could have been designed so that having so resistor at all would indicate a baseline cable.

Isn't that exactly how the spec is? AFAIK, a baseline cable has no resistor, the resistors are on the devices on either end. Only "electronic marked" cables have a resistor, and that's where the RPi4 fails: they shorted together the pin which has the configuration wire to the other end (where the device on the other end has one of its pair of resistors) with the pin which on a baseline cable has nothing at all, but which on a more advanced cable has a resistor connected to ground. So when there's no resistor at all (baseline cable) it works; when there's a resistor, the current flows through a wrong path and the voltage ends up in the range for a different kind of device.

Re:Raspberry Pi 4 not working with some chargers by amluto on Friday July 05, 2019 @06:06PM (#20366274)
Nope. A compliant baseline USB-A to C cable contains a resistor.
Re:Raspberry Pi 4 not working with some chargers by arghwhat on Sunday July 07, 2019 @07:24AM (#20374591)
It could not. I presume that by "baseline", you refer to a USB2.0 Type A to Type C cable.

USB type C is designed to remain passive until it knows if something is connected, and what it is. For most cable types, orientation must also be detected.

This means that there must be something in the cable/plug. This could of course have been a short, but to do that, those pins would have to be dedicated to detecting dumb cables.

Having no pins to waste, a resistor is used instead, which allows not only allows for multiple values for detection, but leaves the pins usable for transmission while detect resistors are in place (Power Delivery, Alternate Modes).

And there is absolutely no issue in that resistor. Everyone found the table, but either failed to read the 3 values, or decided "Hey, more amps is better!", ignoring whether or not the type A end would actually be able to supply it.

Re:Raspberry Pi 4 not working with some chargers by barrkel on Friday July 05, 2019 @10:18AM (#20362669)
You started out saying that a good cable always works, effectively staking a position that you just need to get rid of bad cables.

Now you're saying that we need to throw out working devices so that we can ensure we only need good cables.

Re:Raspberry Pi 4 not working with some chargers by makomk on Friday July 05, 2019 @10:31AM (#20362772)
Any spec will always have some way of building devices that violate the spec but happen to work some of the time. There's no way around that, which means that blaming the spec and complaining that you "need to throw out working devices" isn't going to help you.
Re:Raspberry Pi 4 not working with some chargers by arghwhat on Friday July 05, 2019 @10:24AM (#20362718)
You were talking about how many combinations there were of cables, which is always solvable by choosing the good cables. There is no cable type for defective devices, so that does not change anything.

What the rPI did would be akin to a micro-USB device using data pins for power. Such device would be defective, and not "another type" of micro-USB.

Re:Raspberry Pi 4 not working with some chargers by KirinDave on Friday July 05, 2019 @10:28AM (#20362748)
The mistake they made is really easy to make accidentally. The USB-C spec is complicated and cables aren't marked. Many folks still don't know there are multiple types of cables.
Re:Raspberry Pi 4 not working with some chargers by arghwhat on Friday July 05, 2019 @02:48PM (#20364809)
To be honest, the complicated parts are not where the mistakes are made. Routing 40Gb/s is hard. Placing one or two resistors is not.

But agreed that marking could be better—maybe marking lower cables as "charge" cable somehow. At least Thunderbolt cables are distinctly marked, and will become merged in USB4.

Re:Raspberry Pi 4 not working with some chargers by KirinDave on Friday July 05, 2019 @10:26AM (#20362733)
I have done similar and I have devices that have USB-C ports and only charge on USB-A chargers using an A-to-C adapter.

If you haven't run into a device or charger that has quirks, I'm surprised and happy you're that lucky. I'm sure not.

Re:Raspberry Pi 4 not working with some chargers by jsight on Friday July 05, 2019 @10:46AM (#20362883)
Instead of throwing away your Pi4, could you please send it to me?
Re:Raspberry Pi 4 not working with some chargers by wildmusings on Friday July 05, 2019 @11:59AM (#20363507)
A good design accounts for all of these things. If your design assumes a world full of altruistic, hyper-scrupulous actors, then it’s no good.
Re:Raspberry Pi 4 not working with some chargers by soneil on Friday July 05, 2019 @12:45PM (#20363896)
> good (i.e. fully featured) cables will always work in all combinations.

AIUI, that's actually what's going wrong here. It only works if the charger+cable combo are both dumb enough. If there's enough fully-featured components to try to negotiate properly, the pi can't negotiate and it fails.

Using usb-c for power should have been a win. But they didn't - they just used a usb-c socket for power. There's a difference.

Re:Raspberry Pi 4 not working with some chargers by gambiting on Friday July 05, 2019 @12:34PM (#20363799)
I'd love to know then why my Nintendo switch(very expensive) doesn't charge at all when using the genuine OnePlus USB A-C cable(very expensive) and their own OnePlus charger(also pretty expensive). It's not just cheap mislabeled crap that sometimes doesn't work - it's proper hardware from big companies that failed the simple "if the cable fits then it has to work" test.
Re:Raspberry Pi 4 not working with some chargers by TiltMeSenpai on Friday July 05, 2019 @01:25PM (#20364179)
OnePlus has had their own proprietary charger game running for quite a while now. It's likely related to that. The Switch uses stock USB-C Power Delivery, so Macbook and Pixel chargers would be fine.
Re:Raspberry Pi 4 not working with some chargers by plttn on Friday July 05, 2019 @01:34PM (#20364237)
OnePlus doesn't use USB-PD, they use Dash Charge.

Blame OP, not Nintendo.

Re:Raspberry Pi 4 not working with some chargers by kevin_thibedeau on Friday July 05, 2019 @11:32AM (#20363304)
A compliant "full featured" cable could very well disable high voltage or high current negotiation. It's impossible for all cables to work in all combos.
Re:Raspberry Pi 4 not working with some chargers by sixothree on Friday July 05, 2019 @11:01AM (#20363009)
The problem with this "cheap cable" standard is that "cheap cables" can be the same price as "good cables".
Re:Raspberry Pi 4 not working with some chargers by ineedasername on Friday July 05, 2019 @02:36PM (#20364707)
Yeah, a place like BestBuy doesn't sell inexpensive cables, even though they're often of cheap quality, at least by my experience.
Re:Raspberry Pi 4 not working with some chargers by timw4mail on Friday July 05, 2019 @08:46AM (#20362099)
A fully-featured USB-C cable can be used for all of those functionalities, but the fact that there are lesser-featured cables is confusing, yes.
Re:Raspberry Pi 4 not working with some chargers by VBprogrammer on Friday July 05, 2019 @09:40AM (#20362400)
To be fair, I've cut open pound store USB-B cables before only to discover that they contained literally 2 strands of copper (Or at least I hope it was copper). The idea that people are trying to sink 2 amps down that type of cable is a bit frightening.

I guess the point I'm trying to make is, specs are great, but the reality is that there are infinitely many types of cable and the only thing which definitively defines the capabilities is physics.

Re:Raspberry Pi 4 not working with some chargers by KirinDave on Friday July 05, 2019 @10:37AM (#20362815)
Even bad USB cables are gonna have total resistances below 150mΩ, and that's including contact resistance on both ends. Unless you're shorting the cable inside the contacts (you do short pins to make USB deliver power, but upstream ports gotta spec for shorts anyways), even bad cables are unlikely to be a severe risk.

The nice part of DC is you get to use the entire cross section of the wire. So 2A at 5V isn't gonna start too many fires even on thin wire.

Now hopefully we don't see too many folks start using USB-PD 3 with crappy but compliant cables, as my comfort with DC drops as we go up into 20V 5A territory.

Re:Raspberry Pi 4 not working with some chargers by fortran77 on Friday July 05, 2019 @10:56AM (#20362956)
This isn’t quite right. High current at low voltages can start fires, too.
Re:Raspberry Pi 4 not working with some chargers by KirinDave on Friday July 05, 2019 @11:10AM (#20363078)
That's not really what anyone is talking about here. We're talking about if a USB cable itself could be an issue. For that to happen the cable would have to be shorted in a way that still coerced a USB upstream port to still deliver 2A. Even long and bad cables are going to have incredibly small resistances compared to any piece of electronics they're attached to that can make the USB port think that's okay. Which means that the majority of the energy dissipated in a USB short will likely be in the downstream electronics. You could probably use something besides copper and still have it be the minority of the resistance in a circuit that could get 2A.

If a USB device gets more current than it's supposed to get, it difficult not to blame the upstream power port for providing so much under the conditions of a short or the downstream port for not being designed correctly. Furthermore, when people see USB cables with "only 2 strands of wire" these are power cables where the data pins are shorted with a resistor, which locks a USB port to a more modest 500mA. That's definitely fine.

Re:Raspberry Pi 4 not working with some chargers by Filligree on Friday July 05, 2019 @12:44PM (#20363887)
In fact, ohmic (i.e. reistance-based) heating is entirely independent of voltage; it depends only on amperage. Higher voltage is only dangerous inasmuch as it may increase the amperage.
Re:Raspberry Pi 4 not working with some chargers by KirinDave on Friday July 05, 2019 @01:00PM (#20363996)
Which is why I pointed out the resistance of the cable relative to the other components. It's not where you're going to get resistive heating unless it's a full short and that's the dominant resistor. You may know, but USB-PD has a pretty smart design here that makes it harder for such a condition to occur.

I refers to the 5/20V fear only in terms of how safe I feel about handling such voltages.

Re:Raspberry Pi 4 not working with some chargers by 59nadir on Friday July 05, 2019 @11:47AM (#20363422)
USB-C in general was a pointless evolution of something no one had an issue with, IMO. It's as if someone looked at the state of things and said "Where can I invent an issue and solve it?".
Re:Raspberry Pi 4 not working with some chargers by tracker1 on Friday July 05, 2019 @01:31PM (#20364216)
I disagree on this... USB-C the connector, is great... having more than 2 varieties of feature/cabling alignment is pretty ridiculous. I get the need/desire for a cheaper option... I even kind of get the cheapest by default... but with USBC the cables should have been limited to lowest and highest spec, with maybe a DOT for one or the other on the end next to the USB logo indicating as much.