News for hackers. Stuff that matters.
Re:PCIe trouble with 4TB Crucial T500 NVMe SSD for >1 power ... by kalleboo on Saturday December 28, 2024 @09:05AM (#42531129)
> It supplies 5v at up to 50mA from a sink device like a TV.

And USB is also only supposed to supply 100 mA until the device negotiates for more.

But literally every device in the real-world just wires the port to the 5V rail with 2 A overcurrent protection and your "dumb" USB-powered fan gadget can draw as much as it wants without any negotiation.

I can totally see TVs doing the same

Re:PCIe trouble with 4TB Crucial T500 NVMe SSD for >1 power ... by mschuster91 on Saturday December 28, 2024 @04:27PM (#42534907)
> But literally every device in the real-world just wires the port to the 5V rail with 2 A overcurrent protection

Except Macs, Macbooks, iMacs, I think also at least the Thunderbolt Display from <very many years ago>. They all have a software overcurrent protection that is very triggerhappy. No negotiation and it will whine and shut the offending device off, and same if the negotiated current draw is exceeded.

Might be worth a try somewhen when I'm rich enough to afford a dynamic resistor bank to verify all the characteristics...

Re:PCIe trouble with 4TB Crucial T500 NVMe SSD for >1 power ... by userbinator on Saturday December 28, 2024 @05:08PM (#42535230)
I've looked at Macbook (pre M1) schematics; they do the same as any other PC laptop. The USB power switches do not have adjustable current limits.
Re:PCIe trouble with 4TB Crucial T500 NVMe SSD for >1 power ... by kalleboo on Sunday December 29, 2024 @04:38AM (#42538861)
I've never had any issues running dumb USB loads off any of my MacBooks. Just tested it, no problem running 1.7 A of dumb resistors just soldered to the power pins with nothing on the data pins at all (not even the passive "apple charging" resistors) https://kalleboo.com/linked/usb-dummy-load.jpg

Macs will shut down a port if it goes over 2.4 A (IIRC) without USB-PD negotiation (mainly with the cable rather than the device).

But the USB standard says they should limit to 100 mA without USB 1.x negotiation, and it's not doing that.

Re:PCIe trouble with 4TB Crucial T500 NVMe SSD for >1 power ... by indrora on Sunday December 29, 2024 @03:47PM (#42542922)
> But literally every device in the real-world just wires the port to the 5V rail with 2 A overcurrent protection

Not quite. To be USB Compliant, you have to do some work here and there. There's about six different options. The most common is overcurrent detection, such as is seen in [1]. There is a whole specification built by USB-IF on how to handle higher current ("battery charge") situations, spurred by apple [2], with all sorts of weird corner cases [3].

Now, USB-C changes that and specifically calls out that a "compliant" downstream device has to negotiate USB PD or declare yourself a USB-2.0 type-C device. [4] It's not uncommon for newer devices that conform strictly to the USB4 specification to not even power a port that hasn't negotiated USB-PD or Legacy PD -- if you encounter devices that get weird when powered via a usb-c to usb-c cable but work fine on a usb a-to-c cable, you've seen someone skimp out on $0.00001 in resistors.

[1] https://www.microchip.com/en-us/development-tool/EVB-USB2514... [2] https://www.usb.org/document-library/battery-charging-v12-sp... [3] https://www.graniteriverlabs.com/en-us/technical-blog/usb-ba... [4] https://community.infineon.com/t5/Knowledge-Base-Articles/Te....