Bug 379202

Summary: “vncviewer -nocursorshape” makes Xorg, Xvnc, and vncviewr use all available CPU time
Product: [openSUSE] openSUSE 11.0 Reporter: Mike Fabian <mfabian>
Component: X11 ApplicationsAssignee: Reinhard Max <max>
Status: RESOLVED INVALID QA Contact: Stefan Dirsch <sndirsch>
Severity: Normal    
Priority: P5 - None    
Version: Factory   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Mike Fabian 2008-04-11 16:22:16 UTC
“vncviewer -nocursorshape” makes Xorg, Xvnc, and vncviewr use all
available CPU time.
Comment 1 Mike Fabian 2008-04-11 16:29:20 UTC
I start a vncserver like

    vncserver -geometry 1280x1024 :2

I made ~/.vnc/xstartup an empty file to exclude that the problem
is caused by anything I start automatically.

Then I connect with

    vncviewer -nocursorshape :2

And now Xvnc, vncviewer, and Xorg use up all availlable CPU time:

16869 mfabian   20   0 71392  17m 2392 S 28.6  0.9   0:18.50 Xvnc                    
16896 mfabian   20   0 49448 7988 1920 R 28.6  0.4   0:18.34 vncviewer               
  646 root      20   0  289m 104m 8252 S 21.6  5.2  38:25.44 Xorg                    
Comment 2 Reinhard Max 2008-10-28 17:11:38 UTC
It looks to me like this is what you get from disabling a performance improvement feature. See the manpage section on -nocursorshape in the vncviewer manpage.

Why are you using -nocursorshape at all?
Comment 3 Mike Fabian 2008-10-28 17:24:27 UTC
I think I misread the man-page. I wanted to improve performance over a
low bandwidth line and thought that "-nocursorshape" makes things
uglier but faster.

I still find the text in the man-page confusing:

       -nocursorshape
              Disable  cursor  shape  updates,  protocol extensions used to handle
              remote cursor movements locally on the  client  side  (TightVNC-spe-
              cific).  Using  cursor  shape  updates  decreases delays with remote
              cursor movements, and can improve bandwidth usage dramatically.


So that means that for best performance over a slow line I should
*not* use "-nocursorshape"? If yes, my bug report is INVALID.
I understood just the opposite.
Comment 4 Mike Fabian 2008-10-28 17:26:39 UTC
And what about this option:

       -x11cursor
              Use a real X11 cursor with X-style cursor shape updates, instead  of
              drawing  the remote cursor on the framebuffer. This option also dis-
              ables the dot cursor, and disables cursor position updates  in  non-
              fullscreen mode.

Should I set it to make things faster over a low bandwidth line or
not?
Comment 5 Reinhard Max 2008-10-28 17:54:39 UTC
(In reply to comment #3 from Mike Fabian)

> So that means that for best performance over a slow line I should
> *not* use "-nocursorshape"?

Yes, that's how I understand it. When strace'ing vncviewer -nocursorshape, I saw that its eating of CPU cycles is mostly due to the fact that it chatters with the server all the time.

> If yes, my bug report is INVALID.

Will do.

(In reply to comment #4 from Mike Fabian)
> Should I set it [-x11cursor] to make things faster over a low
> bandwidth line or not?

Don't know if this only means the client saves some CPU cycles on not having to draw the cursor or if it has a way to stop the server from sending the data at first place.