Bug 320459 - Unreliable input shaping in vnc
Summary: Unreliable input shaping in vnc
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Unclassified
Component: core (show other bugs)
Version: 4.10.3
Platform: Ubuntu Packages Linux
: NOR major (vote)
Target Milestone: ---
Assignee: KWin default assignee
URL: https://git.reviewboard.kde.org/r/112...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-30 04:30 UTC by Franklin Weng
Modified: 2013-09-23 23:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.2
thomas.luebking: ReviewRequest+


Attachments
xdpyinfo log launched inside a vnc session (3.62 KB, text/x-log)
2013-06-11 02:19 UTC, Franklin Weng
Details
Xorg.0.log for vnc session (34.48 KB, text/x-log)
2013-06-11 02:19 UTC, Franklin Weng
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Franklin Weng 2013-05-30 04:30:56 UTC
When I connect to a remote desktop (running vnc4server) using krdc or any other vnc client (like realvnc-viewer), I got a wrong mouse cursor like this:

http://www.goodhorse.idv.tw/goodhorse/vnc.jpg

it will not let me click anything inside the main window, just stretch or shrink the width of the window.

The vnc startup script is simple.  It just launched /etc/X11/Xsession.

I did some more test, and found that:

 - In a fresh install of kubuntu 12.10 (running KDE 4.9.5), this problem did not occur.
 - When I upgrade kubuntu 12.10 to KDE 4.10.3, this problem occurred.
 - In a fresh install of kubuntu 13.04 (running KDE 4.10.2), this problem occurred.
 - In a upgraded kubuntu 12.10, if I started vnc session using LXDE, this problem did not occur.
 - Then I tried to change the xstartup script called by vnc to let the session run only kdeinit4 and a vnc config dialog.  That is, no real KDE desktop was launched, just kwin (I suppose).  This problem occurred.  (In that vnc config dialog the same mouse cursor problem occurred.)
 - From the main console running KDE (display :0.0), this problem did not occurred.  However if I did not launch kdm but run vncserver :0 instead, this problem still occurred.

I found the following discussion.  Someone had the same problem, but no answer.

https://bbs.archlinux.org/viewtopic.php?id=158348

From the test I did I'm now quite sure it is a KDE 4.10 problem, just that I can't identify it a kwin's problem, or any other component's.


Reproducible: Always

Steps to Reproduce:
1. On a fresh Kubuntu 13.04 or up-to-date Kubuntu 12.10 (running KDE 4.10.3), run vnc4server
2. Connect to this system from other machine using krdc or any VNC client
3. The mouse cursor was wrong.  In a window I can only change the width or height, but can not click any component inside.
Actual Results:  
The mouse cursor (state) was wrong.

Expected Results:  
The mouse cursor (state) should be correct, to let me do any operation like usual.

KDE 4.9.5 worked fine.  From the information I got and the test I did, it should be a problem in KDE 4.10.
Comment 1 Franklin Weng 2013-06-11 02:19:00 UTC
Created attachment 80438 [details]
xdpyinfo log launched inside a vnc session
Comment 2 Franklin Weng 2013-06-11 02:19:41 UTC
Created attachment 80439 [details]
Xorg.0.log for vnc session
Comment 3 Franklin Weng 2013-06-11 02:21:33 UTC
Following Thomas' suggestion, I changed the window decoration from Oxygen to Laptop.  It worked!  This problem didn't occurred.

The xdpyinfo output and Xorg.0.log attached.

I also tested Quartz decoration.  It worked too.  It looks like a problem of Oxygen decoration?
Comment 4 Thomas Lübking 2013-06-11 07:24:28 UTC
The problem is, that the server misannounces the availability of input shaping or kwin misdetects it.
The shape extension is there and loaded, do you have any messages in .xsession-errors or when starting "kwin --replace" from konsole, which sound related?
Comment 5 Thomas Lübking 2013-06-11 07:32:42 UTC
ftr:
vendor string:    The XFree86 Project, Inc
vendor release number:    40300000
XFree86 version: 4.3.0


