by JohnBooty · 3y ago · 0 comments
I've resorted to physically labeling them with a Brother label printer.
For MacOS, here's a terminal snippet to determine the current charging capacity of a cable.
/usr/sbin/system_profiler SPPowerDataType | grep Wattage
This will tell you the charging capacity of your current cable+charger combo. In other words, a 100W charger + 100w cable will return "Wattage (W): 100". A 100W charger + 15W cable will return "Wattage (W): 15". A 15W charger + 100W cable will return "Wattage (W): 15".So, you kinda need a charger that meets or exceeds the power delivery of the cable you're testing. And I believe this relies on the cable's self-identified capacity via the e-chip or whatever, so it could be fraudulent if you have some dodgy cable from an unknown manufacturer? But it's better than nothing.
There is a lot of info in `/usr/sbin/system_profile`, not sure if there's other bits related to identifying USB-C cable capacity. I'm sure there has to be something.
It relies /sys/class/typec: https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-c... which does not always exist https://bbs.archlinux.org/viewtopic.php?id=274618 https://community.frame.work/t/tracking-controlling-power-di... https://www.reddit.com/r/UsbCHardware/comments/z92jgf/when_d... etc.
Some things never change haha
It should be under Hardware -> Power, in the section titled "AC Charger Information".
You should also be able to see connected USB-C cable capacity under Hardware -> USB. For example, mine says the following:
USB 3.1 Bus:
Host Controller Driver: AppleT8112USBXHCI
USB3.0 Hub:
Product ID: 0x0813
Vendor ID: 0x2109 (VIA Labs, Inc.)
Version: 90.11
Speed: Up to 5 Gb/s
Manufacturer: VIA Labs, Inc.
Location ID: 0x01200000 / 2
Current Available (mA): 900
Current Required (mA): 0
Extra Operating Current (mA): 0
USB2.0 Hub:
Product ID: 0x2813
Vendor ID: 0x2109 (VIA Labs, Inc.)
Version: 90.11
Speed: Up to 480 Mb/s
Manufacturer: VIA Labs, Inc.
Location ID: 0x01100000 / 1
Current Available (mA): 500
Current Required (mA): 0
Extra Operating Current (mA): 0Much like GP I've taken to labeling newly bought cables with a label maker to avoid wasting them in the future due to being unknown.
I mostly care as my current monitor requires HDMI 2.1/Display Port 1.4 and going through my random cables drawer was extremely tedious. As I had way to many cables.
Every cable is a 60 watt cable by default. 20 volts, 3 amps.
Cables designed for 5 amps have a marker chip in them. If they follow the old spec they support 20 volts, and if they follow the new spec they support 48 volts. There's not much incentive to fake these because you still have to put a chip into it and 60 watts is fine most of the time.
Depending on the combination of host and device, that would be 4.5W for standard USB 3, 2.5W for USB 2, up to 7.5W for USB Battery Charging (BC), or possibly more for non-USB-C PD (highly unlikely, since it would require legacy PD signalling on the voltage pins, which almost no USB-C devices support as far as I know).
I strongly suspect it's USB BC, rounded up to 8W by Apple.
As an aside: Apple's USB power controllers used in their laptops are surprisingly flexible based on my observations: In addition to the obvious USB-PD, they support at least USB BC and Apple's proprietary USB-A resistor-based protocol. I was able to successfully charge a MacBook Pro at 12W and even 5W supplied by an old iPad/iPhone charger and the appropriate combination of adapters once.
This is doubly frustrating in that it shows that it’s clearly available to the OS (and not handled by a lower layer controller), but also leaves the faint hope that Apple might implement just such a feature in the future.
Get a cable with a watt meter display included. I use that on my Fold: https://csdvrx.github.io/ section 0.4 : https://csdvrx.github.io/X1_Fold_(20RL_20RK)_Optimization/pa...
Such cables cost about $10 on amazon, or $2 on aliexpress. Amazon link for the reference: https://www.amazon.com/Charging-Display-Braided-Compatible-G...
Using a calculator like at https://www.omnicalculator.com/physics/wire-size a 1m cable with a relatively user friendly max wire temp of 40c asks for a diameter of 0.6mm. Looks like there is 4 VBUS pins and even tho it's reversible I imagine for full power it requires all 4 (or all 4 must be connected to "support" the spec).
In theory you could have reduced wire diameter and spread current across the 4 VBUS wires, or have a single wire of the correct diameter and then connect to all 4 VBUS at the connector but everything is stranded wire in those cables anyway and I assume there's some complex maths to do to figure out the best for it.
It is super freaking cool, though. It makes me wonder if many household appliances can't just use usb c. I don't know how much further they can raise the voltage beyond that though seeing as there's all the electrical safety rules on conductor spacing etc to avoid arcing/flash over.
I once mixed up two different netgear router power plugs - a new version and an older version. I had the newer netgear router hooked up to the old plug - which gave slightly less amperage - and everything worked fine until it would randomly die. It took me a long time to figure out that it was dying when it was under load and trying to pull more power than was available.
Also I like to note the cable length on the label, measured by myself since manufacturers always count the connectors on the total cable length and on some of them that can add up to almost 10cm
To you have a matrix - charging speed and capability.