Bug 406316

Summary: krdc distorts screen, when connecting with medium quality, and saturated GB ethernet in high quality
Product: [Applications] krdc Reporter: Hans-Peter Jansen <hpj>
Component: VNCAssignee: Urs Wolfer <uwolfer>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: An distorted example

Description Hans-Peter Jansen 2019-04-07 22:27:01 UTC
Created attachment 119288 [details]
An distorted example

SUMMARY

When connecting via VNC from one openSUSE Tumbleweed system to another, I harvest: screen distortions in medium quality, and a saturated GBit ethernet connection with high quality. Only low quality behaves, but suffers from quality  perspective (as expected)-

STEPS TO REPRODUCE
1. use krdc 19.03.80 and below using VNC from TW 20190403 to TW 20190403, 
2. choose medium quality, no forced resolution, no scaling
3. connect

OBSERVED RESULT
screen displays okay for the first draw, then more and more distortions appear

EXPECTED RESULT
proper display

SOFTWARE/OS VERSIONS
openSUSE Tumbleweed 20190403
KDE Frameworks 5.56.0
Qt 5.12.2 (kompiliert gegen 5.12.2)
Das xcb Fenstersystem

ADDITIONAL INFORMATION
krdc built here: https://build.opensuse.org/package/show/home:frispete:Tumbleweed/krdc

The other end has VNC enabled within /etc/X11/xorg.conf.d/10-libvnc.conf:
Section "Module"
    Load "vnc"
EndSection

Section "Screen"
    Identifier "Screen0"
    Option "SecurityTypes" "VncAuth"
    Option "PasswordFile" "/root/.vnc/passwd"
EndSection

Running kdrc with debug options results in:
KRDC: Wallet OK
KRDC: Password read OK
KRDC: "VNC authentication succeeded"
KRDC: "Desktop name \"\b\""
KRDC: "Connected to VNC server, using protocol version 593193168.593193392"
KRDC: "VNC server default format:"
KRDC: "593193136 bits per pixel."
KRDC: "\b significant byte first in each pixel."
KRDC: "TRUE colour: max red 593193120 green 593193344 blue 16, shift red 8 green 8 blue 593193344"
KRDC: Client created
KRDC: 3 "Verbunden." "tw.lisa.loc" : 5900
KRDC: TCP keepalive set
KRDC: --------------------- Starting main VNC event loop ---------------------
KRDC: 1
KRDC: 2
KRDC: 3
KRDC: Found URL. Move it at the history start.
KRDC: Write wallet password
KRDC: Updating framebuffer size
KRDC: Resizing:  1920 1200
KRDC: tabwidget resize, view size: w:  1920 , h:  1200
KRDC: new window size:  QSize(1920, 1270)  available space: QSize(2560, 1560)

The other end is using 1920x1200x24 and kdm due to sddm missing XDMCP...
The krdc vnc lib is libvncclient1-0.9.12-1.1.x86_64, and tigervnc on the server is 1.9.0. 

I've tried a couple of older krdc revisions, but the problem persists.
Comment 1 Urs Wolfer 2019-04-08 15:08:17 UTC
Possible fix for this issue: https://phabricator.kde.org/D20123
Comment 2 Hans-Peter Jansen 2019-04-08 20:43:39 UTC
Well, the patch applied cleanly to 19.03.80, but no cake, unfortunately.
Could there be other similar accesses in different code paths?

Anyway, I've checked in the fix in my repo for documentation purposes...

I forgot to mention, that other VNC clients (vncviewer, bVNC Pro on Android) act just nice, but I don't know, which connection parameters they use exactly.

I've checked LibVNCclient and tigervnc github states. The former shows no significant changes, but the latter does many. Will try to replace that package on the server as a next step (sometimes this week, hopefully).
Comment 3 Hans-Peter Jansen 2019-04-17 18:09:11 UTC
Okay, tigervnc-1.9.0 was the culprit. After applying git master, all is well.

For the record, the fixed package:

https://build.opensuse.org/package/show/home:frispete:RemoteDesktop/tigervnc

Sorry for the churn. 

Will report a few lesa impacting issues soon (that definitely origin from krdc ;-))