LibVNC / libvncserver

LibVNCServer/LibVNCClient are cross-platform C libraries that allow you to easily implement VNC server or client functionality in your program.
GNU General Public License v2.0
1.1k stars 482 forks source link

Rendering problems with Raspberry Pi server #442

Closed Floessie closed 2 years ago

Floessie commented 4 years ago

Dear libvncserver team,

I was playing with libvncclient in Qt when I stumbled upon a problem with tight encoding on a RasPi 2 (Model B) server. At first, I thought the problem was with my wrapper, but I can also reproduce it using the SDLvncviewer example from the current master branch.

Whenever moving the mouse cursor on the target over sharp edges or rather quickly, artifacts appear in the client window:

SDLvncviewer-raspi

The server on the RasPi is this:

$ x11vnc --version
x11vnc: 0.9.13 lastmod: 2011-08-10
$ sudo x11vnc -display :0 -shared -auth guess -forever

Client output:

01/09/2020 07:50:37 VNC server supports protocol version 3.8 (viewer 3.8)
01/09/2020 07:50:37 We have 1 security types to read
01/09/2020 07:50:37 0) Received security type 1
01/09/2020 07:50:37 Selecting security type 1 (0/1 in the list)
01/09/2020 07:50:37 Selected Security Scheme 1
01/09/2020 07:50:37 No authentication needed
01/09/2020 07:50:37 VNC authentication succeeded
01/09/2020 07:50:37 Desktop name "raspberrypi:0"
01/09/2020 07:50:37 Connected to VNC server, using protocol version 3.8
01/09/2020 07:50:37 VNC server default format:
01/09/2020 07:50:37   32 bits per pixel.
01/09/2020 07:50:37   Least significant byte first in each pixel.
01/09/2020 07:50:37   TRUE colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
01/09/2020 07:50:38 client2server supported messages (bit flags)
01/09/2020 07:50:38 00: 00ff 0081 0000 0000 - 0000 0000 0000 0000
01/09/2020 07:50:38 08: 0000 0000 0000 0000 - 0000 0000 0000 0000
01/09/2020 07:50:38 10: 0000 0000 0000 0000 - 0000 0000 0000 0000
01/09/2020 07:50:38 18: 0000 0000 0000 0000 - 0000 0000 0000 0000
01/09/2020 07:50:38 server2client supported messages (bit flags)
01/09/2020 07:50:38 00: 001f 0080 0000 0000 - 0000 0000 0000 0000
01/09/2020 07:50:38 08: 0000 0000 0000 0000 - 0000 0000 0000 0000
01/09/2020 07:50:38 10: 0000 0000 0000 0000 - 0000 0000 0000 0000
01/09/2020 07:50:38 18: 0000 0000 0000 0000 - 0000 0000 0000 0000
01/09/2020 07:50:38 Connected to Server "unknown (LibVNCServer 0.9.11)"

Server output:

