Xwayland display corruption with multiple monitors over Waypipe
caveat: This could be a waypipe issue, however it may be related to both waypipe and Xwayland.
I have a pure wayland setup, no Xwayland installed. I need to use/debug a X-only application so it can run under pure Wayland with QT. To accomplish this, I have attempted to run it via Xwayland over waypipe.
i.e. waypipe -> ssh tunnel -> external machine with Wayland/Xwayland -> Xwayland -> xterm. (and then I would run the application. xterm is just a 'benchmark' here. This problem occurs with any Xorg/11 application.)
The Xwayland window opens, but the xterm display is garbled; it appears Xwayland does not understand the width of the display and thus has "stride" issues (if familiar with bitmaps, instead of drawing the 2nd line vertically at 0, it is drawing it on line 1, somewhere far to the right of 0, and then line 3 is somewhere on line 2, line 4 somewhere on line 2, etc.)
I have also found, when using xrandr to determine the size of the display that Xwayland sees, that Xwayland understands my local desktop (with 3 displays) as having 3 displays. I believe this causes Xwayland to misunderstand the "stride" of the display, thus causing the display corruption.
HOWEVER: when I use a single display with the identical setup, on another machine, there is no corruption.
I believe the bug is somewhere in the "setup" code for Xwayland, where it is trying to get the correct width of the monitor, and the way it is determining this is incorrect.
The xinerama flag does NOT affect this startup; the corruption is (probably) identical. (I cannot tell exactly without taking a screen grab and then doing a binary compare of the pixels.)
I am unsure how to provide you with appropriate debugging data for this particular situation; as :
- I have 3 machines involved:
-
a 'remote' box with Xwayland and waypipe (Endeavor(arch linux)/Sway);
-
a triple headed Wayland only machine with waypipe (void linux/Sway);
-
a single headed Wayland only machine with waypipe (void linux/Sway).
-
a workaround which I have not found yet would be to specify the size of the Xwayland display explicitly, or to tell Xwayland "I only want you to use 1 screen of my 3." I have not found any documentation that would explain how to do such.
- I believe this problem may exist WITHOUT waypipe, in some situations where the EDID or other monitor/display information would be sent to Xwayland in the same way that triple-display-waypipe does.
- However, it may be this needs to be also patched in waypipe so it sends the correct EDID/monitor information.
- I don't know how we debug this. I am interested in helping with any usable information that you might require, from both working and non-working machines. I would need to know how you'd prefer that, however, so you can parse it without guessing.
I would guess using xrandr would expose the data after setup; I imagine we need the data sent before setup.