Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
KVM Interface feels sluggish
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1344
Location: Sweden

PostPosted: Sat Dec 19, 2009 2:13 pm    Post subject: KVM Interface feels sluggish Reply with quote

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?
Back to top
View user's profile Send private message
gami
Apprentice
Apprentice


Joined: 02 Jun 2006
Posts: 297

PostPosted: Sat Dec 19, 2009 8:20 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23085

PostPosted: Sat Dec 19, 2009 10:21 pm    Post subject: Reply with 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?
Back to top
View user's profile Send private message
Mad Merlin
Veteran
Veteran


Joined: 09 May 2005
Posts: 1155

PostPosted: Sun Dec 20, 2009 5:31 am    Post subject: Reply with quote

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.
_________________
Game! - Where the stick is mightier than the sword!
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23085

PostPosted: Sun Dec 20, 2009 5:38 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Mad Merlin
Veteran
Veteran


Joined: 09 May 2005
Posts: 1155

PostPosted: Sun Dec 20, 2009 5:47 am    Post subject: Reply with quote

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.
_________________
Game! - Where the stick is mightier than the sword!
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1344
Location: Sweden

PostPosted: Mon Dec 21, 2009 8:10 am    Post subject: Reply with quote

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
Code:
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.
Back to top
View user's profile Send private message
Mad Merlin
Veteran
Veteran


Joined: 09 May 2005
Posts: 1155

PostPosted: Mon Dec 21, 2009 11:53 pm    Post subject: Reply with quote

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?

qemu-kvm-0.11.1, compiled with sdl. Starting with
Code:
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.


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.
_________________
Game! - Where the stick is mightier than the sword!
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23085

PostPosted: Tue Dec 22, 2009 3:15 am    Post subject: Reply with quote

Letharion wrote:
qemu-kvm-0.11.1, compiled with sdl. Starting with
Code:
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.
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1344
Location: Sweden

PostPosted: Tue Dec 22, 2009 9:50 am    Post subject: Reply with quote

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
Code:
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.

Nice, thanks!
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1344
Location: Sweden

PostPosted: Tue Dec 22, 2009 4:54 pm    Post subject: Reply with quote

I tried it quickly, and it seems to be a lot better with the usb tablet. Thanks :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum