DP-1 and DP-2 not consistiently resolved to the same display
Affected version
- Ubuntu 21.10
- Gnome-Shell/Mutter 40.5-1ubuntu2
- Wayland issue
Bug summary
DP-1 and DP-2 don't consistently resolve to the same display.
I have a 5k tiled dual DP (two-pipe, two-port) monitor (LG HDR 5K) monitor running on a laptop with Displayport version 1.2. The monitor presents a DisplayPort MST setup: DP-1 and DP-2.
ls -1 /sys/class/drm/*/edid
/sys/class/drm/card0-DP-1/edid
/sys/class/drm/card0-DP-2/edid
/sys/class/drm/card0-eDP-1/edid (laptop screen)
It's hit and miss as to which DP shows up first after sleeping or starting Gnome, so the display arrangement is often flipped. Both monitors present the the same serial number, but differing information:
edid-decode < /sys/class/drm/card0/card0-DP-1/edid > ~/DP-1.txt DP-1.txt
edid-decode < /sys/class/drm/card0/card0-DP-2/edid > ~/DP-2.txt DP-2.txt
Of course this is fixable by going into Display preferences and changing the layout there. But impractical to do it every time after waking a laptop.
What did you expect to happen
On startup or resume, resolve the correct monitor arrangement/DP1 shouldn't start showing up as DP2 (etc)
I fixed this on the sway window manager (hackily) by doing a checksum of the EDID data for DP-1 and DP-2 which gave me consistent monitor identification.