Bug 806230 - Tablet cann't work well with multiple video devices
Tablet cann't work well with multiple video devices
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.3
Unspecified All
high Severity high
: rc
: ---
Assigned To: Virtualization Maintenance
Virtualization Bugs
:
Depends On:
Blocks: 840699
  Show dependency treegraph
 
Reported: 2012-03-23 05:18 EDT by dyuan
Modified: 2012-12-19 10:04 EST (History)
17 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-19 10:02:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
/var/log/libvirt/qemu/xp.log (107.60 KB, text/plain)
2012-03-27 03:28 EDT, dyuan
no flags Details
Spice-Agent is installed. (47.45 KB, image/png)
2012-05-02 23:46 EDT, dyuan
no flags Details

  None (edit)
Description dyuan 2012-03-23 05:18:49 EDT
Description of problem:
When I install a new guest, tablet will be added by default, but it cann't work well with multiple video devices.

After I removed the tablet, the mouse can work well in 3 screens.

The guest will crash when I add 3 tablet into 1 guest.

Version-Release number of selected component (if applicable):
libvirt-0.9.10-6.el6
qemu-kvm-0.12.1-2.246.el6
virt-manager-0.9.0-10.el6
python-virtinst-0.600.0-7.el6
virt-viewer-0.5.2-2.el6
spice-client-0.8.2-13.el6
spice-server-0.10.1-4.el6
spice-gtk-0.11-1.el6
spice-glib-0.11-1.el6

How reproducible:
100%

Steps to Reproduce:

1. install a new guest or configure an existing guest with tablet and multiple video devices.

For example: set 3 video devices for the guest
snip...
<input type='tablet' bus='usb'>
<alias name='input0'/>
</input>
snip...
<video>
      <model type='qxl' vram='65536' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <video>
      <model type='qxl' vram='65536' heads='1'/>
      <alias name='video1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </video>
    <video>
      <model type='qxl' vram='65536' heads='1'/>
      <alias name='video2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </video>
snip...

2.  Boot up the guest
3.  # virt-viewer xp
or
# spicec -h 127.0.0.1 -p 5900

Actual results:
The mouse can only work well in screen 1, but not in screen 2 and 3.

Expected results:
The mouse can work well in 3 screens.

