Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
totaam opened this issue Nov 25, 2019 · 10 comments
Closed

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

totaam opened this issue Nov 25, 2019 · 10 comments
Labels

Comments

@totaam
Copy link
Collaborator

totaam commented Nov 25, 2019

Issue migrated from trac ticket # 2492

component: client | priority: major | resolution: fixed

2019-11-25 23:58:11: doegox created the issue


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.
\
\
[[Image(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-24387 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-24387 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)
@totaam
Copy link
Collaborator Author

totaam commented Nov 26, 2019

2019-11-26 00:00:48: doegox uploaded file 2492.zip (80.2 KiB)

xpra settings

@totaam
Copy link
Collaborator Author

totaam commented Nov 26, 2019

2019-11-26 03:14:45: antoine changed owner from antoine to doegox

@totaam
Copy link
Collaborator Author

totaam commented Nov 26, 2019

2019-11-26 03:14:45: antoine commented


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

GDK_SCALE=1 xpra attach ..

@totaam
Copy link
Collaborator Author

totaam commented Nov 26, 2019

2019-11-26 07:54:20: antoine changed component from android to client

@totaam
Copy link
Collaborator Author

totaam commented Nov 26, 2019

2019-11-26 10:02:06: doegox commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Nov 26, 2019

2019-11-26 10:06:29: doegox commented


so for now I'm using

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

@totaam
Copy link
Collaborator Author

totaam commented Nov 26, 2019

2019-11-26 11:49:58: antoine commented


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?

@totaam
Copy link
Collaborator Author

totaam commented Nov 26, 2019

2019-11-26 18:50:46: doegox commented


yes, thanks!!

@totaam
Copy link
Collaborator Author

totaam commented Dec 25, 2019

2019-12-25 11:38:36: antoine changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Dec 25, 2019

2019-12-25 11:38:36: antoine set resolution to fixed

@totaam totaam closed this as completed Dec 25, 2019
@totaam totaam added the v3.0.x label Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant