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

Desktop flashing when maximizing window on second screen with Windows client #600

Closed
Hybrid512 opened this issue Dec 13, 2017 · 47 comments
Closed

Comments

@Hybrid512
Copy link

With the Windows X2Goclient, in a multihead setup, if you maximize a windowed desktop session (MATE session for instance but I guess it happens with any DE) this window keeps on flashing and most of the time, it can't seem to get a fixed size and position.
The only workaround in that case is to resize the window by hand and not maximize it.

This doesn't seem to happen with the pre-3.6 ("x2go stable") libs but only with Arctica ones.

@nkrepo
Copy link

nkrepo commented Mar 6, 2018

I have a similar issue with screen Flickering and Ubuntu mate.
It happens almost all the time while the window is maximized.
It happens for about 1 second every time the window is resized.

If the mouse is moved over the top-left corner after the client window is resized (no clicking) the flickering continues for a few more seconds.

Setup details are:
Client
Windows 10 build 1709 (Fall creators update)
x2go client 4.1.1.1 with Arctica nx-libs

Server
Ubuntu MATE 16.04 LTS

libx2go-log-perl       4.1.0.0-0~1517~ubuntu16.04.1
libx2go-server-db-perl 4.1.0.0-0~1517~ubuntu16.04.1
libx2go-server-perl    4.1.0.0-0~1517~ubuntu16.04.1
x2goagent              2:3.5.0.33-0~710~ubuntu16.04.1
x2gomatebindings       0.0.1.5-0~203~ubuntu16.04.1
x2goserver             4.1.0.0-0~1517~ubuntu16.04.1
x2goserver-common      4.1.0.0-0~1517~ubuntu16.04.1
x2goserver-extensions  4.1.0.0-0~1517~ubuntu16.04.1
x2goserver-fmbindings  4.1.0.0-0~1517~ubuntu16.04.1
x2goserver-printing    4.1.0.0-0~1517~ubuntu16.04.1
x2goserver-x2goagent   4.1.0.0-0~1517~ubuntu16.04.1
x2goserver-xsession    4.1.0.0-0~1517~ubuntu16.04.1
libnx-x11-6:amd64      2:3.5.99.14-0~816~ubuntu16.04.1
nx-x11-common          2:3.5.99.14-0~816~ubuntu16.04.1
nxagent                2:3.5.99.14-0~816~ubuntu16.04.1

I have uploaded a youtube video demonstrating the issue when the client window is maximized
Maximized client window flickering.

session.log:


NXAGENT - Version 3.5.99.14

Copyright (c) 2001, 2011 NoMachine (http://www.nomachine.com)
Copyright (c) 2008-2014 Oleksandr Shneyder <[email protected]>
Copyright (c) 2011-2016 Mike Gabriel <[email protected]>
Copyright (c) 2014-2016 Ulrich Sibiller <[email protected]>
Copyright (c) 2014-2016 Mihai Moldovan <[email protected]>
Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com)
See https://github.com/ArcticaProject/nx-libs for more information.

Info: Agent running with pid '18606'.
Session: Starting session at 'Tue Mar  6 09:42:43 2018'.
Info: Proxy running in client mode with pid '18606'.
Info: Using errors file '/tmp/.x2go-testuser/C-testuser-50-1520322162_stDMATE_dp32/session.log'.
Info: Using stats file '/tmp/.x2go-testuser/C-testuser-50-1520322162_stDMATE_dp32/C-testuser-50-1520322162_stDMATE_dp32/stats'.
Loop: WARNING! Unrecognized session type 'unix-kde-depth_32'. Assuming agent session.
Warning: Unrecognized session type 'unix-kde-depth_32'. Assuming agent session.
Info: Waiting for connection from 'localhost' on socket 'tcp:*:51297'.
Info: Accepted connection from '127.0.0.1'.
Info: Connection with remote proxy completed.
Info: Using ADSL link parameters 1408/24/1/0.
Info: Using agent parameters 5000/10/50/0/0.
Info: Using cache parameters 4/4096KB/8192KB/8192KB.
Info: Using pack method '16m-jpeg-9' with session 'unix-kde-depth_32'.
Info: Using ZLIB data compression 1/1/32.
Info: Using ZLIB stream compression 4/4.
Info: No suitable cache file found.
Info: Listening to X11 connections on display ':50'.
Info: Established X client connection.
Info: Using shared memory parameters 1/1/0/0K.
Info: Using alpha channel in render extension.
Info: Not using local device configuration changes.
Warning: Cannot read keystroke file '/home/testuser/.nx/config/keystrokes.cfg'.
Info: using keystrokes file '/etc/nxagent/keystrokes.cfg'
Warning: ignoring keystroke 'viewport_scroll_up' (already in use by 'viewport_move_up')
Warning: ignoring keystroke 'viewport_scroll_up' (already in use by 'viewport_move_up')
Warning: ignoring keystroke 'viewport_scroll_right' (already in use by 'viewport_move_right')
Warning: ignoring keystroke 'viewport_scroll_right' (already in use by 'viewport_move_right')
Warning: ignoring keystroke 'viewport_scroll_down' (already in use by 'viewport_move_down')
Warning: ignoring keystroke 'viewport_scroll_down' (already in use by 'viewport_move_down')
Current known keystrokes:
  close_session         Ctrl+Alt+t
  switch_all_screens    Ctrl+Alt+f
  fullscreen            Ctrl+Shift+Alt+f
  minimize              Ctrl+Alt+m
  defer                 Ctrl+Alt+e
  ignore                Ctrl+Alt+BackSpace
  force_synchronization Ctrl+Alt+j
  resize                Ctrl+Alt+r
  viewport_move_left    Ctrl+Shift+Alt+Left
  viewport_move_left    Ctrl+Shift+Alt+KP_Left
  viewport_move_up      Ctrl+Alt+Up
  viewport_move_up      Ctrl+Alt+KP_Up
  viewport_move_right   Ctrl+Alt+Right
  viewport_move_right   Ctrl+Alt+KP_Right
  viewport_move_down    Ctrl+Alt+Down
  viewport_move_down    Ctrl+Alt+KP_Down
  viewport_scroll_left  Ctrl+Alt+Left
  viewport_scroll_left  Ctrl+Alt+KP_Left
  reread_keystrokes     Ctrl+Alt+k
Info: keyboard file created: '/home/testuser/.x2go/C-testuser-50-1520322162_stDMATE_dp32/keyboard'
Info: Keycode conversion auto-determined as off
*** BUG ***
In pixman_region_copy: Malformed region dst
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region_union: Malformed region reg1
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region_union: Malformed region new_reg
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region_copy: Malformed region dst
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region_union: Malformed region reg1
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region_union: Malformed region new_reg
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region_copy: Malformed region dst
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region_intersect: Malformed region new_reg
Set a breakpoint on '_pixman_log_error' to debug

Session: Session started at 'Tue Mar  6 09:42:52 2018'.
*** BUG ***
In pixman_region_intersect: Malformed region new_reg
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region_copy: Malformed region dst
Set a breakpoint on '_pixman_log_error' to debug

Info: Screen [0] resized to geometry [784x561] fullscreen [0].
Info: Screen [0] resized to geometry [1138x779] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x1168] fullscreen [0].
Info: Screen [0] resized to geometry [1393x1168] fullscreen [0].
Info: Screen [0] resized to geometry [1393x1168] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1393x919] fullscreen [0].
Info: Screen [0] resized to geometry [1446x1127] fullscreen [0].
Info: Screen [0] resized to geometry [1446x1127] fullscreen [0].
Info: Screen [0] resized to geometry [1446x1127] fullscreen [0].
Info: Screen [0] resized to geometry [1446x1107] fullscreen [0].
Info: Screen [0] resized to geometry [1507x1108] fullscreen [0].
Info: Screen [0] resized to geometry [1507x1108] fullscreen [0].
Info: Screen [0] resized to geometry [1507x1108] fullscreen [0].
Info: Screen [0] resized to geometry [1507x1108] fullscreen [0].
Info: Screen [0] resized to geometry [1507x1108] fullscreen [0].
Info: Screen [0] resized to geometry [1507x1108] fullscreen [0].
Info: Screen [0] resized to geometry [1505x941] fullscreen [0].
Info: Screen [0] resized to geometry [1505x941] fullscreen [0].
Info: Screen [0] resized to geometry [1505x941] fullscreen [0].
Info: Screen [0] resized to geometry [1505x941] fullscreen [0].
Info: Screen [0] resized to geometry [1505x941] fullscreen [0].
Info: Screen [0] resized to geometry [1505x941] fullscreen [0].
Info: Screen [0] resized to geometry [1505x941] fullscreen [0].
Info: Screen [0] resized to geometry [1505x941] fullscreen [0].
Info: Screen [0] resized to geometry [1505x941] fullscreen [0].
Info: Screen [0] resized to geometry [1505x941] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1597x1009] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1466x1004] fullscreen [0].
Info: Screen [0] resized to geometry [1500x1013] fullscreen [0].
Info: Screen [0] resized to geometry [1500x1013] fullscreen [0].
Info: Screen [0] resized to geometry [1500x1013] fullscreen [0].
Info: Screen [0] resized to geometry [1608x1040] fullscreen [0].
Info: Screen [0] resized to geometry [1608x1040] fullscreen [0].
Info: Screen [0] resized to geometry [1397x973] fullscreen [0].
Info: Screen [0] resized to geometry [1397x973] fullscreen [0].
Info: Screen [0] resized to geometry [1397x973] fullscreen [0].
Info: Screen [0] resized to geometry [1397x973] fullscreen [0].
Info: Screen [0] resized to geometry [1397x973] fullscreen [0].
Info: Screen [0] resized to geometry [1430x995] fullscreen [0].
Info: Screen [0] resized to geometry [1478x889] fullscreen [0].
Info: Screen [0] resized to geometry [1478x889] fullscreen [0].
Info: Screen [0] resized to geometry [1478x889] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1478x889] fullscreen [0].
Info: Screen [0] resized to geometry [1478x889] fullscreen [0].
Info: Screen [0] resized to geometry [1478x889] fullscreen [0].
Info: Screen [0] resized to geometry [1478x889] fullscreen [0].
Info: Screen [0] resized to geometry [1478x889] fullscreen [0].
Info: Screen [0] resized to geometry [1478x889] fullscreen [0].

As you can see from the log every time the client window is resized multiple resize operations are performed, without actually resize the client window. When the client window is maximized it continuously tries to resize the client window to the maximized resolution of 1858x1177.

Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1858x1177] fullscreen [0].

@nkrepo
Copy link

nkrepo commented Mar 7, 2018

Tested also with Centos 6.9 with Gnome 2.28.2 and the flickering can be also triggered. I am appending the session log bellow.

Setup details are:
Client
Windows 10 build 1709 (Fall creators update)
x2go client 4.1.1.1 with Arctica nx-libs

Server
Centos 5.9 with Gnome 2.28.2

perl-Capture-Tiny-0.23-0.0x2go1.el6.noarch
libXcompext3-3.5.0.33-0.0x2go1.1.git20180204.776.main.el6.x86_64
perl-X2Go-Server-4.1.0.0-0.0x2go1.1.git20180302.1517.main.el6.x86_64
perl-X2Go-Server-DB-4.1.0.0-0.0x2go1.1.git20180302.1517.main.el6.x86_64
x2goserver-extensions-4.1.0.0-0.0x2go1.1.git20180302.1517.main.el6.x86_64
perl-X2Go-Log-4.1.0.0-0.0x2go1.1.git20180302.1517.main.el6.x86_64
x2goserver-4.1.0.0-0.0x2go1.1.git20180302.1517.main.el6.x86_64
x2goserver-x2goagent-4.1.0.0-0.0x2go1.1.git20180302.1517.main.el6.x86_64
x2goserver-xsession-4.1.0.0-0.0x2go1.1.git20180302.1517.main.el6.x86_64
x2goserver-common-4.1.0.0-0.0x2go1.1.git20180302.1517.main.el6.x86_64
nxagent-3.5.99.14-0.0build1.1.git20180302.2954.main.el6.x86_64
nx-libs-3.5.99.14-0.0build1.1.git20180302.2954.main.el6.x86_64
NXAGENT - Version 3.5.99.14

Copyright (c) 2001, 2011 NoMachine (http://www.nomachine.com)
Copyright (c) 2008-2014 Oleksandr Shneyder <[email protected]>
Copyright (c) 2011-2016 Mike Gabriel <[email protected]>
Copyright (c) 2014-2016 Ulrich Sibiller <[email protected]>
Copyright (c) 2014-2016 Mihai Moldovan <[email protected]>
Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com)
See https://github.com/ArcticaProject/nx-libs for more information.

Info: Agent running with pid '3568'.
Session: Starting session at 'Wed Mar  7 20:48:08 2018'.
Info: Proxy running in client mode with pid '3568'.
Info: Using errors file '/tmp/.x2go-testuser/C-testuser-51-1520448487_stDGNOME_dp32/session.log'.
Info: Using stats file '/tmp/.x2go-testuser/C-testuser-51-1520448487_stDGNOME_dp32/C-testuser-51-1520448487_stDGNOME_dp32/stats'.
Loop: WARNING! Unrecognized session type 'unix-kde-depth_32'. Assuming agent session.
Warning: Unrecognized session type 'unix-kde-depth_32'. Assuming agent session.
Info: Waiting for connection from 'localhost' on socket 'tcp:*:42588'.
Info: Accepted connection from '127.0.0.1'.
Info: Connection with remote proxy completed.
Info: Using ADSL link parameters 1408/24/1/0.
Info: Using agent parameters 5000/10/50/0/0.
Info: Using cache parameters 4/4096KB/8192KB/8192KB.
Info: Using pack method '16m-jpeg-9' with session 'unix-kde-depth_32'.
Info: Using ZLIB data compression 1/1/32.
Info: Using ZLIB stream compression 4/4.
Info: No suitable cache file found.
Info: Listening to X11 connections on display ':51'.
Info: Established X client connection.
Info: Using shared memory parameters 1/1/0/0K.
Info: Using alpha channel in render extension.
Info: Not using local device configuration changes.
Warning: Cannot read keystroke file '/home/testuser/.nx/config/keystrokes.cfg'.
Info: using keystrokes file '/etc/nxagent/keystrokes.cfg'
Warning: ignoring keystroke 'viewport_scroll_up' (already in use by 'viewport_move_up')
Warning: ignoring keystroke 'viewport_scroll_up' (already in use by 'viewport_move_up')
Warning: ignoring keystroke 'viewport_scroll_right' (already in use by 'viewport_move_right')
Warning: ignoring keystroke 'viewport_scroll_right' (already in use by 'viewport_move_right')
Warning: ignoring keystroke 'viewport_scroll_down' (already in use by 'viewport_move_down')
Warning: ignoring keystroke 'viewport_scroll_down' (already in use by 'viewport_move_down')
Current known keystrokes:
  close_session         Ctrl+Alt+t
  switch_all_screens    Ctrl+Alt+f
  fullscreen            Ctrl+Shift+Alt+f
  minimize              Ctrl+Alt+m
  defer                 Ctrl+Alt+e
  ignore                Ctrl+Alt+BackSpace
  force_synchronization Ctrl+Alt+j
  resize                Ctrl+Alt+r
  viewport_move_left    Ctrl+Shift+Alt+Left
  viewport_move_left    Ctrl+Shift+Alt+KP_Left
  viewport_move_up      Ctrl+Alt+Up
  viewport_move_up      Ctrl+Alt+KP_Up
  viewport_move_right   Ctrl+Alt+Right
  viewport_move_right   Ctrl+Alt+KP_Right
  viewport_move_down    Ctrl+Alt+Down
  viewport_move_down    Ctrl+Alt+KP_Down
  viewport_scroll_left  Ctrl+Alt+Left
  viewport_scroll_left  Ctrl+Alt+KP_Left
  reread_keystrokes     Ctrl+Alt+k
Info: keyboard file created: '/home/testuser/.x2go/C-testuser-51-1520448487_stDGNOME_dp32/keyboard'
Info: Keycode conversion auto-determined as off
Session: Session started at 'Wed Mar  7 20:48:16 2018'.
Info: Screen [0] resized to geometry [784x561] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [784x561] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [784x561] fullscreen [0].
Info: Screen [0] resized to geometry [784x561] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [784x561] fullscreen [0].
Info: Screen [0] resized to geometry [984x728] fullscreen [0].
Info: Screen [0] resized to geometry [984x728] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [984x728] fullscreen [0].
Info: Screen [0] resized to geometry [984x728] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [1856x1177] fullscreen [0].
Info: Screen [0] resized to geometry [984x728] fullscreen [0].
Info: Screen [0] resized to geometry [984x728] fullscreen [0].
Info: Screen [0] resized to geometry [1309x955] fullscreen [0].
Info: Screen [0] resized to geometry [1309x955] fullscreen [0].
Info: Screen [0] resized to geometry [1309x955] fullscreen [0].

@nkrepo
Copy link

nkrepo commented Mar 8, 2018

More testing is done trying to identify if the 1 pixel hack is responsible for the flickering

1-pixal hack

Flickering also occurs when the the nx-nxagent is manually started
Started putty with x-forwarding and run
nxagent -ac :1
Started a second putty and run :

export DISPLAY=:1
STARTUP=mate-session dbus-run-session /etc/X11/Xsession

Tested with:
Vcxserv 1.19.6.0
Vcxserv 1.17.0.0-3
Xming 7.5.0.89

The flickering loop always occurs when the Window is maximized

Tested also with Cyxwin-X version 1.18.4-1 and the flicker loop does not occur.
It flickers only once after each window resize.

@nkrepo
Copy link

nkrepo commented Mar 8, 2018

I build the Ubuntu packages from the latest source from nx-libs.git and enabled DEBUG and TEST in
nx-X11/programs/Xserver/hw/nxagent/Screen.c
nx-X11/programs/Xserver/hw/nxagent/test.c
and attached the log file from the nxagent.

nxagent_debug.log.gz

Modified nx-X11/programs/Xserver/hw/nxagent/Screen.c by removing

      /*RROutputChanged(pScrPriv->outputs[i], TRUE);
      RRCrtcChanged(pScrPriv->crtcs[i], TRUE);*/

And the flicker occurs again, the nxagent_debug-mod.log.gz file contains the output from the modified nxagent

nxagent_debug-mod.log.gz

From the vcxsrv.log noticed that after the (ConfigureWindow), error events follow

winMultiWindowWMProc - Error code: 8 (Match), ID: 0x002000cd, Major opcode: 12 (ConfigureWindow), Minor opcode: 0 ((null))
winMultiWindowWMProc - Error code: 3 (Window), ID: 0x002000d3, Major opcode: 25 (SendEvent), Minor opcode: 0 ((null))
winMultiWindowWMProc - Error code: 3 (Window), ID: 0x002000d3, Major opcode: 25 (SendEvent), Minor opcode: 0 ((null))
winMultiWindowWMProc - Error code: 3 (Window), ID: 0x002000d3, Major opcode: 25 (SendEvent), Minor opcode: 0 ((null))
winMultiWindowWMProc - Error code: 3 (Window), ID: 0x002000d3, Major opcode: 25 (SendEvent), Minor opcode: 0 ((null))
winMultiWindowWMProc - Error code: 8 (Match), ID: 0x002000cd, Major opcode: 12 (ConfigureWindow), Minor opcode: 0 ((null))
winMultiWindowWMProc - Error code: 3 (Window), ID: 0x002000d3, Major opcode: 25 (SendEvent), Minor opcode: 0 ((null))
winMultiWindowWMProc - Error code: 3 (Window), ID: 0x002000d3, Major opcode: 25 (SendEvent), Minor opcode: 0 ((null))
winMultiWindowWMProc - Error code: 3 (Window), ID: 0x002000d3, Major opcode: 25 (SendEvent), Minor opcode: 0 ((null))
winMultiWindowWMProc - Error code: 3 (Window), ID: 0x002000d3, Major opcode: 25 (SendEvent), Minor opcode: 0 ((null))
winMultiWindowWMProc - Error code: 8 (Match), ID: 0x002000cd, Major opcode: 12 (ConfigureWindow), Minor opcode: 0 ((null))
winMultiWindowWMProc - Error code: 3 (Window), ID: 0x002000d3, Major opcode: 25 (SendEvent), Minor opcode: 0 ((null))
winMultiWindowWMProc - Error code: 3 (Window), ID: 0x002000d3, Major opcode: 25 (SendEvent), Minor opcode: 0 ((null))
winMultiWindowWMProc - Error code: 3 (Window), ID: 0x002000d3, Major opcode: 25 (SendEvent), Minor opcode: 0 ((null))

vcxsrv.log

@uli42
Copy link
Member

uli42 commented Mar 8, 2018

@nkrepo: please find a version printing more debugging output in this branch: https://github.com/uli42/nx-libs/tree/tst_flicker Can you please compile this version and supply another debug log?

@nkrepo
Copy link

nkrepo commented Mar 9, 2018

@uli42 : I build and run the tst_flicker branch. I am attaching the log file bellow.

nxagent-tst_flicker.log

VCXSrv.0.log

@nkrepo
Copy link

nkrepo commented Mar 9, 2018

