Hacker News new | past | comments | ask | show | jobs | submit login

Not an EE, possibly a dumb question, but... do USB-C devices know that a cable has been plugged into them before the other end of the cable is plugged in to something else?



I recently got a new workstation at work that is a MacBook Pro that connects to 2 monitors via USB-C.

I've learned somewhat superstitiously that if I don't connect and disconnect the USB-C cables in the right order the laptop may stop responding and I have to do a hard reboot. I thought this solved the problem but even now it still occasionally happens.

Your question makes me wonder if something like this isn't the cause (Mac misreading USB-C signal).


Based on my experience with a pre-USB-C Macbook connected to multiple monitors, USB-C is not at all required to get them to do strange things, up to and including hard crashing, depending on the order and speed of connecting monitors and sleeping the system.


If all devices actually follow the standard, then yes, a device should be able to detect a cable was plugged in even if the other end is disconnected. The trouble is finding compliant hardware, I fully expect it will be at least 2 more years before we start seeing common hardware that follows the spec.


The plug can have (has?) resistors that let the socket "feel" it, even if the cable is not attached to anything.


Yes, the cables are active and can ID themselves when connected. Detection of another connected device (and orientation) is separate.

So yes, it is possible to detect which end gets connected first, but this absolutely shouldn't have any side-effects. It is unintuitive and fragile (if the 'master' device restarts, it will think the other end connected first, suddenly becoming 'slave').


Just imagine this: Device A <--> Device B

Device A receives the cable first, upon receiving the cable, Device A notices that the cable is not "hot" ("hot" in the sense that there is voltage/activity on the wire), so then Device A decides to "turn on" the cable, make it "hot".

Now Device B receives the cable, it notices that the cable is already "hot" and decides that it must be the second device.

I would imagine it could work that way,

Im also pretty sure that the usb cables are "dumb" cables and not active cables like QSFP (these have chips at each end).


This is not how USB Type C works. The cables are active (chipped), and the end devices have sense resistors. Each device can detect the presence and type of the cable, as well as the presence and type of an end device and total cable orientation (swapped or not).

This is all done before power is applied, as USB Type C is very explicit about not going hot (apart from a weak 5V V_conn for powering the cable).

Also, QSFP is not a cable, but a pluggable spec. A QSFP module is active, but the fiber optic cable you connect to it to is dumb. Link detection there works by sensing beam power.


That assumes a device can tell the difference between not hot and not there, which was the parent's question.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: