Xpra: Ticket #2492: broken window rendering: 3/4 black with Cinnamon + HiDPI

When using xpra as client on a Cinnamon (4.2.4-2 on Debian) with HiDPI settings, the xpra windows are rendered wrongly, see screenshot. The image of the window (from any X app) is cropped to the lower left quarter, the other three quarters of the window are black.

https://i.imgur.com/F7ObhbV.png

If I disable Cinnamon HiDPI settings (via System Settings / Desktop Scaling or in CLI: "gsettings set org.cinnamon.desktop.interface scaling-factor 1", the problem disappears immediately in the currently opened xpra windows.

E.g.:

Cinnamon initially configured for HiDPI

$ xpra attach ssh:nuc:100 --start=gnome-terminal
2019-11-26 00:40:47,497 Xpra GTK3 X11 client version 3.0.2-r24387 64-bit
2019-11-26 00:40:47,810  running on Linux Debian testing bullseye
2019-11-26 00:40:47,812  window manager is 'Mutter (Muffin)'
2019-11-26 00:40:48,886 GStreamer version 1.16.1 for Python 3.7.5 64-bit
2019-11-26 00:40:49,099 No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate'
2019-11-26 00:40:49,522 OpenGL enabled with Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2)
2019-11-26 00:40:49,709 Connected (version 2.0, client OpenSSH_7.4p1)
2019-11-26 00:40:50,139 Authentication (publickey) successful!
2019-11-26 00:40:50,272  keyboard settings: rules=evdev, model=pc105, layout=us
2019-11-26 00:40:50,284  desktop size is 1920x1080 with 1 screen:
2019-11-26 00:40:50,285   :0.0 (338x190 mm - DPI: 144x144) workarea: 3840x2110
2019-11-26 00:40:50,285     SHP eDP-1 (346x194 mm - DPI: 140x141)
2019-11-26 00:40:50,307 no ethtool interface speed available for wlp2s0
2019-11-26 00:40:50,999 enabled remote logging
2019-11-26 00:40:51,001 Xpra GTK3 X11 server version 3.0.2-r24387 64-bit
2019-11-26 00:40:51,001  running on Linux Debian 9.11 stretch
2019-11-26 00:40:51,017 Attached to ssh://phil@nuc/100
2019-11-26 00:40:51,017  (press Control-C to detach)
2019-11-26 00:40:51,160 server does not support xi input devices
2019-11-26 00:40:51,161  server uses: xtest

=> getting a 3/4 black terminal, cf screenshot

=> typing in another term:

gsettings set org.cinnamon.desktop.interface scaling-factor 1

=> xpra log:

2019-11-26 00:42:15,605 sending updated screen size to server: 3840x2160 with 1 screens
2019-11-26 00:42:15,605   :0.0 (338x190 mm - DPI: 288x288) workarea: 3840x2135
2019-11-26 00:42:15,606     SHP eDP-1 (346x194 mm - DPI: 281x282)

=> and xpra terminal appearance is now correct.

=> typing in another term:

gsettings set org.cinnamon.desktop.interface scaling-factor 2

=> the initial problem reappears

=> xpra log:

2019-11-26 00:42:30,015 sending updated screen size to server: 1920x1080 with 1 screens
2019-11-26 00:42:30,016   :0.0 (338x190 mm - DPI: 144x144) workarea: 3840x2110
2019-11-26 00:42:30,017     SHP eDP-1 (346x194 mm - DPI: 140x141)


Tue, 26 Nov 2019 00:00:48 GMT - Philippe Teuwen: attachment set

xpra settings


Tue, 26 Nov 2019 03:14:45 GMT - Antoine Martin: owner changed

This was meant to have been fixed in r24282, but maybe GTK has changed things yet again? Can you please try to run the client with:

GDK_SCALE=1 xpra attach ..

Tue, 26 Nov 2019 07:54:19 GMT - Antoine Martin: component changed


Tue, 26 Nov 2019 10:02:05 GMT - Philippe Teuwen:

GDK_SCALE=1 xpra attach .. has no effect

But, if I comment unsetenv("GDK_SCALE") in main.py and run GDK_SCALE=1 xpra attach .. then the window decoration is properly drawn around the terminal (but everything is twice small, as for the terminal of my screenshot)

Note that by default GDK_SCALE is not defined and if I run xpra attach .., no matter if unsetenv("GDK_SCALE") is commented or not, I have the same 3/4 black issue.


Tue, 26 Nov 2019 10:06:28 GMT - Philippe Teuwen:

so for now I'm using

    #unsetenv("GDK_SCALE")
    os.environ["GDK_SCALE"]="1"

Tue, 26 Nov 2019 11:49:58 GMT - Antoine Martin:

But, if I comment unsetenv("GDK_SCALE") in main.py

Doh, of course, since we then unset it!

Applied in r24484. Can I close this ticket?


Tue, 26 Nov 2019 18:50:45 GMT - Philippe Teuwen:

yes, thanks!!


Wed, 25 Dec 2019 11:38:36 GMT - Antoine Martin: status changed; resolution set


Sat, 23 Jan 2021 05:52:46 GMT - migration script:

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