Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1656253

Summary: [wayland] PS/2 mouse easily move out of spice remote-viewer border, cause mouse work not well in win2016
Product: Red Hat Enterprise Linux 8 Reporter: Li Xiaohui <xiaohli>
Component: spice-gtkAssignee: Julien Ropé <jrope>
Status: CLOSED CURRENTRELEASE QA Contact: SPICE QE bug list <spice-qe-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: ---CC: cfergeau, chayang, dblechte, fgiudici, fziglio, juzhang, mtessun, rbalakri, tpelka, victortoso, virt-maint, xfu, xiaodwan, zhguo
Target Milestone: rcFlags: knoel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-05 07:42:18 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: 1682775    
Bug Blocks: 1806601    
Attachments:
Description Flags
mouse cursor problem none

Description Li Xiaohui 2018-12-05 03:31:28 UTC
Description of problem:
when move ps/2 mouse, it easily move out of spice remote-viewer border, so couldn't operate mouse well


Version-Release number of selected component (if applicable):
(1)host version: kernel-4.18.0-48.el8.x86_64 & qemu-img-3.1.0-0.module+el8+2266+616cf026.next.candidate.x86_64
(2)guest version: win2016 with virtio-win-1.9.6-6.el8.noarch
(3)client version: kernel-4.18.0-46.el8.x86_64 & virt-viewer-7.0-1.el8.x86_64


How reproducible:
4/4


Steps to Reproduce:
1.on host1, boot guest with commands:
/usr/libexec/qemu-kvm -M q35 \
-cpu SandyBridge \
-enable-kvm \
-m 4G \
-smp 4 \
-nodefaults \
-rtc base=utc,clock=host,driftfix=slew \
-device pcie-root-port,id=pcie.0-root-port-2,slot=2,chassis=2,addr=0x2,bus=pcie.0 \
-device pcie-root-port,id=pcie.0-root-port-3,slot=3,chassis=3,addr=0x3,bus=pcie.0 \
-device pcie-root-port,id=pcie.0-root-port-4,slot=4,chassis=4,addr=0x4,bus=pcie.0 \
-device virtio-scsi-pci,id=scsi0,bus=pcie.0-root-port-2,addr=0x0 \
-blockdev driver=qcow2,cache.direct=off,cache.no-flush=on,file.filename=/mnt/win-image/win2016-q35-virtio-scsi-virtio-win-1966.qcow2,node-name=my_disk,file.driver=file \
-device scsi-hd,bus=scsi0.0,drive=my_disk \
-device virtio-net-pci,mac=6c:0b:84:a4:53:2c,id=netdev1,vectors=4,netdev=net1,bus=pcie.0-root-port-3 -netdev tap,id=net1,vhost=on \
-device nec-usb-xhci,id=controller,bus=pcie.0-root-port-4,addr=0x0 \
-spice port=5902,disable-ticketing \
-chardev spicevmc,name=usbredir,id=usbredirchardev1 \
-device usb-redir,id=redir1,chardev=usbredirchardev1,bus=controller.0,port=1,filter='-1:0x0951:0x1666:-1:0|-1:-1:-1:-1:1' \
-qmp tcp:0:4442,server,nowait \
-monitor stdio \
-device qxl-vga \
-boot menu=on \

2.on host2(as a spice connection client), connect win2016 guest with remote-viewer in terminal:
[root@localhost qemu-sh]# remote-viewer spice://10.73.73.87:5902

3.operate guest via ps/2 mouse in spice connection


Actual results:
in win2016 guest, ps/2 mouse works not well in guest: when move mouse, easily move out of remote-viewer connection border, so cause mouse work not well in guest.


Expected results:
ps/2 mouse works well in guest via spice connection


Additional info:
(1)ps/2 mouse works well when connect win2016 via fedora virt-viewer(virt-viewer-6.0-3.fc28.x86_64)
(2)when boot guest with "-vnc :2 -device VGA", found two pointers in guest, and mouse works not well, too.

Comment 1 Gerd Hoffmann 2018-12-06 06:33:41 UTC
That is remote-viewer's fault, qemu has no control over this.
Actual bug is probably in the spice widget code, reassigning to spice-gtk.

Comment 3 Xiaodai Wang 2018-12-10 11:21:16 UTC
This bug can also be produced with linux guest. 
when the guest captures the mouse, you can easily move the mouse cursor out of the guest.

Comment 4 Christophe Fergeau 2018-12-10 11:34:13 UTC
Is this with wayland or with X.org? If on wayland, does it make a differenc to set GDK_BACKEND=x11 in the environment before starting remote-viewer/virt-viewer?

Comment 5 Xiaodai Wang 2018-12-10 12:21:35 UTC
I can also reproduce it with X.org.  
The mouse can move out of the guest, but there is no response by clicking anywhere unless the cursor is released.
I uploaded a video about the problem.

Comment 6 Xiaodai Wang 2018-12-10 12:23:45 UTC
Created attachment 1513036 [details]
mouse cursor problem

Comment 11 Frediano Ziglio 2020-05-15 11:29:25 UTC
Should not this bug be moved to "POST"? Should we backport the needed patch to RHEL?

Comment 12 Francesco Giudici 2020-05-15 12:39:12 UTC
(In reply to Frediano Ziglio from comment #11)
> Should not this bug be moved to "POST"?
Not sure, as in comment 5 the issue is reported also with xorg.
Note that there is already a RHEL-8 bug tracking the Wayland issue on RHEL-8: it is bug 1674311, already in POST state.
Should we make this bug a duplicate of bug 1674311? If the issue on xorg will stay present we may want to track it in another bug (as I expect the issues with Wayland will be solved, so maybe we have two different issues here).

 Should we backport the needed patch
> to RHEL?

Yes! But I would track the backport of the Wayland patch on bug 1674311

Comment 13 Francesco Giudici 2020-06-14 05:00:08 UTC
Wayland support (with GDK_BACKEND=x11 option too) will be fixed with patch for bug 1674311 (should land in RHEL-8.3)
I was not able to reproduce with xorg instead.

Comment 16 Julien Ropé 2020-11-04 08:18:47 UTC
I've not been able to reproduce this with the latest code.
Based on the last comment from Francesco, it seems this has been fixed with bug #1674311.
Should we close it?

Comment 17 Tomas Pelka 2020-11-05 07:09:38 UTC
(In reply to Julien Ropé from comment #16)
> I've not been able to reproduce this with the latest code.
> Based on the last comment from Francesco, it seems this has been fixed with
> bug #1674311.
> Should we close it?

yes