###############################################################
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@                                                           @#
#@  **  WARNING  **  WARNING  **  WARNING  **  WARNING  **   @#
#@                                                           @#
#@        YOU ARE RUNNING X11VNC WITHOUT A PASSWORD!!        @#
#@                                                           @#
#@  This means anyone with network access to this computer   @#
#@  may be able to view and control your desktop.            @#
#@                                                           @#
#@ >>> If you did not mean to do this Press CTRL-C now!! <<< @#
#@                                                           @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@                                                           @#
#@  You can create an x11vnc password file by running:       @#
#@                                                           @#
#@       x11vnc -storepasswd password /path/to/passfile      @#
#@  or   x11vnc -storepasswd /path/to/passfile               @#
#@  or   x11vnc -storepasswd                                 @#
#@                                                           @#
#@  (the last one will use ~/.vnc/passwd)                    @#
#@                                                           @#
#@  and then starting x11vnc via:                            @#
#@                                                           @#
#@      x11vnc -rfbauth /path/to/passfile                    @#
#@                                                           @#
#@  an existing ~/.vnc/passwd file from another VNC          @#
#@  application will work fine too.                          @#
#@                                                           @#
#@  You can also use the -passwdfile or -passwd options.     @#
#@  (note -passwd is unsafe if local users are not trusted)  @#
#@                                                           @#
#@  Make sure any -rfbauth and -passwdfile password files    @#
#@  cannot be read by untrusted users.                       @#
#@                                                           @#
#@  Use x11vnc -usepw to automatically use your              @#
#@  ~/.vnc/passwd or ~/.vnc/passwdfile password files.       @#
#@  (and prompt you to create ~/.vnc/passwd if neither       @#
#@  file exists.)  Under -usepw, x11vnc will exit if it      @#
#@  cannot find a password to use.                           @#
#@                                                           @#
#@                                                           @#
#@  Even with a password, the subsequent VNC traffic is      @#
#@  sent in the clear.  Consider tunnelling via ssh(1):      @#
#@                                                           @#
#@    http://www.karlrunge.com/x11vnc/#tunnelling            @#
#@                                                           @#
#@  Or using the x11vnc SSL options: -ssl and -stunnel       @#
#@                                                           @#
#@  Please Read the documention for more info about          @#
#@  passwords, security, and encryption.                     @#
#@                                                           @#
#@    http://www.karlrunge.com/x11vnc/faq.html#faq-passwd    @#
#@                                                           @#
#@  To disable this warning use the -nopw option, or put     @#
#@  'nopw' on a line in your ~/.x11vncrc file.               @#
#@                                                           @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
###############################################################
21/08/2020 04:25:53 x11vnc version: 0.9.13 lastmod: 2011-08-10  pid: 4804
21/08/2020 04:25:54 -auth guess: using 'XAUTHORITY=/home/pi/.Xauthority' for disp=':0'
21/08/2020 04:25:54 Using X display :0
21/08/2020 04:25:54 rootwin: 0x389 reswin: 0x1400001 dpy: 0x1fe5538
21/08/2020 04:25:54 
21/08/2020 04:25:54 ------------------ USEFUL INFORMATION ------------------
21/08/2020 04:25:54 X DAMAGE available on display, using it for polling hints.
21/08/2020 04:25:54   To disable this behavior use: '-noxdamage'
21/08/2020 04:25:54 
21/08/2020 04:25:54   Most compositing window managers like 'compiz' or 'beryl'
21/08/2020 04:25:54   cause X DAMAGE to fail, and so you may not see any screen
21/08/2020 04:25:54   updates via VNC.  Either disable 'compiz' (recommended) or
21/08/2020 04:25:54   supply the x11vnc '-noxdamage' command line option.
21/08/2020 04:25:54 
21/08/2020 04:25:54 Wireframing: -wireframe mode is in effect for window moves.
21/08/2020 04:25:54   If this yields undesired behavior (poor response, painting
21/08/2020 04:25:54   errors, etc) it may be disabled:
21/08/2020 04:25:54    - use '-nowf' to disable wireframing completely.
21/08/2020 04:25:54    - use '-nowcr' to disable the Copy Rectangle after the
21/08/2020 04:25:54      moved window is released in the new position.
21/08/2020 04:25:54   Also see the -help entry for tuning parameters.
21/08/2020 04:25:54   You can press 3 Alt_L's (Left "Alt" key) in a row to 
21/08/2020 04:25:54   repaint the screen, also see the -fixscreen option for
21/08/2020 04:25:54   periodic repaints.
21/08/2020 04:25:54 
21/08/2020 04:25:54 XFIXES available on display, resetting cursor mode
21/08/2020 04:25:54   to: '-cursor most'.
21/08/2020 04:25:54   to disable this behavior use: '-cursor arrow'
21/08/2020 04:25:54   or '-noxfixes'.
21/08/2020 04:25:54 using XFIXES for cursor drawing.
21/08/2020 04:25:54 GrabServer control via XTEST.
21/08/2020 04:25:54 
21/08/2020 04:25:54 Scroll Detection: -scrollcopyrect mode is in effect to
21/08/2020 04:25:54   use RECORD extension to try to detect scrolling windows
21/08/2020 04:25:54   (induced by either user keystroke or mouse input).
21/08/2020 04:25:54   If this yields undesired behavior (poor response, painting
21/08/2020 04:25:54   errors, etc) it may be disabled via: '-noscr'
21/08/2020 04:25:54   Also see the -help entry for tuning parameters.
21/08/2020 04:25:54   You can press 3 Alt_L's (Left "Alt" key) in a row to 
21/08/2020 04:25:54   repaint the screen, also see the -fixscreen option for
21/08/2020 04:25:54   periodic repaints.
21/08/2020 04:25:54 
21/08/2020 04:25:54 XKEYBOARD: number of keysyms per keycode 7 is greater
21/08/2020 04:25:54   than 4 and 192 keysyms are mapped above 4.
21/08/2020 04:25:54   Automatically switching to -xkb mode.
21/08/2020 04:25:54   If this makes the key mapping worse you can
21/08/2020 04:25:54   disable it with the "-noxkb" option.
21/08/2020 04:25:54   Also, remember "-remap DEAD" for accenting characters.
21/08/2020 04:25:54 
21/08/2020 04:25:54 X FBPM extension not supported.
21/08/2020 04:25:54 X display is capable of DPMS.
21/08/2020 04:25:54 --------------------------------------------------------
21/08/2020 04:25:54 
21/08/2020 04:25:54 Default visual ID: 0x21
21/08/2020 04:25:54 Read initial data from X display into framebuffer.
21/08/2020 04:25:54 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/4096
21/08/2020 04:25:54 
21/08/2020 04:25:54 X display :0 is 32bpp depth=24 true color
21/08/2020 04:25:54 
21/08/2020 04:25:54 Autoprobing TCP port 
21/08/2020 04:25:54 Autoprobing selected TCP port 5900
21/08/2020 04:25:54 Autoprobing TCP6 port 
21/08/2020 04:25:54 Autoprobing selected TCP6 port 5900
21/08/2020 04:25:54 listen6: bind: Address already in use
21/08/2020 04:25:54 Not listening on IPv6 interface.
21/08/2020 04:25:54 
21/08/2020 04:25:54 Xinerama is present and active (e.g. multi-head).
21/08/2020 04:25:54 Xinerama: number of sub-screens: 1
21/08/2020 04:25:54 Xinerama: no blackouts needed (only one sub-screen)
21/08/2020 04:25:54 
21/08/2020 04:25:54 fb read rate: 88 MB/sec
21/08/2020 04:25:54 fast read: reset -wait  ms to: 10
21/08/2020 04:25:54 fast read: reset -defer ms to: 10
21/08/2020 04:25:54 The X server says there are 10 mouse buttons.
21/08/2020 04:25:54 screen setup finished.
21/08/2020 04:25:54 
21/08/2020 04:25:54 WARNING: You are running x11vnc WITHOUT a password.  See
21/08/2020 04:25:54 WARNING: the warning message printed above for more info.
21/08/2020 04:25:54 

