# KVM Interface feels sluggish

## Letharion

Mainly my mouse pointer is quite awkward to work with as it's a bit slow to follow movements.

Is there a way to fix this?

----------

## gami

I assume that you refer to the graphical interface to kvm provided by virt-manager, or similar. Most of these GUIs use the VNC protocol to provide a graphical console to your virtual machine. And as you describe, VNC can feel a bit sluggish.

To work with your VM on a regular basis, I suggest you install the NX server (net-misc/nxserver-{freeedition,freenx}) software on the VM, and access it from the host (or any other machine on your network) with nxclient (net-misc/nxclient). You will get a much smoother user experience that way.

----------

## Hu

The mouse seems fine to me using the SDL interface.  What version of KVM are you using, how are you starting the guest, and what is running in the guest?

----------

## Mad Merlin

Both the SDL and VNC viewers for KVM normally have rather choppy mouse pointers (they update probably 1/5th as frequently as a native mouse cursor), at least for me. The better option is to use NX as suggested above, or (heaven forbid!) for 'doze guests, use RDP.

----------

## Hu

The USB tablet is as responsive in the guest as my normal USB and PS/2 mice in the host.  How are you invoking KVM to get such bad performance?

----------

## Mad Merlin

 *Hu wrote:*   

> The USB tablet is as responsive in the guest as my normal USB and PS/2 mice in the host.  How are you invoking KVM to get such bad performance?

 

VNC is usually better than SDL for this, but it's definitely choppier than a native mouse. I've seen this with and without -usbdevice tablet across about half a dozen hosts with a variety of configs. I've always used KRDC 3.5 or 4.3 for connecting via VNC though.

----------

## Letharion

 *Mad Merlin wrote:*   

> they update probably 1/5th as frequently as a native mouse cursor

 

That would be an fairly accurate description of my experience.

 *Quote:*   

> The mouse seems fine to me using the SDL interface. What version of KVM are you using, how are you starting the guest, and what is running in the guest?

 

qemu-kvm-0.11.1, compiled with sdl. Starting with 

```
qemu -net nic,macaddr=52:54:00:12:34:56 -net tap,ifname=qtap0,script=no,downscript=no image.kvm
```

. What runs varies, currently it's used mainly for StarCraft.

As NX has been suggested by both gami and Mad Merlin, I'm gonna try it see what happens.

----------

## Mad Merlin

 *Letharion wrote:*   

>  *Mad Merlin wrote:*   they update probably 1/5th as frequently as a native mouse cursor 
> 
> That would be an fairly accurate description of my experience.
> 
>  *Quote:*   The mouse seems fine to me using the SDL interface. What version of KVM are you using, how are you starting the guest, and what is running in the guest? 
> ...

 

For Starcraft, you'd be much better off using Wine. I play it quite frequently, The battle.net lobby doesn't quite display properly, but it's completely usable, and everything else (including in game) is flawless.

----------

## Hu

 *Letharion wrote:*   

> qemu-kvm-0.11.1, compiled with sdl. Starting with 
> 
> ```
> qemu -net nic,macaddr=52:54:00:12:34:56 -net tap,ifname=qtap0,script=no,downscript=no image.kvm
> ```
> ...

 

This uses the emulated PS/2 mouse, which is not nearly as good.  Add -usbdevice tablet to switch to the USB tablet mouse.  It works without grabbing the mouse, and has generally been more reliable for me.  I have seen some comments from Avi that it causes more interrupts and therefore more wakeups, but if you are running the guest at 100% CPU in a game, extra mouse interrupts are the least of your problems.

----------

## Letharion

 *Mad Merlin wrote:*   

> For Starcraft, you'd be much better off using Wine. I play it quite frequently, The battle.net lobby doesn't quite display properly, but it's completely usable, and everything else (including in game) is flawless.

 

I'm aware, but I can't. I'm working on: http://eis.ucsc.edu/StarCraftAICompetition, which uses dll injection, and no one I've talked to seems to know what needs to be done to get this working in wine.

 *Hu wrote:*   

>  *Letharion wrote:*   qemu-kvm-0.11.1, compiled with sdl. Starting with 
> 
> ```
> qemu -net nic,macaddr=52:54:00:12:34:56 -net tap,ifname=qtap0,script=no,downscript=no image.kvm
> ```
> ...

 

Nice, thanks!

----------

## Letharion

I tried it quickly, and it seems to be a lot better with the usb tablet. Thanks  :Smile: 

----------