Additional info:
Comment 1 Daniel Berrange 2012-03-23 06:14:07 EDT
This is not really a libvirt problem. The hardware configuration is perfectly reasonable from libvirt's POV. Whether the guest OS copes correctly is upto it. You'll need to find out what is crashing and re-assign this bug to it.
Comment 2 Dave Allan 2012-03-25 22:01:04 EDT
What OS is the guest?
Comment 3 dyuan 2012-03-25 22:56:42 EDT
(In reply to comment #2)
> What OS is the guest?

winxp-i386
Comment 7 dyuan 2012-03-27 03:28:36 EDT
Created attachment 572953 [details]
/var/log/libvirt/qemu/xp.log
Comment 9 Daniel Berrange 2012-03-27 05:05:14 EDT
Can you clarify what is actually crashing ?  There is no sign that QEMU itself has crashed from those logs. Some part of Windows crashes ?
Comment 10 dyuan 2012-03-27 22:14:22 EDT
(In reply to comment #9)
> Can you clarify what is actually crashing ?  There is no sign that QEMU itself
> has crashed from those logs. Some part of Windows crashes ?

yes, the Windows came to BSOD after fully boot up then reboot.
Comment 11 juzhang 2012-03-28 03:38:40 EDT
Can reproduce this isse with usb-talbet on qemu-kvm-0.12.1.2-2.265.el6.x86_64 using qemu-kvm directly. change component from libvirt to qemu-kvm tempotary.

/usr/libexec/qemu-kvm -M rhel6.3.0 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name xp -uuid 18585065-c348-1c4f-46b9-fdfee279543b -nodefconfig -nodefaults -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive file=/root/winxp-sp3.qcow2,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -device ide-drive,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -netdev tap,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:3a:5f:6c,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -spice port=5900,disable-ticketing -vga qxl -global qxl-vga.vram_size=67108864 -device qxl,id=video1,vram_size=67108864,bus=pci.0,addr=0x7 -device qxl,id=video2,vram_size=67108864,bus=pci.0,addr=0x8 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -monitor stdio qemu-kvm-0.12.1.2-2.265.el6.x86_64 -device usb-tablet,id=input0
Comment 12 FuXiangChun 2012-03-28 04:50:26 EDT
I tested win7-64 guest.
three scenarios:
1. scenario 1
the mouse work well without tablet.
2. scenario 2 
three video devices cann't work well with a tablet.
3. scenario 3
three video devices cann't still work well with 3 tablets. but guest cann't crash.
Comment 13 juzhang 2012-03-28 05:35:46 EDT
Give a general summary from kvm qe testing results.

1. Windowxpsp3 guest

1.1 Boot guest with 1 usb tablet

Results
Mouse can not work in extend desktop

1.2 Boot guest with 3 usb tablet

Results
guest crash

1.3 boot guest without usb tablet

Results
Guest mouse works well


2.win7-64 guest
2.1 Boot guest with 1 usb tablet

Results
Mouse can not work in extend desktop

2.2 Boot guest with 3 usb tablet

Results
Mouse can not work in extend desktop

2.3 boot guest without usb tablet

Results
Guest mouse works well
Comment 14 Gerd Hoffmann 2012-03-28 11:42:26 EDT
Two issues here.  First, the guest crashing. Second, the mouse not working.

"guest crashing" refers to qemu exiting unexpected I guess?  Can you retest with qemu-kvm-0.12.1-2.253.el6 (or newer) and if the issue persists open a new bug for it?

On the broken mouse:  Three tablets are not going to solve the problem.  You need the spice agent being installed and active in the guest for a working mouse in a multihead setup.  Looks like this is the case here as the mouse is working correctly if no usb tablet is present.

A usb tablet being present should not disturb the guest at all.  The spice server should continue to route the mouse events via vdagent even if a tablet is present.  Seems to be not the case though.  Assigning to spice-server for investigation.
Comment 15 juzhang 2012-03-29 23:25:51 EDT
(In reply to comment #14)
> Two issues here.  First, the guest crashing. Second, the mouse not working.
> 
> "guest crashing" refers to qemu exiting unexpected I guess?  Can you retest
> with qemu-kvm-0.12.1-2.253.el6 (or newer) and if the issue persists open a new
> bug for it?
Tried with qemu-kvm-0.12.1-2.265.el6,hit this problem, file new bug and cc to you.
Bug 808284 - Booting guest with multiple video/usb tablets devices lead to winxpsp3 guest BSOD
> 
> On the broken mouse:  Three tablets are not going to solve the problem.  You
> need the spice agent being installed and active in the guest for a working
> mouse in a multihead setup.  Looks like this is the case here as the mouse is
> working correctly if no usb tablet is present.
> 
> A usb tablet being present should not disturb the guest at all.  The spice
> server should continue to route the mouse events via vdagent even if a tablet
> is present.  Seems to be not the case though.  Assigning to spice-server for
> investigation.
Comment 16 David Blechter 2012-04-25 07:17:28 EDT
usb tablet is used as a legacy support for "client mode" mouse for 
a single monitor only. there are no needs for spice-server investigation.

For multi-monitor support and other user experience improvements, spice
guest agent (vdagent) needs to be installed. It was never mentioned in the description, or subsequent comments. 

The new qemu-kvm Bug "808284 - Booting guest with multiple video/usb tablets devices lead to winxpsp3 guest BSOD" covers issue 1 according to comment 14, and the mouse issue can be solved by installing spice vdagent on the quest.
Comment 17 dyuan 2012-04-28 04:47:45 EDT
In bug description, multi-monitor is working well without usb tablet. 

Using multi-monitor with tablet is not my purpose.
In my test, tablet is added by default when I install a new guest, then try to use multi-monitor, the mouse cann't work well.

As you said, usb tablet is used as a legacy support for a single monitor only, maybe it's not suitable to add it to guest as default, it will confused for others when they need multi-monitor. or the legacy support is mentioned somewhere ? Thanks.
Comment 18 Uri Lublin 2012-05-02 06:11:48 EDT
I guess installation of Windows itself works well.
Did you try installing spice guest agent after Windows installation completes (see comment #16) ?
Comment 19 dyuan 2012-05-02 23:46:03 EDT
Created attachment 581768 [details]
Spice-Agent is installed.

yes, the installation of Windows itself works well.
The mouse doesn't work in the 2nd and 3rd monitors with tablet after I install spice guest agent in guest.
Comment 20 Suzanne Yeghiayan 2012-05-18 16:52:57 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 21 Uri Lublin 2012-05-20 02:50:18 EDT
(In reply to comment #19)
> Created attachment 581768 [details]
> Spice-Agent is installed.

Did you also install on the guest a virtio-serial driver ?
Is the Spice-Agent service running ?
Comment 22 zhe peng 2012-07-18 06:14:16 EDT
I can't reproduce this with win7 guest:
pkg:
libvirt-0.9.13-2.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.295.el6.x86_64
rhev-guest-tools-iso-3.1-2

service spice agent running

i added two qxl vedio device, mouse worked well both on two monitors.
my guest xml:
.......
<input type='tablet' bus='usb'>
      <alias name='input0'/>
    </input>
.......
<video>
      <model type='qxl' vram='65536' heads='2'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <video>
      <model type='qxl' vram='65536' heads='4'/>
      <alias name='video1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </video>
........
Comment 23 RHEL Product and Program Management 2012-12-14 02:27:10 EST
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 24 Uri Lublin 2012-12-19 06:30:21 EST
Works for me with a WinXP guest and with spice vdagent running on the guest.
spice-server-0.12.0-9.el6.x86_64
qemu-kvm-0.12.1.2-2.340.el6.x86_64
Comment 25 Uri Lublin 2012-12-19 09:09:02 EST
Without spice-vdagent (specifically, when the VM is configured without virtio-serial-bus and without virtio-serial vdagent port), tablet mouse does not work well on non-primary display.
I noticed that mouse clicks on any display are considered as mouse clicks on the primary display. For example clicking the bottom left corner on the second display of a Windows XP guest, opens the "Start" menu on the primary display.
Comment 26 Uri Lublin 2012-12-19 10:02:40 EST
I'm closing this bug as will-not-fix.
When running a VM with multiple displays, use spice-vdagent and not tablet for absolute mouse.

If someone thinks it's worth fixing the tablet implementation in qemu-kvm to support multiple displays please reopen this bug.

The guest crash (blue-screen) is now bug 808284, and is not part of this bug.

Note You need to log in before you can comment on or make changes to this bug.