Bug 974662

Summary: virtual machine mouse cursor is off by about 3 pixels with spice
Product: [Fedora] Fedora Reporter: Jeff Bastian <jbastian>
Component: xorg-x11-drv-qxlAssignee: Dave Airlie <airlied>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 19CC: airlied, alevy, crobinso, hdegoede, marcandre.lureau, sandmann, xgl-maint
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-17 19:17:41 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 of gimp
none
stars drawn in gimp none

Description Jeff Bastian 2013-06-14 18:28:37 UTC
Created attachment 761400 [details]
screenshot of gimp

Description of problem:
The mouse cursor on Fedora 19 TC3 in a virtual machine is off by about 3 pixels horizontally and 2 pixels vertically.  I.E., if you click on x,y, it registers at x-3,y-2.

In the attached screenshot, I used Gimp to draw a 1 pixel dot and you can see where it was drawn relative to the mouse cursor.

This seems like a minor problem, but I noticed it because the scroll bars in Gnome Shell are rather narrow with the Adwaita theme, so if I click near the left edge of the scroll bar, it doesn't scroll but instead sends the click to the window.  I hit this in Anaconda when trying to scroll through the package groups.  I tried to scroll down the list but instead it selected the Cinnamon Desktop.

This does not happen on Fedora 18 in a virtual machine.

Version-Release number of selected component (if applicable):
Fedora 19 TC3
xorg-x11-drv-qxl-0.1.1-0.8.20130514git77a1594.fc19.x86_64
libvirt-1.0.5.2-1.fc19.x86_64
virt-manager-0.10.0-0.5.gitde1695b2.fc19.noarch
virt-viewer-0.5.6-1.fc19.x86_64

How reproducible:
every time

Steps to Reproduce:
1. install Fedora 19 TC3 in a virtual machine on a Fedora 19 host
   using Spice graphics and a USB tablet (the defaults)
2. start a gnome-terminal and run "ls /usr/bin"
3. move mouse to left half of gnome-terminal scrollbar and try to click
4. start Gimp and use the Pencil tool to draw a 1 pixel dot

Actual results:
the cursor is an I shape for selecting text and cannot scroll
dot in Gimp is a few pixels away from the mouse cursor

Expected results:
the cursor changes to an arrow and lets you scroll
dot in Gimp is directly under the tip of the arrow cursor

Additional info:

Comment 1 Jeff Bastian 2013-06-14 19:01:15 UTC
I switched my virtual machine settings to VNC with Cirrus graphics and now the cursor is right on spot when drawing a single-pixel-dot in gimp.

Unfortunately there seems to be some graphics corruption, though: the color select is a series of black-and-white lines instead of colors.

Comment 2 Jeff Bastian 2013-06-14 19:04:30 UTC
Created attachment 761407 [details]
stars drawn in gimp

I used Gimp and the Pencil tool to draw a 25-pixel star stencil.  I did it with both Spice/QXL graphics and with VNC/Cirrus graphics for the virtual machine.

I took screenshots showing the star and the mouse cursor, then I scaled the screenshots to double-size and cropped it to just the star and cursor.

You can see the top star -- with Spice -- the cursor is a little down-and-right from the center of the star.  But the bottom star -- with VNC -- the cursor is dead-center in the star.

Comment 3 Jeff Bastian 2013-06-14 19:09:21 UTC
This may be unrelated, but I'm also seeing missing letters in Anaconda when I install with Spice/QXL graphics, but it works ok with VNC.  See bug 974198

Comment 4 Jeff Bastian 2013-06-17 15:07:58 UTC
This appears to be related to recent changes to add KMS support to the qxl driver.

I booted my virtual machine with "nomodeset" and the mouse clicks are where they're supposed to be now, right at the tip of the cursor.

Comment 5 Jeff Bastian 2013-06-17 15:11:34 UTC
Booting with nomodeset also appears to fix bug 974198, the missing text in anaconda)!


I noticed this in my /tmp/X.log (from anaconda environment):

[    14.230] qxl_kms_surface_create: Bad bpp: 1 (1)
[    14.231] qxl_kms_surface_create: Bad bpp: 1 (1)
[    14.231] qxl_kms_surface_create: Bad bpp: 1 (1)


This error comes from a recent commit to the qxl driver:
  qxl: add KMS support v1.2
http://cgit.freedesktop.org/xorg/driver/xf86-video-qxl/commit/?id=3e37b2c

And this is what gave me the idea to try booting with nomodeset

Comment 6 Dave Airlie 2013-06-20 01:58:42 UTC
I won't get this fixed for F19 GA, but I'm working on having fixes soon after, it needs a few new interfaces to pass information from the user driver to the kernel driver.

Comment 7 Dave Airlie 2013-09-20 10:56:10 UTC
this should be fixed in f19 now, reopen if not.

Comment 8 Jeff Bastian 2013-09-20 15:02:00 UTC
I just built a fresh F19 VM with all the latest updates and I still have the problem.

Host:
kernel-3.11.1-200.fc19.x86_64
libvirt-1.0.5.5-1.fc19.x86_64
virt-manager-0.10.0-1.fc19.noarch
virt-viewer-0.5.6-1.fc19.x86_64
xorg-x11-server-Xorg-1.14.3-1.fc19.x86_64

Guest:
kernel-3.11.1-200.fc19.x86_64
xorg-x11-drv-qxl-0.1.1-0.11.20130514git77a1594.fc19.x86_64
xorg-x11-server-Xorg-1.14.3-1.fc19.x86_64

Comment 9 Cole Robinson 2013-12-17 19:17:41 UTC
I verified that this issue still exists with current F19 updates, but there's an update coming that fixes it:

https://admin.fedoraproject.org/updates/FEDORA-2013-23510/xorg-x11-drv-qxl-0.1.1-3.fc19

I can't edit the update to track this bug, so I'll just close as CURRENTRELEASE. Please reopen if that package in the guest (and a reboot) doesn't fix the issue.