The VNC desktop is:      raspberrypi:0
PORT=5900

******************************************************************************
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval.  It should work with any VNC viewer.  Try it by running:

    x11vnc -ncache 10 ...

One can also add -ncache_cr for smooth 'copyrect' window motion.
More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching

21/08/2020 04:25:59 Got connection from client 10.3.1.1
21/08/2020 04:25:59   other clients:
21/08/2020 04:25:59 Normal socket connection
21/08/2020 04:25:59 Disabled X server key autorepeat.
21/08/2020 04:25:59   to force back on run: 'xset r on' (3 times)
21/08/2020 04:25:59 incr accepted_client=1 for 10.3.1.1:34544  sock=11
21/08/2020 04:25:59 Client Protocol Version 3.8
21/08/2020 04:25:59 Protocol version sent 3.8, using 3.8
21/08/2020 04:25:59 rfbProcessClientSecurityType: executing handler for type 1
21/08/2020 04:25:59 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8
21/08/2020 04:25:59 Pixel format for client 10.3.1.1:
21/08/2020 04:25:59   32 bpp, depth 24, little endian
21/08/2020 04:25:59   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
21/08/2020 04:25:59 no translation needed
21/08/2020 04:25:59 rfbProcessClientNormalMessage: ignoring unsupported encoding type ultraZip
21/08/2020 04:25:59 Using compression level 3 for client 10.3.1.1
21/08/2020 04:25:59 Using image quality level 5 for client 10.3.1.1
21/08/2020 04:25:59 Using JPEG subsampling 2, Q77 for client 10.3.1.1
21/08/2020 04:25:59 Enabling KeyboardLedState protocol extension for client 10.3.1.1
21/08/2020 04:25:59 Enabling NewFBSize protocol extension for client 10.3.1.1
21/08/2020 04:25:59 Enabling LastRect protocol extension for client 10.3.1.1
21/08/2020 04:25:59 Enabling SupportedMessages protocol extension for client 10.3.1.1
21/08/2020 04:25:59 Enabling SupportedEncodings protocol extension for client 10.3.1.1
21/08/2020 04:25:59 Enabling ServerIdentity protocol extension for client 10.3.1.1
21/08/2020 04:25:59 Using tight encoding for client 10.3.1.1
21/08/2020 04:25:59 Pixel format for client 10.3.1.1:
21/08/2020 04:25:59   32 bpp, depth 24, little endian
21/08/2020 04:25:59   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
21/08/2020 04:25:59 no translation needed
21/08/2020 04:25:59 rfbProcessClientNormalMessage: ignoring unsupported encoding type ultraZip
21/08/2020 04:25:59 Using compression level 3 for client 10.3.1.1
21/08/2020 04:25:59 Using image quality level 5 for client 10.3.1.1
21/08/2020 04:25:59 Using JPEG subsampling 2, Q77 for client 10.3.1.1
21/08/2020 04:25:59 Enabling KeyboardLedState protocol extension for client 10.3.1.1
21/08/2020 04:25:59 Enabling NewFBSize protocol extension for client 10.3.1.1
21/08/2020 04:25:59 Enabling LastRect protocol extension for client 10.3.1.1
21/08/2020 04:25:59 Enabling SupportedMessages protocol extension for client 10.3.1.1
21/08/2020 04:25:59 Enabling SupportedEncodings protocol extension for client 10.3.1.1
21/08/2020 04:25:59 Enabling ServerIdentity protocol extension for client 10.3.1.1
21/08/2020 04:25:59 Switching from tight to tight Encoding for client 10.3.1.1
21/08/2020 04:25:59 client 1 network rate 1118.2 KB/sec (32883.7 eff KB/sec)
21/08/2020 04:25:59 client 1 latency:  1.1 ms
21/08/2020 04:25:59 dt1: 0.0931, dt2: 0.0032 dt3: 0.0011 bytes: 107007
21/08/2020 04:25:59 link_rate: LR_LAN - 1 ms, 1118 KB/s
21/08/2020 04:25:59 client useCopyRect: 10.3.1.1 -1
21/08/2020 04:25:59 client_set_net: 10.3.1.1  0.0205
21/08/2020 04:25:59 created   xdamage object: 0x1400024
21/08/2020 04:26:01 copy_tiles: allocating first_line at size 33
21/08/2020 04:26:08 created selwin: 0x1400025
21/08/2020 04:26:08 called initialize_xfixes()
caught signal: 2
21/08/2020 04:26:08 deleted 32 tile_row polling images.
21/08/2020 04:26:08 Restored X server key autorepeat to: 1

