# [Solved] KVM: releasing mouse fails

## aceFruchtsaft

Hi,

I was wondering whether others also have issues with releasing the mouse pointer in KVM and Windows XP guests. 

When I press ctrl+alt nothing happens. As I'm quite new to KVM I don't have a clue where to start looking for solutions (and the internet is full of mouse problems with KVM switches, which is unrelated but makes finding relevant results a PITA).

I am running an ~amd64 with everything up to date, in particular:

```

$ emerge -pv gentoo-sources kvm virt-manager

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] sys-kernel/gentoo-sources-2.6.29-r1  USE="-build -symlink" 0 kB

[ebuild   R   ] app-emulation/virt-manager-0.6.0-r1  USE="gnome-keyring" 0 kB

[ebuild   R   ] app-emulation/kvm-84  USE="alsa gnutls modules ncurses sdl -esd -havekernel -pulseaudio -test -vde"   

```

Any pointers would be highly appreciated. Thanks.

Edit: Forgot to mention that this happens when I run the virtual machine via the virt-manager GUI.Last edited by aceFruchtsaft on Mon Apr 27, 2009 9:28 pm; edited 1 time in total

----------

## Hu

What command line is being used to start the virtual machine?  KVM accepts the option -alt-grab to use ctrl-alt-shift as the grab/ungrab sequence, instead of plain ctrl-alt.  This reduces conflicts with the standard Windows logon key sequence: ctrl-alt-delete.

----------

## aceFruchtsaft

The problem is that the virt-manager GUI automatically creates the command line arguments from the virtual machine I've defined using that GUI (I'm talking about this thing: http://virt-manager.et.redhat.com/screenshots.html ):

```

/usr/bin/kvm -S -M pc -m 512 -smp 1 -name WinXP_test -uuid 57024ad0-b458-d03e-5e60-9a8857470577 -monitor pty -localtime -no-acpi -boot c 

          -drive file=/dev/mapper/vg0-virt.winxp1,if=ide,index=0,boot=on

          -drive file=/vms/isos/xppro_st.iso,if=ide,media=cdrom,index=2 -net nic,macaddr=54:52:00:01:77:c1,vlan=0 -net tap,fd=14,script=,vlan=0,ifname=vnet0 

          -serial pty -parallel none -usb -usbdevice tablet

          -vnc 127.0.0.1:0 -k de -soundhw es1370

```

I haven't found a way to directly influence what's passed to the kvm command.

I guess it would be smarter to create a VM description XML file with the option you suggested and start the VM via virsh? I did not have time to look into how this works so far, though...

----------

## schnake

Same problem here. There is a corresponding bug report at https://bugzilla.redhat.com/show_bug.cgi?id=463729 that indicates that the problem is fixed with >= gtk-vnc-0.3.7-2

Latest in portage is gtk-vnc-0.3.7, with gtk-vnc-0.3.8 coming "soon" (coupled to Gnome 2.26 release). See https://bugs.gentoo.org/show_bug.cgi?id=265039

You may fetch the new gtk-vnc ebuild manually from the "gnome" overlay or add a local overlay and bump the existing gtk-vnc-0.3.7.ebuild yourself. Did not test this (yet), but the bug report seems to match the problem perfectly.   :Mad: 

----------

## schnake

Oh, and by the way... You can directly edit the XML definition for any virt-manager domain via... well... virsh's edit command. No need to write XML yourself and start VM externally.

----------

## aceFruchtsaft

Thanks to both of you for your input. And glad to hear that Gnome 2.26 will be in portage soon, I've been waiting for that one anyway.  :Wink: 

----------

## schnake

I can confirm that for me the problem with ctrl+alt not releasing the mouse pointer in virt-manager console is gone after update to gtk-vnc-0.3.8

You can simply fetch the net-libs/gtk-vnc-0.3.8.ebuild from the Gnome overlay http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=blob_plain;f=net-libs/gtk-vnc/gtk-vnc-0.3.8.ebuild;hb=HEAD, add it to your local overlay, digest it and reinstall gtk-vnc. It does not depend on any other not-yet-released packages from the gnome overlay.

Try it, cheer, and don't forget to add "[SOLVED]" to this topic title, please.  :Wink: 

----------

