Xpra: Ticket #1967: Start-desktop initial connection offset paints when using xrandr to resize display on start

Found a minor bug while working on the automated tests. My server and client are both Fedora 28 machines running trunk r20495.

In order to run into this issue, you have to start a server and use xrandr as a start option to resize the display as so:

xpra start-desktop --bind-tcp=0.0.0.0:2200 --start="xrandr -s 1920x1080" --start=xterm

Upon initial connection with xpra attach ssh:user@host, the xterm will appear above the top of the session window. If you disconnect and reconnect, the Xterm appears at the top of the window as it should. I'll attach screenshots to demonstrate what I'm seeing. Alternatively, you can add --start=i3 to the start command, and the bottom bar appears above where it should be on the first connection; it makes it more obvious what's going on.

Unfortunately, I have no idea what -d logs I should be getting.



Fri, 21 Sep 2018 17:48:19 GMT - J. Max Mena: attachment set

Screenshot of the initial connection


Fri, 21 Sep 2018 17:48:42 GMT - J. Max Mena: attachment set

After disconnecting and re-attaching


Sat, 22 Sep 2018 06:43:58 GMT - Antoine Martin: attachment set

third screenshot with i3 running to show the offset more clearly (replacing with a more reasonable file size)


Sat, 22 Sep 2018 06:53:52 GMT - Antoine Martin: owner changed

Since we're capturing the whole screen as one buffer in desktop mode, if this is a bug in xpra then it is likely to be client side.


Wed, 26 Sep 2018 16:55:44 GMT - J. Max Mena:

To answer your questions up front:

If I start and attach with OpenGL disabled, it works fine on the initial connection. If I start and attach with OpenGL enabled, that's where I see the offset. I'll retry this with -d opengl,paint logs running; the initial connection and the second connection where it shows up properly.

For good measure, I'll also attach -d paint when attaching without OpenGL for a comparison to a working case.

Shouldn't take me more than a few minutes.


Wed, 26 Sep 2018 16:57:47 GMT - J. Max Mena: attachment set

-d opengl,paint logs of the initial connection.


Wed, 26 Sep 2018 16:58:05 GMT - J. Max Mena: attachment set

-d opengl,paint logs of the second connection (same session)


Wed, 26 Sep 2018 16:58:47 GMT - J. Max Mena: attachment set

-d paint logs of a different session, with a working initial connection


Wed, 26 Sep 2018 17:06:56 GMT - J. Max Mena: owner changed

I retested this with a local setup - Fedora 28 workstation running trunk r20535.

I started a session with xpra start-desktop :13 --start="xrandr -s 1920x1080" --start=xterm and attached with xpra attach :13 (and also with --opengl=no). Even connecting locally, I still see the offset.

It's pretty straightforward to trigger for me, but I should mention an important caveat:

My workstation has an Nvidia GTX 745, so I think that may be a contributing factor. In my experience, a lot of OpenGL weirdness usually stems from the Nvidia driver - my laptop has an Intel Iris Pro + Nvidia GTX 850 and the Primus bridge means the GPU is disabled 99% of the time, and I never seem to run into nearly as many OpenGL oddities as I do with my other machines that only use the Nvidia card. Of course, all of the mentioned machines run Fedora.

In the meantime, I'll play around with it a little bit and try a few more xrandr resolutions.


Thu, 27 Sep 2018 02:27:20 GMT - Antoine Martin: owner changed

I still cannot reproduce.


Thu, 27 Sep 2018 16:32:23 GMT - J. Max Mena:

To answer your questions:

[max@vorfuehreffekt ~] $ xrandr --listmonitors
xrandr: Failed to get size of gamma for output default
Monitors: 1
 0: +default 1920/508x1024/271+0+0  default

As you can see, it lowered the virtual display's resolution from 1920x1080 -> 1920x1024, which about matches with the ~60 or so pixels missing from the bottom.

I'll retry and get the xpra info and -d metadata momentarily.

In the meantime, both my client and server have been updated to r20536.


Thu, 27 Sep 2018 16:32:50 GMT - J. Max Mena: attachment set

after clicking re-initialize from the systray


Thu, 27 Sep 2018 17:47:01 GMT - J. Max Mena: attachment set

Xpra info before connection


Thu, 27 Sep 2018 17:47:21 GMT - J. Max Mena: attachment set

Xpra info after first connection


Thu, 27 Sep 2018 17:47:56 GMT - J. Max Mena: attachment set

Xpra info after second connection disconnects


Thu, 27 Sep 2018 17:48:15 GMT - J. Max Mena: attachment set

-d metadata of initial client connection (with offset)


Thu, 27 Sep 2018 17:48:33 GMT - J. Max Mena: attachment set

-d metadata of second client connection (without offset)


Thu, 27 Sep 2018 17:49:54 GMT - J. Max Mena: owner changed

Posted requested info, and I also ran an upgrade real quick and rebooted all my machines, and I still see the same issues. But, I'm still seeing the same driver version, which is the latest that is available, and has been for some time.


Fri, 28 Sep 2018 16:17:17 GMT - Antoine Martin: owner changed

Well, I managed to reproduce a problem, just not the same symptom. And that's only using the laptop's 1080p screen. I will have to play with client resolutions to try to reproduce this more reliably, including your particular version of this bug.

So:


Wed, 03 Oct 2018 17:17:27 GMT - Antoine Martin: milestone set


Tue, 09 Oct 2018 17:49:08 GMT - J. Max Mena: owner changed

Back from vacation!

I've upped my server and client to r20635 and I'm still seeing the exact same issue - I also don't see any solid black prints when starting with i3, just the offset bottom bar as shown in the i3 screenshot I already posted.

However I do get a DPI warning saying that it's set to 96x96 and it wanted 108x107, is that related?


Wed, 10 Oct 2018 12:26:57 GMT - Antoine Martin: owner changed

@maxmylyn: do you use a wacky window manager by any chance?

Is this bug really caused by the first vs second connection, or just by the resizing that happens when you connect? Does it trigger again if you run this before re-connecting:

DISPLAY=:13 xrandr -s 1920x1080

Thu, 11 Oct 2018 16:41:21 GMT - J. Max Mena: owner changed

@antoine: It's KDE, so maybe?

It triggers again if I run that in between connections.

Just to be clear:

Initial connection with xrandr -s 1920x1080 set as a start command -> offset

Disconnect and reconnect -> Offset goes away

Disconnect, run DISPLAY=:13 xrandr -s 1920x1080, then reconnect -> offset


Sat, 23 Jan 2021 05:38:35 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1967