Server output with xtightvncviewer connecting:

###############################################################
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@                                                           @#
#@  **  WARNING  **  WARNING  **  WARNING  **  WARNING  **   @#
#@                                                           @#
#@        YOU ARE RUNNING X11VNC WITHOUT A PASSWORD!!        @#
#@                                                           @#
#@  This means anyone with network access to this computer   @#
#@  may be able to view and control your desktop.            @#
#@                                                           @#
#@ >>> If you did not mean to do this Press CTRL-C now!! <<< @#
#@                                                           @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@                                                           @#
#@  You can create an x11vnc password file by running:       @#
#@                                                           @#
#@       x11vnc -storepasswd password /path/to/passfile      @#
#@  or   x11vnc -storepasswd /path/to/passfile               @#
#@  or   x11vnc -storepasswd                                 @#
#@                                                           @#
#@  (the last one will use ~/.vnc/passwd)                    @#
#@                                                           @#
#@  and then starting x11vnc via:                            @#
#@                                                           @#
#@      x11vnc -rfbauth /path/to/passfile                    @#
#@                                                           @#
#@  an existing ~/.vnc/passwd file from another VNC          @#
#@  application will work fine too.                          @#
#@                                                           @#
#@  You can also use the -passwdfile or -passwd options.     @#
#@  (note -passwd is unsafe if local users are not trusted)  @#
#@                                                           @#
#@  Make sure any -rfbauth and -passwdfile password files    @#
#@  cannot be read by untrusted users.                       @#
#@                                                           @#
#@  Use x11vnc -usepw to automatically use your              @#
#@  ~/.vnc/passwd or ~/.vnc/passwdfile password files.       @#
#@  (and prompt you to create ~/.vnc/passwd if neither       @#
#@  file exists.)  Under -usepw, x11vnc will exit if it      @#
#@  cannot find a password to use.                           @#
#@                                                           @#
#@                                                           @#
#@  Even with a password, the subsequent VNC traffic is      @#
#@  sent in the clear.  Consider tunnelling via ssh(1):      @#
#@                                                           @#
#@    http://www.karlrunge.com/x11vnc/#tunnelling            @#
#@                                                           @#
#@  Or using the x11vnc SSL options: -ssl and -stunnel       @#
#@                                                           @#
#@  Please Read the documention for more info about          @#
#@  passwords, security, and encryption.                     @#
#@                                                           @#
#@    http://www.karlrunge.com/x11vnc/faq.html#faq-passwd    @#
#@                                                           @#
#@  To disable this warning use the -nopw option, or put     @#
#@  'nopw' on a line in your ~/.x11vncrc file.               @#
#@                                                           @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
###############################################################
21/08/2020 04:32:13 x11vnc version: 0.9.13 lastmod: 2011-08-10  pid: 5153
21/08/2020 04:32:14 -auth guess: using 'XAUTHORITY=/home/pi/.Xauthority' for disp=':0'
21/08/2020 04:32:14 Using X display :0
21/08/2020 04:32:14 rootwin: 0x389 reswin: 0x1400001 dpy: 0xf45538
21/08/2020 04:32:14 
21/08/2020 04:32:14 ------------------ USEFUL INFORMATION ------------------
21/08/2020 04:32:14 X DAMAGE available on display, using it for polling hints.
21/08/2020 04:32:14   To disable this behavior use: '-noxdamage'
21/08/2020 04:32:14 
21/08/2020 04:32:14   Most compositing window managers like 'compiz' or 'beryl'
21/08/2020 04:32:14   cause X DAMAGE to fail, and so you may not see any screen
21/08/2020 04:32:14   updates via VNC.  Either disable 'compiz' (recommended) or
21/08/2020 04:32:14   supply the x11vnc '-noxdamage' command line option.
21/08/2020 04:32:14 
21/08/2020 04:32:14 Wireframing: -wireframe mode is in effect for window moves.
21/08/2020 04:32:14   If this yields undesired behavior (poor response, painting
21/08/2020 04:32:14   errors, etc) it may be disabled:
21/08/2020 04:32:14    - use '-nowf' to disable wireframing completely.
21/08/2020 04:32:14    - use '-nowcr' to disable the Copy Rectangle after the
21/08/2020 04:32:14      moved window is released in the new position.
21/08/2020 04:32:14   Also see the -help entry for tuning parameters.
21/08/2020 04:32:14   You can press 3 Alt_L's (Left "Alt" key) in a row to 
21/08/2020 04:32:14   repaint the screen, also see the -fixscreen option for
21/08/2020 04:32:14   periodic repaints.
21/08/2020 04:32:14 
21/08/2020 04:32:14 XFIXES available on display, resetting cursor mode
21/08/2020 04:32:14   to: '-cursor most'.
21/08/2020 04:32:14   to disable this behavior use: '-cursor arrow'
21/08/2020 04:32:14   or '-noxfixes'.
21/08/2020 04:32:14 using XFIXES for cursor drawing.
21/08/2020 04:32:14 GrabServer control via XTEST.
21/08/2020 04:32:14 
21/08/2020 04:32:14 Scroll Detection: -scrollcopyrect mode is in effect to
21/08/2020 04:32:14   use RECORD extension to try to detect scrolling windows
21/08/2020 04:32:14   (induced by either user keystroke or mouse input).
21/08/2020 04:32:14   If this yields undesired behavior (poor response, painting
21/08/2020 04:32:14   errors, etc) it may be disabled via: '-noscr'
21/08/2020 04:32:14   Also see the -help entry for tuning parameters.
21/08/2020 04:32:14   You can press 3 Alt_L's (Left "Alt" key) in a row to 
21/08/2020 04:32:14   repaint the screen, also see the -fixscreen option for
21/08/2020 04:32:14   periodic repaints.
21/08/2020 04:32:14 
21/08/2020 04:32:14 XKEYBOARD: number of keysyms per keycode 7 is greater
21/08/2020 04:32:14   than 4 and 192 keysyms are mapped above 4.
21/08/2020 04:32:14   Automatically switching to -xkb mode.
21/08/2020 04:32:14   If this makes the key mapping worse you can
21/08/2020 04:32:14   disable it with the "-noxkb" option.
21/08/2020 04:32:14   Also, remember "-remap DEAD" for accenting characters.
21/08/2020 04:32:14 
21/08/2020 04:32:14 X FBPM extension not supported.
21/08/2020 04:32:14 X display is capable of DPMS.
21/08/2020 04:32:14 --------------------------------------------------------
21/08/2020 04:32:14 
21/08/2020 04:32:14 Default visual ID: 0x21
21/08/2020 04:32:14 Read initial data from X display into framebuffer.
21/08/2020 04:32:14 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/4096
21/08/2020 04:32:14 
21/08/2020 04:32:14 X display :0 is 32bpp depth=24 true color
21/08/2020 04:32:14 
21/08/2020 04:32:14 Autoprobing TCP port 
21/08/2020 04:32:14 Autoprobing selected TCP port 5900
21/08/2020 04:32:14 Autoprobing TCP6 port 
21/08/2020 04:32:14 Autoprobing selected TCP6 port 5900
21/08/2020 04:32:14 listen6: bind: Address already in use
21/08/2020 04:32:14 Not listening on IPv6 interface.
21/08/2020 04:32:14 
21/08/2020 04:32:14 Xinerama is present and active (e.g. multi-head).
21/08/2020 04:32:14 Xinerama: number of sub-screens: 1
21/08/2020 04:32:14 Xinerama: no blackouts needed (only one sub-screen)
21/08/2020 04:32:14 
21/08/2020 04:32:14 fb read rate: 92 MB/sec
21/08/2020 04:32:14 fast read: reset -wait  ms to: 10
21/08/2020 04:32:14 fast read: reset -defer ms to: 10
21/08/2020 04:32:14 The X server says there are 10 mouse buttons.
21/08/2020 04:32:14 screen setup finished.
21/08/2020 04:32:14 
21/08/2020 04:32:14 WARNING: You are running x11vnc WITHOUT a password.  See
21/08/2020 04:32:14 WARNING: the warning message printed above for more info.
21/08/2020 04:32:14 

