Anyways, interesting post. It's always fun to discover how much hardware is just broken and doesn't actually correctly implement the protocols or features it's supposed to implement.
Anyways, interesting post. It's always fun to discover how much hardware is just broken and doesn't actually correctly implement the protocols or features it's supposed to implement.
If that happens, then they’re just assigning “ID”s.
Or "serial numbers," as it were.
The concoction of UUIDs that are neither universal nor unique happens in software, but the cause is the serial numbers colliding.
Or in this case, a constant number…
I’ve seen similar problems with inexpensive Chinese wifi modules all shipping with an identical MAC address. Mostly you can Google up the method required to reflash them (or worst case, I’ve been out a dollar or two because it usually the ultra cheap things this happens on).
Annoy a thousand developers / power users.
Leading to:
Util developer gets 100 emails.
Leading to:
HN post gets 100k views.
Leading to:
One of the readers proverbially punch some faces.
See: good design!
I had this exact same issue, two displays, always connected to the same TB3 Dock, and they would randomly get re-assigned after wake-up. Which in my case was doubly irritating, since one of those is in portrait mode, so "fixing it" required tilting my head to be able to navigate the mouse correctly.
There's a small CLI utility called `displayplacer`[1], that basically fixed this for me. I don't... really know what exact EDID fields or whatever metadata it's reading, but after I used it once to "save" the correct orientation/placement, I could reset it to the "correct" one every time after that. Highly recommended if that's something you're struggling with.
This should be prone to the same issue.
Your problem might actually be caused by a timing bug, where the EDID is not fully available in the first few milliseconds of the reconnection, and the system doesn't reconcile after it becomes available.
displayplacer will get the full picture because it's always run a long time after the connection has stabilized.
I can't be certain, but I noticed some slow monitors/hubs do have that timing issue by observing the zero/null values for UUID in The Monitor Database: https://db.lunar.fyi
I wish a company like Framework or system76 would get into monitors and open source their monitors’ electronics and firmware so at the very least, these issues could be fixed by the community.
I'm surprised that the OS doesn't have a safeguards for this and isn't retrying the read the EDID after it sees a "blank" one after wake-up, but the display controllers in Mx chips are stupid complicated already it seems.
I don’t think there’s any way for the OS to know that there’s a more complete EDID if it tries again later.
That’s also my theory on why the Intel/AMD/NVidia GPUs feel more stable than the Apple Silicon ones: they had years of dealing with these edge cases and probably adding all the workarounds they could think of, while Apple is still catching up.
* Which btw is the kind of rabbit hole that belongs in this article. That was a high-end CalDigit dock, so seeing KPs was surprising. These monitors even had USB-C inputs, but connecting both at once wouldn't work with this MBP model in particular due to a known incompatibility with its dedicated GPU. Older, newer, or lower-end MBPs were fine. Hence the dock adapting to DP. Another funny quirk is I was able to connect my Mac twice to the same screen (via USB-C and DP), and it thought they were separate screens.
I think the common case of “multiple HDMI ports” is one where users plug in USB-C dongles to magically create them.
In that case, do the HDMI ports disappear from the registry, too, so that you can’t identify ports across standby?
Even distinguishing a built-in HDMI port from one in a USB-C dongle may be difficult if the built-in one secretly is connected over USB-C.
Certainly, a bus scan has to happen to detect whether devices (including USB hubs) got unplugged or plugged in during standby, so if that scanning isn’t guaranteed to always produce the same result (e.g. because of jitter in the timing when various devices come online), I doubt that’s guaranteed to produce 100% identical information.
It’s a question, though. I don’t know enough of how this work to definitely answer that.