LibVNC / x11vnc

a VNC server for real X displays
GNU General Public License v2.0
731 stars 142 forks source link

Graphics corruption artifacts issues #88

Open knro opened 5 years ago

knro commented 5 years ago

I installed x11vnc from Github on Ubuntu Server 18.04 for RPI3B+ on armhf architecture. It is managed by a systemd service:

[Unit]
Description=Start x11vnc at startup.
Before=novnc.service
After=multi-user.target

[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -avahi -forever -shared -rfbauth /home/knro/.vnc/passwd -autoport 5900 -auth /var/run/lightdm/root/:0
Restart=on-failure
RestartSec=2

[Install]
WantedBy=multi-user.target

When I try to connect to it either directly via using VNC clients like KRDC, TigerVNC..etc, then I get severe graphical corruption. It seems mostly to affect Qt applications (this is running on Ubuntu Mate with lightdm) though the artifacts also affect to lesser degree GTK applications. The corruption also shows on noVNC.

What's odd is that there is no corruption when using RealVNC. Attach is a screenshot for my 3-monitors using from left to right (KRDC --> RealVNC --> TigerVNC). You can see the corruption on the first and third monitors. I tried to play with many x11vnc settings to no avail. The same artifacts also appear when using the x11vnc from the official 18.04 repo. graphics_corruption

bk138 commented 5 years ago

You might try playing around with the different methods of getting the framebuffer in x11vnc. -snapfb or sth around -noxdamage come to mind. There are a lot of them :-)

knro commented 5 years ago

I tried almost all the combination to no avail :-(

I don't know why this bug showed up in 18.04. But it doesn't matter if I use the Ubuntu x11vnc or Github version, they both experience the same graphics corruption.

bk138 commented 5 years ago

@knro Can you try with an older x11vnc version and maybe find a last-good one?

bk138 commented 5 years ago

@knro which LibVNCServer version are you using?

bk138 commented 4 years ago

@username729 Does the issue show with Raspbian Jessie as well?

username7291 commented 4 years ago

No it works perfect with Jessie. The intresting is on Jessie i too updated the Firmware to the new Version and it still works. Means its a Problem in the Operating system or related to drivers that are only in use with 3B+/4B Hardware. If i could i would still use Jessie but the minimum Requirement for RPI4 ist Buster and for RPI3B+ its stretch in the later Versions.

bk138 commented 4 years ago

Let's try a theory: X.org version and/or drivers used. What are the differences? Did they maybe add a new acceleration method?

username7291 commented 4 years ago

Im have not much knowledge about the working of Linux graphics system. The PI4 has 2 HDMI ports and 3D support its VideoCore VI (OpenGL-ES 3.0; 4K) instead of VideoCore IV (OpenGL-ES 1.1/2.0; Full HD 1080p30) . The 3D i disabled already without luck. The PI3B+ is almost the same like PI3 but they attached the wifi not via usb but via spi and add a new gigabit ethernet->usb chip, cause of this i think the requirement is stretch. I tryed downgrade lightdm to 1.10.3-3 and installed xorg(seems not installed before) both doesnt help. I would guess they indroduce some type of Bug in the Operating System layer.

bk138 commented 4 years ago

You might want to try the new GL driver: https://github.com/raspberrypi/documentation/blob/master/configuration/raspi-config.md#gl-driver

username7291 commented 4 years ago

I tryed with no luck: -1 Legacy+2 GL (Fake KMS) (no other options) -Disable 4K&Composite -enable/disable xcompmgr -set screenmode again -disable pixel doubling

username7291 commented 4 years ago

-fixscreen V=0.1 helps a little bit while typing. You can almost read what you type into the shell with this. But like a full refresh request it doesnt fix all all errors on the screen, even not the unchanged screen parts. Too i tryed alot of other options like snapfb,noxdamage,xwarppointer,xinerama, xd_area, nowcr. Im updated mesa to the newest and i downgraded mesa to 18.3.6-2. I tryed too downgrading xserver-org-core to 2.1.16.4 but this dont boot to gui.

username7291 commented 4 years ago

It seems like this only happend if tight encoding is set, not on: RAW,Hextile,RRE,ZRLE Maybe related to https://github.com/LibVNC/libvncserver/issues/363 krfb use the libvncserver and has the identical Problem.

bk138 commented 4 years ago

Maybe you can try going back to an older libvncserver version and nail down the problem in change history. Just an idea...

username7291 commented 4 years ago

The x11vnc that is provided with rasbian buster is 0.9.13-6 (old same jessie) libvncserver1 is 0.9.11+dfsg-1.3 (old 2016). Jessi: 0.9.9 libvncserver0 I read the desciption wrong and assumed that the old Version have the library inbuild and it was splitted later. I mange to install the old versions of x11vnc and libvncserver0 the corruption is away. I assume the distributors of ARM Software compile your Software and give it with apt to the users?

gcc on raspbian dont work with some sources special it seem to have problems with 64Bit values.

bk138 commented 4 years ago

@username7291 what you can do is:

--> you should end up with the change that introduced this after a short (or longer) while.

(If you need futher info on how to do this, just ask :-) )

username7291 commented 4 years ago

Its no problem to use the old version, i even prefer that cause i found no problems with it. I cloned libvncserver&x11vnc already to try the newest version, but im not sure if x11vnc use the lib from git or the installed one. The example doesnt allow a connection to it. x11vnc should already out cause krfb has the same issue I dont know how to download an older git source version, it would faster to search the for the problem in tight.c. I seen "int" and "long" in it, they are different in size on 32 bit(arm) and 64 bit(usual computers) sizes.

scimmiettarossa commented 3 years ago

I have the same problem with my Cubieboard1..

It was on (jessie-based) and x11vnc was running smoothly (using a remmina client or a vinagre one, from other linux desktops).

Then I updated it to armbian-stretch --> again, everithing is ok Finally, I moved to armbian-buster, and I obtain the graphical artifacts, no matter which client I use

I read the previous posts, but I'm not able to solve the problem. has anyone had success with this issue? thanks rosanna