The VNC desktop is:      raspberrypi:0
PORT=5900

******************************************************************************
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval.  It should work with any VNC viewer.  Try it by running:

    x11vnc -ncache 10 ...

One can also add -ncache_cr for smooth 'copyrect' window motion.
More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching

21/08/2020 04:32:17 Got connection from client 10.3.1.1
21/08/2020 04:32:17   other clients:
21/08/2020 04:32:17 Normal socket connection
21/08/2020 04:32:17 Disabled X server key autorepeat.
21/08/2020 04:32:17   to force back on run: 'xset r on' (3 times)
21/08/2020 04:32:17 incr accepted_client=1 for 10.3.1.1:34554  sock=11
21/08/2020 04:32:17 Client Protocol Version 3.8
21/08/2020 04:32:17 Protocol version sent 3.8, using 3.8
21/08/2020 04:32:17 rfbProcessClientSecurityType: executing handler for type 1
21/08/2020 04:32:17 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8
21/08/2020 04:32:17 Pixel format for client 10.3.1.1:
21/08/2020 04:32:17   32 bpp, depth 24, little endian
21/08/2020 04:32:17   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
21/08/2020 04:32:17 no translation needed
21/08/2020 04:32:17 Using compression level 1 for client 10.3.1.1
21/08/2020 04:32:17 Using image quality level 6 for client 10.3.1.1
21/08/2020 04:32:17 Using JPEG subsampling 0, Q79 for client 10.3.1.1
21/08/2020 04:32:17 Enabling X-style cursor updates for client 10.3.1.1
21/08/2020 04:32:17 Enabling full-color cursor updates for client 10.3.1.1
21/08/2020 04:32:17 Enabling cursor position updates for client 10.3.1.1
21/08/2020 04:32:17 Enabling LastRect protocol extension for client 10.3.1.1
21/08/2020 04:32:17 Using tight encoding for client 10.3.1.1
21/08/2020 04:32:17 client useCopyRect: 10.3.1.1 -1
21/08/2020 04:32:17 client_set_net: 10.3.1.1  0.0057
21/08/2020 04:32:17 created   xdamage object: 0x1400024
caught signal: 2
21/08/2020 04:32:23 deleted 32 tile_row polling images.
21/08/2020 04:32:23 Restored X server key autorepeat to: 1

I'm puzzled if this is a server or client problem. I can help debugging the client side.

Thanks, Flössie

bk138 commented 4 years ago

Please try to identify the flaky component by using another server, then another client :-)

Floessie commented 4 years ago

@bk138 Using tightvncserver on the RasPi doesn't show the problem.

Server log:

21/08/20 09:30:03 Xvnc version TightVNC-1.3.9
21/08/20 09:30:03 Copyright (C) 2000-2007 TightVNC Group
21/08/20 09:30:03 Copyright (C) 1999 AT&T Laboratories Cambridge
21/08/20 09:30:03 All Rights Reserved.
21/08/20 09:30:03 See http://www.tightvnc.com/ for information on TightVNC
21/08/20 09:30:03 Desktop name 'X' (raspberrypi:1)
21/08/20 09:30:03 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
21/08/20 09:30:03 Listening for VNC connections on TCP port 5901
Font directory '/usr/share/fonts/X11/Type1/' not found - ignoring
Font directory '/usr/share/fonts/X11/75dpi/' not found - ignoring
xrdb: No such file or directory
xrdb: can't open file '/root/.Xresources'

21/08/20 09:30:45 Got connection from client 10.3.1.1
21/08/20 09:30:45 Using protocol version 3.8
21/08/20 09:30:48 Full-control authentication passed by 10.3.1.1
21/08/20 09:30:48 Pixel format for client 10.3.1.1:
21/08/20 09:30:48   32 bpp, depth 24, little endian
21/08/20 09:30:48   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
21/08/20 09:30:48   no translation needed
21/08/20 09:30:48 Using tight encoding for client 10.3.1.1
21/08/20 09:30:48 rfbProcessClientNormalMessage: ignoring unknown encoding 16
21/08/20 09:30:48 rfbProcessClientNormalMessage: ignoring unknown encoding 9
21/08/20 09:30:48 rfbProcessClientNormalMessage: ignoring unknown encoding -65527
21/08/20 09:30:48 Using compression level 3 for client 10.3.1.1
21/08/20 09:30:48 Using image quality level 5 for client 10.3.1.1
21/08/20 09:30:48 rfbProcessClientNormalMessage: ignoring unknown encoding -131072
21/08/20 09:30:48 rfbProcessClientNormalMessage: ignoring unknown encoding -223
21/08/20 09:30:48 Enabling LastRect protocol extension for client 10.3.1.1
21/08/20 09:30:48 rfbProcessClientNormalMessage: ignoring unknown encoding -131071
21/08/20 09:30:48 rfbProcessClientNormalMessage: ignoring unknown encoding -131070
21/08/20 09:30:48 rfbProcessClientNormalMessage: ignoring unknown encoding -131069
21/08/20 09:30:48 rfbProcessClientNormalMessage: ignoring unknown encoding -309
21/08/20 09:30:48 Pixel format for client 10.3.1.1:
21/08/20 09:30:48   32 bpp, depth 24, little endian
21/08/20 09:30:48   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
21/08/20 09:30:48   no translation needed
21/08/20 09:30:48 Using tight encoding for client 10.3.1.1
21/08/20 09:30:48 rfbProcessClientNormalMessage: ignoring unknown encoding 16
21/08/20 09:30:48 rfbProcessClientNormalMessage: ignoring unknown encoding 9
21/08/20 09:30:48 rfbProcessClientNormalMessage: ignoring unknown encoding -65527
21/08/20 09:30:48 Using compression level 3 for client 10.3.1.1
21/08/20 09:30:48 Using image quality level 5 for client 10.3.1.1
21/08/20 09:30:48 rfbProcessClientNormalMessage: ignoring unknown encoding -131072
21/08/20 09:30:48 rfbProcessClientNormalMessage: ignoring unknown encoding -223
21/08/20 09:30:48 Enabling LastRect protocol extension for client 10.3.1.1
21/08/20 09:30:48 rfbProcessClientNormalMessage: ignoring unknown encoding -131071
21/08/20 09:30:48 rfbProcessClientNormalMessage: ignoring unknown encoding -131070
21/08/20 09:30:48 rfbProcessClientNormalMessage: ignoring unknown encoding -131069
21/08/20 09:30:48 rfbProcessClientNormalMessage: ignoring unknown encoding -309
21/08/20 09:31:30 Client 10.3.1.1 gone
21/08/20 09:31:30 Statistics:
21/08/20 09:31:30   key events received 18, pointer events 1051
21/08/20 09:31:30   framebuffer updates 1044, rectangles 3415, bytes 558407
21/08/20 09:31:30     LastRect markers 12, bytes 144
21/08/20 09:31:30     copyRect rectangles 311, bytes 4976
21/08/20 09:31:30     tight rectangles 3092, bytes 553287
21/08/20 09:31:30   raw bytes equivalent 10717756, compression ratio 19.371061

So,

HTH, Flössie