Run nxagent with -sync option, attaching the new log, the same flicker loop happens when the window is maximized.

nxagent-tst_flicker-sync.log

@nkrepo
Copy link

nkrepo commented Mar 10, 2018

I did a little more testing with different X-Servers
With latest Cygwin-X the flicker loop can be triggered when maximizing but not every time.
With Vcxsrv integrated with x2go the flicker loop can be triggered when maximizing but not not every time.
With Vcxsrv 1.17.0.0-3 the flicker loop is triggered every time when maximizing.

@nkrepo
Copy link

nkrepo commented Mar 14, 2018

I did some more tests asked by @uli42 .
I tested with nxagent -rrxinerama, it made no difference, the flickering still happens, I am attaching the log bellow.
nxagent-rrxinerama.log
I figured out that the parameters "+bs -wm" have to be used with the vcxsrv to enable the backing store, but flickering still happens.

I also noticed that there no need to start the mate-session for the vcxsrv client window to start flickering.
I it flickers by just running the nxagent at the server side only and maximizing the client window.
vcxsrv client window flickering

@uli42
Copy link
Member

uli42 commented Mar 18, 2018

I did some tests, too. And I could see that the x position of the nxagent window is changing back and forth between 0 and 8 while the y position is flapping between 23 and 31 (again 8 pixels) between those many ConfigureNotify events the nxagent receives. Searching for "windows 10 8pixels" lead me to this insane Windows 10 behaviour: https://stackoverflow.com/questions/42473554/windows-10-screen-coordinates-are-offset-by-7 (money quote: "In my opinion, whoever did this at Microsoft should be immediately shot.")

Digging in that direction now. Still, I don't have a good idea how to handle that.

Update: setting the VcXsrv executable to "Windows 7" in the compatibility tab changes the values from 8 to 4, the rest stays the same.

@uli42
Copy link
Member

uli42 commented Mar 18, 2018

