Bug 359945

Summary: cursor acceleration problem in “qemu -vnc”
Product: [openSUSE] openSUSE 11.0 Reporter: Mike Fabian <mfabian>
Component: OtherAssignee: Bernhard Kaindl <bk>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: agraf, ms
Version: Alpha 2   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Mike Fabian 2008-02-08 14:54:32 UTC
I started qemu like this:

    sudo qemu-kvm -no-quit -m 512 \
        -cdrom /dist/install/openSUSE-11.0-Alpha2/openSUSE-11.0-Alpha2-DVD-x86_64.iso \
	-boot d \
	-hda $NAME.img \
	-monitor stdio \
	-net nic,model=rtl8139 \
        -net user,hostname=$NAME \
	-vnc :2 \
	$@

and then connected to the vncserver with

    vncviewer :2

The mouse cursor *inside* the viewer window (white arrow during the
installation with YaST) and the cursor hovering over vncviewer window
(black dot by default) get out of sync when the mouse is moved fast,
i.e.  they can be at completely different positions when the mouse
stops moving and they stay there.

After opening an xterm and executing

    xset m 1

(disables mouse acceleration), the problem goes away. If the two
cursors are still at different positions because of the problem
mentioned above, they can be synchronized by moving the mouse to the
lower right corner. After doing this synchronization once, the
two cursors stay synchronized.
Comment 1 Mike Fabian 2008-02-08 14:55:45 UTC
Maybe mouse acceleration off should be the default because this
behaviour that the cursors get out of sync with mouse acceleration on
is very confusing.

Reassign to qemu maintainer.
Comment 2 Mike Fabian 2008-02-13 15:51:55 UTC
Alexander Graf suggested to try the options

    -usb -usbdevice tablet

for qemu.

This didn’t help, the cursors were still out of sync. *And* ‘xset m 1’
could not be used anymore as a workaround, even after a ‘xset m 1’ the
cursors stayed out of sync.

Comment 3 Ulrich Hecht 2008-02-19 13:31:54 UTC
Reassigning to _kvm_ maintainer. (I would assume the same problem to exist in qemu proper, though.)
Comment 4 Mike Fabian 2008-02-19 14:00:11 UTC
Ulrich Hecht> (I would assume the same problem to exist in qemu
Ulrich Hecht> proper, though.)

Yes, it happens the same way when starting qemu like this
(without any kernel module):

qemu-system-x86_64 -std-vga  -no-quit -m 512 \
        -cdrom /mounts/dist/install/openSUSE-11.0-Alpha2/openSUSE-11.0-Alpha2-DVD-x86_64.iso \
	-boot d \
	-hda $NAME.img \
	-monitor stdio \
	-net nic,model=rtl8139 \
        -net user,hostname=$NAME \
	-vnc :2 \
	$@


I know that no kernel module is used because of:

Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory
Comment 5 Alexander Graf 2008-07-07 13:12:10 UTC
Mouse acceleration is always broken with VNC. VNC only knows about absolute positioning, while a mouse only knows how to move relatively. Converting these two is simply broken by design.

One way around this is to use the "vmmouse" driver instead of the "mouse" driver in xorg.conf, if you're in a VM. This way the VMware backdoor driver for absolute mouse positioning is used and you can use -vnc just fine.
Comment 6 Forgotten User ZhJd0F0L3x 2008-07-14 07:21:55 UTC
So sax2 should use the vmmouse driver automatically if the system is running inside qemu?

Sorry, "configure it by hand", especially if there is no way to configure it short of using the "vi" configuration tool, is no solution for features as important as virtualization.
Comment 7 Alexander Graf 2008-07-14 08:19:38 UTC

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