that "slightly" dated X11 version would rather not have input shaping
Comment 6 Franklin Weng 2013-06-11 07:36:31 UTC
(In reply to comment #4)
> The problem is, that the server misannounces the availability of input
> shaping or kwin misdetects it.
> The shape extension is there and loaded, do you have any messages in
> .xsession-errors or when starting "kwin --replace" from konsole, which sound
> related?

Since using the same vnc server with KDE 4.9 would not have any problem, even using Oxygen decoration too, I think it may be more like kwin (in KDE 4.10) misdetected it.

I'm now experiencing on another box and will give the xsession-errors result later.
Comment 7 Martin Flöser 2013-06-11 07:58:56 UTC
shot into the blue: the extended input area? @Frank: please ensure that the 
Oxygen border size is at least normal. Don't use tiny or no side borders or no 
borders.

Please also give a try to the new Plastik in 4.10, which is the most close 
decoration to Oxygen.
Comment 8 Franklin Weng 2013-06-11 08:14:17 UTC
(In reply to comment #7)
> shot into the blue: the extended input area? @Frank: please ensure that the 
> Oxygen border size is at least normal. Don't use tiny or no side borders or
> no 
> borders.
> 
> Please also give a try to the new Plastik in 4.10, which is the most close 
> decoration to Oxygen.

Um... I don't know about oxygen border size.  I just used default one after installing a fresh kubuntu 12.10 (or 13.04) and upgraded to KDE 4.10.  I don't think it would use tiny or no side borders or no borders. (Please see my screenshot  http://www.goodhorse.idv.tw/goodhorse/vnc.jpg and see the window's border)
Comment 9 Franklin Weng 2013-06-11 08:41:55 UTC
According to Hugo's suggestion, adding

[Windeco]
UseExtendedWindowBorders=false


to .kde/share/config/oxygenrc   (create it if not exist) would solve this problem under oxygen decoration.
Comment 10 Thomas Lübking 2013-06-11 08:43:03 UTC
(In reply to comment #7)
> shot into the blue: the extended input area? 
i'm betting many ppls. arms on this, yes.

@Frank
the feature was simply not in use before - it's handling is also broken in older Qt versions, breaking DnD, why it's also blacklisted for those.

we're testing the shape extension version and require 1.1 (from 2006 reg xorg) - what might fail to respond correctly (host instead of client) or have deviated in xfree86 (where 4.3.0 is from 2002 or so)
Comment 11 Thomas Lübking 2013-06-11 11:19:09 UTC
what does (in the vnc session)
    xdpyinfo -ext SHAPE | grep SHAPE
print?
Comment 12 Thomas Lübking 2013-07-19 14:10:19 UTC
To say whether there's some issue in KWin or this is a bug in VNC, we need the output for comment #11
Comment 13 Franklin Weng 2013-09-09 14:37:52 UTC
Sorry for not updating this status.  Since my problem was solved with oxygenrc I didn't follow it anymore.


My xdpyinfo output was:

$ xdpyinfo -ext SHAPE | grep SHAPE
    SHAPE
SHAPE version 1.0 opcode: 128, base event: 64

Hope that helps.
Comment 14 Franklin Weng 2013-09-09 14:39:11 UTC
(In reply to comment #13)
> Sorry for not updating this status.  Since my problem was solved with
> oxygenrc I didn't follow it anymore.
> 
> 
> My xdpyinfo output was:
> 
> $ xdpyinfo -ext SHAPE | grep SHAPE
>     SHAPE
> SHAPE version 1.0 opcode: 128, base event: 64
> 
> Hope that helps.

BTW, this one was under a vnc session with oxygenrc set to UseExtendedWindowBorders=false.
I used oxygen decoration.
Comment 15 Thomas Lübking 2013-09-09 17:40:53 UTC
Thanks for bumping that (and confirming that VNC has insufficient input shaping)

The input shape test is not complete, so you'll get an input window though input shaping is not supported (thus the blocked input)
Comment 16 Thomas Lübking 2013-09-23 23:12:09 UTC
Git commit c2e7e0e5ec095c1519e372bf73e326d58927250d by Thomas Lübking.
Committed on 09/09/2013 at 17:38.
Pushed by luebking into branch 'KDE/4.11'.

input window: ensure input shaping is supported
FIXED-IN: 4.11.2
REVIEW: 112623

M  +3    -0    kwin/client.cpp

http://commits.kde.org/kde-workspace/c2e7e0e5ec095c1519e372bf73e326d58927250d