Bug 1300250

Summary: Can't see mouse in vnc+qxl guest
Product: Red Hat Enterprise Linux 6 Reporter: mxie <mxie>
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED NEXTRELEASE QA Contact: Guo, Zhiyi <zhguo>
Severity: medium Docs Contact: Jiri Herrmann <jherrman>
Priority: medium    
Version: 6.8CC: ailan, areis, cfergeau, chayang, dblechte, fidencio, fziglio, jen, juzhang, juzhou, kraxel, mkenneth, mxie, mzhan, rbalakri, skrishna, tzheng, virt-maint, xiaodwan
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-01 17:37:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1359965, 1364808    

Description mxie@redhat.com 2016-01-20 10:57:46 UTC
Description of problem:
Can't see mouse in vnc+qxl guest 

Version-Release number of selected component (if applicable):
virt-viewer-2.0-12.el6.x86_64
xorg-x11-drv-qxl-0.1.1-17.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
1.Prepare a guest and edit xml as below
# virsh dumpxml rhel6released
   <graphics type='vnc' port='5901' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
    <video>
      <model type='qxl' ram='65536' vram='65536' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>

2.Use virt-viewer connect to the guest
# virt-viewer rhel6released 

3.Can't see mouse in guest 


Actual results:
As above description

Expected results:
Can see mouse in vnc+qxl guest 

Addtional info:
A guest configurated with vnc+cirrus has no this problem

Comment 2 Fabiano Fidêncio 2016-01-20 11:12:26 UTC
Can you check if this is a regression?

Comment 3 mxie@redhat.com 2016-01-21 06:15:27 UTC
(In reply to Fabiano Fidêncio from comment #2)
> Can you check if this is a regression?

Hi Fidencio,

Because I also can't see mouse of vnc+qxl guest in virt-manager, the bug maybe not caused by virt-viewer, I try to downgrade version of qxl to
xorg-x11-drv-qxl-0.1.1-16.el6.x86_64, the problem still exists, so this bug maybe a new one, thanks

VNC pkg:gtk-vnc-0.3.10-3.el6.x86_64

Comment 4 mxie@redhat.com 2016-01-21 06:15:43 UTC
(In reply to Fabiano Fidêncio from comment #2)
> Can you check if this is a regression?

Hi Fidencio,

Because I also can't see mouse of vnc+qxl guest in virt-manager, the bug maybe not caused by virt-viewer, I try to downgrade version of qxl to
xorg-x11-drv-qxl-0.1.1-16.el6.x86_64, the problem still exists, so this bug maybe a new one, thanks

VNC pkg:gtk-vnc-0.3.10-3.el6.x86_64

Comment 5 Fabiano Fidêncio 2016-02-16 10:58:01 UTC
(In reply to mxie from comment #4)
> (In reply to Fabiano Fidêncio from comment #2)
> > Can you check if this is a regression?
> 
> Hi Fidencio,
> 
> Because I also can't see mouse of vnc+qxl guest in virt-manager, the bug
> maybe not caused by virt-viewer, I try to downgrade version of qxl to
> xorg-x11-drv-qxl-0.1.1-16.el6.x86_64, the problem still exists, so this bug
> maybe a new one, thanks
> 
> VNC pkg:gtk-vnc-0.3.10-3.el6.x86_64

I'm moving the bug to gtk-vnc for now.

Comment 6 Fabiano Fidêncio 2016-02-16 11:08:01 UTC
Just to be sure ...

You have this problem when connecting to a RHEL-6 guest, right? If yes, is this RHEL-6 guest a 6.8 or a released 6.7? What's the version of the xorg-x11-drv-qxl on the GUEST? When you downgraded the xorg-x11-drv-qxl, you did in the GUEST, right?

Does this problem occur when connecting to another guests? Like, Fedora or RHEL-7?

Comment 7 Fabiano Fidêncio 2016-02-16 21:58:38 UTC
Just for the record ...

I am not able to reproduce the problem at all on RHEL-6.6 guest (it means xorg-x11-drv-qxl-0.1.1-15). I've upgrade to -16 and -17 and still cannot reproduce the problem.

I have another guest here, a fully updated RHEL-6.8 (it means xorg-x11-drv-qxl-0.1.1-18) and I can reproduce the issue on this guest.

Comment 8 mxie@redhat.com 2016-02-18 06:20:22 UTC
Hi Fidencio,
 
> You have this problem when connecting to a RHEL-6 guest, right? If yes, is
> this RHEL-6 guest a 6.8 or a released 6.7? What's the version of the
> xorg-x11-drv-qxl on the GUEST? 

The bug can be reproduced on rhel6.7 released guest(also can be reproduced after updating kernel to 2.6.32-615.el6.x86_64  )
qxl version in guest :xorg-x11-drv-qxl-0.1.1-17.el6.x86_64



>When you downgraded the xorg-x11-drv-qxl, you
> did in the GUEST, right?

I downgraded xorg-x11-drv-qxl in host, I'm sorry that I didn't take the focus on guest's qxl package at that time

> Does this problem occur when connecting to another guests? Like, Fedora or
> RHEL-7?

The bug can be reproduced on rhel7.2 guest. its qxl package version is xorg-x11-drv-qxl-0.1.1-18.el7.x86_64


> I am not able to reproduce the problem at all on RHEL-6.6 guest (it means 
> xorg-x11-drv-qxl-0.1.1-15). I've upgrade to -16 and -17 and still cannot > reproduce the problem.

It is very strange that I still can reproduce the problem at RHEL-6.6 guest with xorg-x11-drv-qxl-0.1.1-15

Comment 9 Fabiano Fidêncio 2016-02-22 11:11:10 UTC
Okay. Using a Fedora23 as host I do have the cursor problem using a updated RHEL-6.8 guest.

From  my investigations so far the mouse shows up when booting up the machine and then disappear in case of reconnection (or connection from another client).
The cursor comes back though when a cursor redraw is forced (or when opening an app, or when switching to the console and coming back to the graphical mode),

Assigning the bug to xorg-x11-drv-qxl for further investigation.

Comment 10 David Blechter 2016-02-29 16:12:26 UTC
(In reply to mxie from comment #8)
> Hi Fidencio,
>  
> > You have this problem when connecting to a RHEL-6 guest, right? If yes, is
> > this RHEL-6 guest a 6.8 or a released 6.7? What's the version of the
> > xorg-x11-drv-qxl on the GUEST? 
> 
> The bug can be reproduced on rhel6.7 released guest(also can be reproduced
> after updating kernel to 2.6.32-615.el6.x86_64  )
> qxl version in guest :xorg-x11-drv-qxl-0.1.1-17.el6.x86_64
> 
> 
> 
> >When you downgraded the xorg-x11-drv-qxl, you
> > did in the GUEST, right?
> 
> I downgraded xorg-x11-drv-qxl in host, I'm sorry that I didn't take the
> focus on guest's qxl package at that time
> 
> > Does this problem occur when connecting to another guests? Like, Fedora or
> > RHEL-7?
> 
> The bug can be reproduced on rhel7.2 guest. its qxl package version is
> xorg-x11-drv-qxl-0.1.1-18.el7.x86_64
> 
> 
> > I am not able to reproduce the problem at all on RHEL-6.6 guest (it means 
> > xorg-x11-drv-qxl-0.1.1-15). I've upgrade to -16 and -17 and still cannot > reproduce the problem.
> 
> It is very strange that I still can reproduce the problem at RHEL-6.6 guest
> with xorg-x11-drv-qxl-0.1.1-15

Not sure we should support vnc + qxl. It has never worked before (see BZ 707055)!

Comment 11 mxie@redhat.com 2016-03-02 02:55:15 UTC
Hi,David
As rjones said, qxl + vnc is supported.please see  
https://bugzilla.redhat.com/show_bug.cgi?id=1312254#c5

Comment 12 David Blechter 2016-03-02 12:58:48 UTC
(In reply to mxie from comment #11)
> Hi,David
> As rjones said, qxl + vnc is supported.please see  
> https://bugzilla.redhat.com/show_bug.cgi?id=1312254#c5

Not sure it is/was supported, as the mouse problem was reported a while ago (https://bugzilla.redhat.com/show_bug.cgi?id=707055), and was not fixed.

Regardless, spice team will investigate, but it is too late for 6.8

Comment 13 Frediano Ziglio 2016-03-02 14:20:54 UTC
*** Bug 707055 has been marked as a duplicate of this bug. ***

Comment 14 Frediano Ziglio 2016-03-02 14:25:12 UTC
The problem was that mouse cursor was sent only on change but not when a new
client is connecting. This small patch fix the issue (the if is to avoid core
if qxl did not set the mouse like during boot):


diff -ru qemu-2.4.1.orig/ui/vnc.c qemu-2.4.1.my/ui/vnc.c
--- qemu-2.4.1.orig/ui/vnc.c	2016-03-02 13:41:50.066454216 +0000
+++ qemu-2.4.1.my/ui/vnc.c	2016-03-02 14:16:13.182081871 +0000
@@ -2124,6 +2124,8 @@
             break;
         case VNC_ENCODING_RICH_CURSOR:
             vs->features |= VNC_FEATURE_RICH_CURSOR_MASK;
+            if (vs->vd->cursor)
+                vnc_cursor_define(vs);
             break;
         case VNC_ENCODING_EXT_KEY_EVENT:
             send_ext_key_event_ack(vs);

Comment 15 Frediano Ziglio 2016-03-02 15:15:16 UTC
Patch posted upstream at http://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg00507.html

Comment 16 Frediano Ziglio 2016-03-02 15:17:01 UTC
Reassignment as fix is for Qemu component.

Comment 17 Mike McCune 2016-03-28 23:44:20 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 19 Gerd Hoffmann 2016-04-14 07:34:11 UTC
(In reply to Frediano Ziglio from comment #15)
> Patch posted upstream at
> http://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg00507.html

commit 91ec41dc3f9cf28f93af0630b20ba8e7dcefa16b

Comment 21 Gerd Hoffmann 2016-11-01 08:55:38 UTC
(In reply to Gerd Hoffmann from comment #19)
> (In reply to Frediano Ziglio from comment #15)
> > Patch posted upstream at
> > http://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg00507.html
> 
> commit 91ec41dc3f9cf28f93af0630b20ba8e7dcefa16b

Ahem, well, turned out to not be that simple.  It's not that VNC_ENCODING_RICH_CURSOR support needs a bugfix in RHEL-6.  RHEL-6 has no rich cursor support in the first place (which is required to show the qxl cursor).

Given the lifecycle RHEL-6 is in and the fact that only the qxl/spice combination is supported I think this qualifies as WONTFIX.  Ademar?