The other theory: Windows 10 changes the size of the window title bar when maximizing. The height is reduced and the program`s icon is moving a bit closer to the left edge. On my slow VM it looks like this done using multiple operations one after the other (move the icon to the left, reduce the height, move the window; I cannot define the order for sure). If every operation is causing an event this might be an explanation.

@sunweaver
Copy link
Member

sunweaver commented Mar 19, 2018 via email

@uli42
Copy link
Member

uli42 commented Mar 19, 2018 via email

@nkrepo
Copy link

nkrepo commented Mar 19, 2018

@uli42 , yes of course, I will produce the new logs until tomorrow.
@sunweaver , I did a test with "Desktop Composition" , "Menu and window animation" and "Visual styles disabled", the flickering still occurs.

I have to note that after every client window resize (not maximizing), an extraneous client window resize event occurs to same geometry every time. It may worth to start looking for that first.

For example :

Info: Screen [0] resized to geometry [984x728] fullscreen [0].
Info: Screen [0] resized to geometry [984x728] fullscreen [0].

@nkrepo
Copy link

nkrepo commented Mar 19, 2018

@uli42 , run the sysdm.cpl, you can find the visual settings in advance tab. I tested running x2go both locally and while connected to another windows machine via RDP with all effects disabled.

@uli42
Copy link
Member

uli42 commented Mar 19, 2018 via email

@uli42
Copy link
Member

uli42 commented Mar 19, 2018 via email

@sunweaver
Copy link
Member

sunweaver commented Mar 19, 2018 via email

@sunweaver
Copy link
Member

sunweaver commented Mar 20, 2018 via email

@Ionic
Copy link
Member

Ionic commented Mar 20, 2018

Testing with this branch is not necessary. There are no differences from the main branch currently. It will behave exactly the same.

@nkrepo
Copy link

nkrepo commented Mar 21, 2018

I did more testing with the workaround patch provided by @uli42.
It was applied (in Screen.c, line 2303):

   oldMmWidth = pScreen -> mmWidth;                                                                                                                                                           
   oldMmHeight = pScreen -> mmHeight;                                                                                                                                                         
                                                                                                                                                                                              
+  if (oldWidth == width && oldHeight == height)                                                                                                                                              
+    return 0;                                                                                                                                                                                
+                                                                                                                                                                                             
+                                                                                                                                                                                             
   pScreen -> width = width;                                                                                                                                                                  
   pScreen -> height = height;     

There was no flickering loop. It seemed stable, I did notice any issues, unfortunately the testing was done remotely and was a bit slow and I might missed something.

I am attaching the log file generated by nxagent with with return 0;
nxagent-debug-return-0.log

I am attaching the log file generated by nxagent with with return 1;
nxagent-debug-return-1.log

I tried to use vcxsrv's command line options

-logfile filename
    Write log messages to <filename>.
-logverbose verbosity

To more get extensive logging at client side but it seems to ignore them.
VCXSrv.0.log

@uli42
Copy link
Member

uli42 commented Mar 21, 2018

Thx! At least we have something to offer (although I still consider this a workaround only).

Did you notice any difference between "return 0" and "return 1"?

The return value should only really matter on systems with multiple monitors on windows and rrxinerama activated. Do you have two monitors available for testing?

@uli42
Copy link
Member

uli42 commented Mar 21, 2018

I have now tracked this issue down to a single line in =Screen.c:nxagentResizeScreen()=. The call of =XSetWMNormalHints()= is causing the flickering. We could leave it out if the =clientos= is Windows but there must be a better way...

@sunweaver
Copy link
Member

sunweaver commented Mar 22, 2018 via email

@uli42
Copy link
Member

uli42 commented Mar 22, 2018 via email

@uli42
Copy link
Member

uli42 commented Mar 22, 2018

I have been playing around the whole evening on this...

One thing I learned:

  1. on Windows 10: open vcxsrv.exe -multiwindow -ac :3
  2. on Linux: open DISPLAY=<windows-ip>:3.0 ./nxagent :55 +xinerama -rrxinerama -sync
  3. on Linux: run DISPLAY=<windows-ip>:3.0 xdotool windowmove 0x20004e 0 31

This will move the nxagent window on the Windows desktop to the left border. But only until you enter the window with the mouse. The window will then immediately be moved from 0,31 -> 8,31 which will trigger another ConfigureNotifyEvent. This behaviour vanishes when removing the XSetWMNormalHints() call from nxagentResizeScreen, as mentioned above.

I have figured out that even calling XSetWMNormalHints() without any values will lead to that behaviour. Same for the flickering.

@nkrepo: I have updated the repo https://github.com/uli42/nx-libs/tree/tst_flicker, can you please do another test?

I am not really sure what we lose by that. Do we need WM_NORMAL_HINTS at all?

PS: I noticed that VcXsrv opens an X server that does not have any of the NET* properties of the Extended Window Manager Hints (compare output of xprop -root). So maybe we should not set WM_NORMAL_HINTS in that case.

@uli42
Copy link
Member

uli42 commented Mar 27, 2018

I have tested more. I now think that the problem is that we call XMoveWindow() and XMoveResizeWindow() at some places in the code and assume that the nx window will be placed at exactly the position we pass to those calls. But the window managers will place it as they like. Now, if we get a ConfigureNotify event it contains x,y coordinates. We compare them to the ones where we think the window should be (the values we passed in the calls mentioned above) and as they are different we issue further action (involving calling XMoveWindow). Which will trigger further ConfigureNotify events...

Depending on the window manager you use on Linux the problem could happen there, too.

So the real fix is to ask the xserver for the current window position after a move and store THAT. Which might get tricky and could cause additional traffic on the wire.

Further: x,y,width,height in XSizeHints are obsolete and should dropped from our code entirely.

@sunweaver
Copy link
Member

sunweaver commented Mar 28, 2018 via email

@uli42
Copy link
Member

uli42 commented Apr 14, 2018

I have been looking at this over and over again. Meanwhile I think this is a bug in VcXsrv's handling of WM_NORMAL_HINTS. The minimal code below also triggers the behaviour on VcXsrv. Note that is does not change any value of WM_NORMAL_HINTS. Nevertheless, removing the SetXWMNormalHints() call fixes the flickering:

/* gcc -v -L/usr/lib/x86_64-linux-gnu flicker.c -o flicker -lX11 */

#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void SetSizeHints(Display *display, Window window)
{
  XSizeHints * sizeHints  = XAllocSizeHints();
  /* comment this line to make the flickering go away: */
  XSetWMNormalHints(display, window, sizeHints);
  XFree(sizeHints);
}

int main(void) {
  Display *display;
  Window win;
  XEvent X;
  int screen;

  if (!(display = XOpenDisplay(NULL)))
    exit(1);

  screen = DefaultScreen(display);
  win = XCreateSimpleWindow(display, RootWindow(display, screen), 10, 10, 100, 100, 0,
                          BlackPixel(display, screen), WhitePixel(display, screen));
  XMapWindow(display, win);
  XSelectInput(display, win, KeyPressMask | StructureNotifyMask);

  while (1) {
    XNextEvent(display, &X);
    if (X.xany.serial > 100)
      break;
    if (X.type == KeyPress)
      break;
    if (X.type == ConfigureNotify)
    {
      fprintf(stderr, "self [%p] ConfigureNotifyEvent: s/n [%ld], Window [%p] Event [%p] X/Y [%d,%d] W*H [%dx%d] send_evnt [%d] border [%d] above [%p] override [%d]\n", (void *)win, X.xconfigure.serial, (void *)X.xconfigure.window, (void *)X.xconfigure.event, X.xconfigure.x, X.xconfigure.y, X.xconfigure.width, X.xconfigure.height, X.xconfigure.send_event, X.xconfigure.border_width, (void *)X.xconfigure.above, X.xconfigure.override_redirect);
      SetSizeHints(display, win);
    }
  }
  XCloseDisplay(display);
  return 0;
}

@uli42
Copy link
Member

uli42 commented Apr 14, 2018

I have opened a bug for VcXSrv on SourceForge: https://sourceforge.net/p/vcxsrv/bugs/71/

@sunweaver
Copy link
Member

sunweaver commented Apr 14, 2018 via email

@uli42
Copy link
Member

uli42 commented Apr 14, 2018

Thanks. I have added that information to the bug. It was mentioned above but I seem to have forgotten about that.

@sunweaver
Copy link
Member

sunweaver commented Apr 14, 2018 via email

@uli42
Copy link
Member

uli42 commented Apr 14, 2018 via email

@uli42
Copy link
Member

uli42 commented Apr 19, 2018

@mikedep333 Hi Mike#2, can you please examine what happens in the vcxsrv code when my example code from above is executed? Maybe you can even find a fix! Thx!

@uli42
Copy link
Member

uli42 commented Apr 19, 2018

Good news everyone: vcxsrv 1.19.6.4 got released today and the release notes mention "Solved some flickering problems". An indeed: It works!

@attzonko
Copy link

Does this mean next release of the client will have the fix, or is there some steps we can take to update the current installation?

@uli42
Copy link
Member

uli42 commented Apr 19, 2018

@attzonko: I guess that next client release will contain the new vcxsrv version but I don't know if there are other reasons why x2go does still ship an older version.

Meanwhile I suggest you download the the current vcxsrv from sourceforge, install it and configure x2goclien to use that version (Menu =Options/Settings=, Tab =Xorg Server Settings=)

@Ionic
Copy link
Member

Ionic commented Apr 19, 2018

Our vcxsrv version is patched, which means that it must be rebased for every new version and then built.

That takes @mikedep333 quite a bit of time and generally any fixes in vcxsrv are considered non-security-related, since the software is not running with elevated privileges on Windows.

@uli42
Copy link
Member

uli42 commented Apr 19, 2018 via email

@Ionic
Copy link
Member

Ionic commented Apr 20, 2018

It's probably easier to fully upgrade this time, no idea what other stuff was changed.

Mostly build fixes, but also other stuff. See the commit history for details and especially the x2go/arctica release notes.

@sunweaver
Copy link
Member

Thus, closing. The issue is not an nx-libs issue, but burried in old versions of VcXsrv. Please upgrade VcXsrv to vcxsrv 1.19.6.4 or newer, if you encounter this issue.

@soportecasator
Copy link

Good morning every one, Can someone tell me how to configure the new vcxsrv with the x2goclient?

@uli42
Copy link
Member

uli42 commented May 7, 2018 via email

@ninsbl
Copy link

ninsbl commented May 18, 2018

@sunweaver Will an updated VcXsrv be shipped with x2go Windows client? And if it is supposed to happen, is this evtl. scheduled already?
On https://github.com/ArcticaProject/vcxsrv latest version is 1.17.0.0...

@RahulNagekar
Copy link

Updating to X2go client V 1.4.2.0 on windows resolves my same issue.

While Installing and pointing to vcxsrv installed separately brings up a problem of unable to copy from windows to target machine.

@soportecasator
Copy link

soportecasator commented Jul 12, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants