Skip to contentSkip to conversation

Disable PS/2 mouse

Qemu-devel Peter Lieven 6 participants 14 messages Jun 8, 2010 – Jun 10, 2010

lore
Share & tools
lore
#0 lore raw

Hi,

is there any way to disable the PS/2 mouse emulation from command line?

BR,
Peter

#1 lore raw
Quoted 3 lines · Peter Lieven

Hi,

is there any way to disable the PS/2 mouse emulation from command line?

Judging from pc_basic_device_init() and i8042_initfn(): I don't think so, sorry.

#2 lore raw
Quoted 12 lines · Markus Armbruster
Quoted 4 lines · Peter Lieven

Hi,

is there any way to disable the PS/2 mouse emulation from command line?

Judging from pc_basic_device_init() and i8042_initfn(): I don't think so, sorry.

would it be difficult to implement?

#4 lore raw
In reply to Markus Armbruster
Quoted 13 lines · Markus Armbruster
Quoted 4 lines · Peter Lieven

Hi,

is there any way to disable the PS/2 mouse emulation from command line?

Judging from pc_basic_device_init() and i8042_initfn(): I don't think so, sorry.

background:

with the ps/2 mouse there are always problems with pointer synchronization. so i generally use usb tablet device emulation. BUT. usb emulation is resource intensive. i have a testcase with 64 VMs on a dual quadcore xeon and usb alone almost uses the resources of 2 cpus. so i decided to introduce an option for 'console-only' vms. but in that case i would like to have ps/2 mouse also disabled in case someone has the wrong option and complains than that his mouse is unsynchronized. so 'console-only' should be no mouse at all.

#5 lore raw
Quoted 3 lines · Peter Lieven

background:

with the ps/2 mouse there are always problems with pointer synchronization.

Yeah, we have that here on one of our WinNT VMs. The quick solution we found was to install VNC Server on NT and set up everyone to connect to that rather than to the physical Qemu/KVM VNC framebuffer. It may not be completely optimal, but it at least solves the synchronised mouse pointer issue which was the major complaint we were getting from our users.

HTH,

Mark.

Signature · 7 lines
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs
#7 lore raw
Quoted 5 lines · Gerd Hoffmann

Hi,

Quoted 1 line

BUT. usb emulation is resource intensive.

Update qemu. Fixed in 0.12.4 and unstable.

thanks for this update. i think my experience came from 0.12.3 i will verify this

Quoted 6 lines

cheers,
Gerd

#3 lore raw
In reply to Peter Lieven
Quoted 6 lines · Peter Lieven
Quoted 5 lines · Markus Armbruster
Quoted 2 lines · Peter Lieven

Hi,

Quoted 8 lines
Quoted 7 lines
Quoted 2 lines

is there any way to disable the PS/2 mouse emulation from command line?

Judging from pc_basic_device_init() and i8042_initfn(): I don't think so, sorry.

would it be difficult to implement?

I don't know.

#8 lore raw
In reply to Gerd Hoffmann
Quoted 5 lines · Gerd Hoffmann

Hi,

Quoted 1 line

BUT. usb emulation is resource intensive.

Update qemu. Fixed in 0.12.4 and unstable.

hi gerd,

with 0.12.4 it is still the case that a total idle vm takes about 6-8% of a 2.4GHz Xeon Core.

see: http://dev.cs1.dlh.net/usb-on-off.png

until approx 13.00 cet its with -usb -usbdevice tablet and after the reboot only with the ps/2 mouse.

i'm fine generally not using the usb emulation for console only guest systems, but in that case I would like to disable ps/2 mouse as well.

br,
peter

Quoted 6 lines

cheers,
Gerd

Signature · 16 lines
Mit freundlichen Grüßen/Kind Regards

Peter Lieven

..........................................................................................................

  KAMP Netzwerkdienste GmbH
  Vestische Str. 89-91 | 46117 Oberhausen
  Tel: +49 (0) 208.89 402-50 | Fax: +49 (0) 208.89 402-40
  mailto:[email protected] | http://www.kamp.de

  Geschäftsführer: Heiner Lante | Michael Lante
  Amtsgericht Duisburg | HRB Nr. 12154
  USt-Id-Nr.: DE 120607556

......................................................................................................... 
#9 lore raw

Hi,

Quoted 2 lines

with 0.12.4 it is still the case that a total idle vm takes about 6-8% of a 2.4GHz Xeon Core.

I see that order of magitude too, no matter whenever usb is on or off. With older qemu and usbtablet it used to be up to 25%.

cheers,
Gerd

#10 lore raw
Quoted 7 lines · Gerd Hoffmann

Hi,

Quoted 2 lines

with 0.12.4 it is still the case that a total idle vm takes about 6-8% of a 2.4GHz Xeon Core.

I see that order of magitude too, no matter whenever usb is on or off. With older qemu and usbtablet it used to be up to 25%.

Is it possible to dynamically control the refresh internally within qemu so VMs without a connected VNC client will have rare refreshes or no refresh at all? I hope it's not the OS who polls it.

Quoted 5 lines

cheers,
Gerd

#11 lore raw
Quoted 6 lines · Dor Laor
Quoted 5 lines · Gerd Hoffmann

Hi,

Quoted 2 lines

with 0.12.4 it is still the case that a total idle vm takes about 6-8% of a 2.4GHz Xeon Core.

Quoted 6 lines
Quoted 2 lines

I see that order of magitude too, no matter whenever usb is on or off. With older qemu and usbtablet it used to be up to 25%.

Is it possible to dynamically control the refresh internally within qemu so VMs without a connected VNC client will have rare refreshes or no refresh at all? I hope it's not the OS who polls it.

vnc/vga or usb tablet?

For the vga it happens already, with no vnc client connected vnc zaps the refresh timer and stops calling vga_hw_update(), thus vga stops doing framebuffer dirty tracking too.

For usb hid devices: No idea how they work and whenever we can put them into sleep somehow (with/without guest cooperation).

cheers,
Gerd

#12 lore raw
Quoted 14 lines · Gerd Hoffmann
Quoted 6 lines · Dor Laor
Quoted 5 lines · Gerd Hoffmann

Hi,

Quoted 2 lines

with 0.12.4 it is still the case that a total idle vm takes about 6-8% of a 2.4GHz Xeon Core.

Quoted 6 lines
Quoted 2 lines

I see that order of magitude too, no matter whenever usb is on or off. With older qemu and usbtablet it used to be up to 25%.

Is it possible to dynamically control the refresh internally within qemu so VMs without a connected VNC client will have rare refreshes or no refresh at all? I hope it's not the OS who polls it.

Quoted 5 lines

vnc/vga or usb tablet?

For the vga it happens already, with no vnc client connected vnc zaps the refresh timer and stops calling vga_hw_update(), thus vga stops doing framebuffer dirty tracking too.

For usb hid devices: No idea how they work and whenever we can put them into sleep somehow (with/without guest cooperation).

is it the emulated bus or the tablet device that is generating the load?

Quoted 5 lines

cheers,
Gerd

#13 lore raw
In reply to Gerd Hoffmann
Quoted 2 lines

For usb hid devices: No idea how they work and whenever we can put them into sleep somehow (with/without guest cooperation).

The issue with USB is that it is (by design) a polled system. The UHCI adapter has to wakeup every 1ms to read transfer descriptors from guest RAM. Until recently there was a bug in the UHCI emulation that would wake the guest even if the tablet NACKed the poll.

See http://lists.nongnu.org/archive/html/qemu-devel/2010-04/msg00150.html

USB does support "autosuspend". This allows a guest to put a device to sleep, and have it wake up when something interesting happens. In theory this includes HID devices. However I believe linux disables it because there's so much broken hardware out there that implements it incorrectly. I suspect qemu does not currently implement this feature either.

Paul