I have three displays connected to my primary GPU. If I run xrandr in X11 I can see they are labelled as DP-0, DP-2 and DP-4. And if I run xrandr in Wayland I get XWAYLAND[0-2], nothing special here.
I also have a KVM switch that switches all three displays between my primary GPU and my secondary GPU that’s passed through to a VM. It seems to disconnect the displays and reconnect them every time I switch between inputs.
In X11, the displays maintain their labels in Fedora when I switch back and forth between the two systems (based on the physical connectors they’re connected to, I guess).
But in Wayland, every time I switch away from Fedora to the VM and back again, the display numbering would increase - and not even predictably.
What I mean by that is not all three displays would change their numbering. They might, but not always. For instance, now, after several switches between my two systems, xrandr gives me XWAYLAND6, XWAYLAND8 and XWAYLAND9, while they started as XWAYLAND0, 1 and 2.
How does this XWAYLAND numbering system work? Is there a way to create a constant mapping between physical display outputs and XWAYLAND indexes so that DP-0 always maps to XWAYLAND0, DP-2 always to XWAYLAND1, DP-4 always to XWAYLAND2?
The practical reason I would like to achieve this is because of DaVinci Resolve. It always references the display names for its layout arrangement. And every time I switch systems and back again, DR will be confused by the display changes and start to misbehave. I tried to switch to X11, but the playback performance is noticeably worse than that in Wayland.
Many thanks in advance.