Bug 1403755

Summary: Mouse cursor position offset in QEMU/KVM on Wayland
Product: [Fedora] Fedora Reporter: Mikkel Lauritsen <renard>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: amit.shah, berrange, cfergeau, crobinso, dwmw2, itamar, pbonzini, renard, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-14 15:32:48 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:
Attachments:
Description Flags
Screenshot with Windows 10 running in the virtual machine
none
Domain config from virsh none

Description Mikkel Lauritsen 2016-12-12 10:32:03 UTC
Created attachment 1230743 [details]
Screenshot with Windows 10 running in the virtual machine

Upgrading from Fedora 24 to Fedora 25 has caused mouse cursor positioning in QEMU to break. Previously the mouse cursor in the virtual machine followed the "physical" mouse cursor (whenever it was over the QEMU window), but now it seems to have a position which is a linear function of the position of the physical cursor. This makes clicking anything inside the virtual machine incredibly difficult - se the attached screenshot for an example.

I can reset the constant part of the offset of the virtual cursor by leaving the window (left ctrl+alt), activating another window and then clicking inside the QEMU window again.

Everything QEMU is version 2.7.0-7.fc25, Xorg is xorg-x11-server-common-1.19.0-1.fc25.x86_64 and xorg-x11-drv-intel-2.99.917-26.20160929.fc25.x86_64 .

Comment 1 Mikkel Lauritsen 2016-12-12 10:54:19 UTC
It just dawned on me that I'm now running Wayland by default - I've just checked, and switching back to X makes the problem go away. IOW it's the combination of Wayland and QEMU that has problems.

Wayland is version 1.12.0-1 .

Comment 2 Cole Robinson 2016-12-12 22:50:03 UTC
Can you provide your guest config? If using libvirt, grab it with: sudo virsh dumpxml $vmname

Comment 3 Mikkel Lauritsen 2016-12-13 05:23:57 UTC
Created attachment 1231026 [details]
Domain config from virsh

Comment 4 Cole Robinson 2016-12-13 18:13:29 UTC
Looks like your VM doesn't have a usb tablet device attached, which may be due to virt-manager bug 1370887. If you do

  sudo virt-xml $vmname --add-device --input tablet

and poweroff/poweron the VM, does it fix things?

Comment 5 Mikkel Lauritsen 2016-12-13 20:15:20 UTC
Yes, that seems to fix things - many thanks. My apologies for not noticing bug 1370887 before reporting this one.

Comment 6 Cole Robinson 2016-12-14 15:32:48 UTC
No worries, the connection wasn't obvious to me until I started digging :)

There's a bug tracking the regression of non-tablet mouse behavior on wayland, duping to that

*** This bug has been marked as a duplicate of bug 1285378 ***