RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1683681 - libvirt: Can't create ppc64 guests with graphics and no USB mouse
Summary: libvirt: Can't create ppc64 guests with graphics and no USB mouse
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: libvirt
Version: 8.0
Hardware: ppc64
OS: Linux
medium
medium
Target Milestone: rc
: 8.1
Assignee: Andrea Bolognani
QA Contact: Dan Zheng
URL:
Whiteboard:
: 1670530 (view as bug list)
Depends On: 1683609
Blocks: 1624641 1689815
TreeView+ depends on / blocked
 
Reported: 2019-02-27 14:41 UTC by Andrea Bolognani
Modified: 2019-11-05 20:48 UTC (History)
8 users (show)

Fixed In Version: libvirt-4.5.0-24.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1689815 (view as bug list)
Environment:
Last Closed: 2019-11-05 20:48:05 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
IBM Linux Technology Center 175867 0 None None None 2019-07-31 06:37:38 UTC
Red Hat Product Errata RHSA-2019:3345 0 None None None 2019-11-05 20:48:35 UTC

Description Andrea Bolognani 2019-02-27 14:41:58 UTC
libvirt will automatically add a USB keyboard / USB mouse combo to
any ppc64 with configured graphics, with no way for the user to opt
out: this is problematic for the reasons detailed in

  https://bugzilla.redhat.com/show_bug.cgi?id=1683609#c2

libvirt should make it possible to create a ppc64 guest with a USB
tablet as its only pointing device.

Comment 1 Andrea Bolognani 2019-02-27 18:08:30 UTC
Patches posted upstream.

  https://www.redhat.com/archives/libvir-list/2019-February/msg01634.html

Comment 2 Andrea Bolognani 2019-03-11 09:03:29 UTC
*** Bug 1670530 has been marked as a duplicate of this bug. ***

Comment 3 Andrea Bolognani 2019-03-11 09:05:24 UTC
Patches merged upstream.

  commit 186bb479d0f409dc75175bea48a760838c479a6c
  Author: Andrea Bolognani <abologna>
  Date:   Wed Feb 27 18:41:35 2019 +0100

    qemu: Allow creating ppc64 guests with graphics and no USB mouse
    
    The existing behavior for ppc64 guests is to always add a USB
    keyboard and mouse combo if graphics are present; unfortunately,
    this means any attempt to use a USB tablet will cause both pointing
    devices to show up in the guest, which in turn will result in poor
    user experience.
    
    We can't just stop adding the USB mouse or start adding a USB tablet
    instead, because existing applications and users might rely on the
    current behavior; however, we can avoid adding the USB mouse if a USB
    tablet is already present, thus allowing users and applications to
    create guests that contain a single pointing device.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1683681
    
    Signed-off-by: Andrea Bolognani <abologna>
    Reviewed-by: Cole Robinson <crobinso>

v5.1.0-170-g186bb479d0

Comment 4 IBM Bug Proxy 2019-03-11 09:14:57 UTC
------- Comment From sthoufee.com 2019-02-12 01:57 EDT-------
> Removing the usb-mouse device ("-device
> usb-mouse,id=input2,bus=usb.0,port=3") from the qemu command line fixes the
> doubled mouse cursor issue... however, I can't find how to remove it from
> libvirt... I tried using 'virsh edit' and removing the following lines from
> the xml:
>
> <input type='mouse' bus='usb'>
> <alias name='input2'/>
> <address type='usb' bus='0' port='3'/>
> </input>
>
> But libvirt doesn't seem to allow me to remove the default usb-mouse device.
>
> []'s
> Gustavo
>

virsh dumpxml guest-name > guest.xml

Open guest.xml in any text editor

remove this line

<input type='mouse' bus='usb'>
<alias name='input2'/>
<address type='usb' bus='0' port='3'/>
</input>

Enter the following on the command line to update the VM guest configuration:

virsh shutdown guest-name
virsh define guest.xml
virsh start guest-name
virsh dumpxml guest-name > guest.xml and check if <input type='mouse'..> type is removed..

Comment 10 Dan Zheng 2019-05-22 09:37:28 UTC
Reproduce with:
libvirt-4.5.0-23.module+el8.1.0+3080+f4b8ac6e.ppc64le

Use below configuration to define a guest, then an usb mouse is added.
    <input type='tablet' bus='usb'/>
    <graphics type='vnc' port='-1' autoport='yes'/>

# virsh dumpxml vm1 |grep input -A3 -B3
    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='keyboard' bus='usb'>
      <address type='usb' bus='0' port='2'/>
    </input>
    <input type='mouse' bus='usb'>
      <address type='usb' bus='0' port='3'/>
    </input>
    <graphics type='vnc' port='-1' autoport='yes'>
      <listen type='address'/>
    </graphics>

Retest with:
libvirt-4.5.0-24.module+el8.1.0+3205+41ff0a42.ppc64le
qemu-kvm-2.12.0-74.module+el8.1.0+3227+57d66ad3.ppc64le
kernel-4.18.0-83.el8.ppc64le


Use below configuration to define a guest, then no usb mouse is added.
    <input type='tablet' bus='usb'/>
    <graphics type='vnc' port='-1' autoport='yes'/>

# virsh dumpxml guest |grep input -A3 -B3
    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='keyboard' bus='usb'>
      <address type='usb' bus='0' port='2'/>
    </input>
    <graphics type='vnc' port='-1' autoport='yes'>
      <listen type='address'/>
    </graphics>

Comment 11 Dan Zheng 2019-05-27 10:53:19 UTC
Scenario 2:

1. Guest already has below setting. 
    <input type='keyboard' bus='usb'>
      <address type='usb' bus='0' port='2'/>
    </input>
    <input type='mouse' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <graphics type='vnc' port='-1' autoport='yes'>
      <listen type='address'/>
    </graphics>
2. User adds a tablet to the guest and save.
   <input type='tablet' bus='usb'/>
3. Then the guest will be like below, the usb mouse is not removed. 

    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='3'/>
    </input>
    <input type='keyboard' bus='usb'>
      <address type='usb' bus='0' port='2'/>
    </input>
    <input type='mouse' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <graphics type='vnc' port='-1' autoport='yes'>
      <listen type='address'/>
    </graphics>
I think the usb mouse should be removed for better user experience because the user may also encounters
the double pointer issue in this situation. What do you think about? Andrea?

Comment 12 Andrea Bolognani 2019-05-27 12:08:10 UTC
(In reply to Dan Zheng from comment #11)
> Scenario 2:
> 
> 1. Guest already has below setting. 
>     <input type='keyboard' bus='usb'>
>       <address type='usb' bus='0' port='2'/>
>     </input>
>     <input type='mouse' bus='usb'>
>       <address type='usb' bus='0' port='1'/>
>     </input>
>     <graphics type='vnc' port='-1' autoport='yes'>
>       <listen type='address'/>
>     </graphics>
> 2. User adds a tablet to the guest and save.
>    <input type='tablet' bus='usb'/>
> 3. Then the guest will be like below, the usb mouse is not removed. 
> 
>     <input type='tablet' bus='usb'>
>       <address type='usb' bus='0' port='3'/>
>     </input>
>     <input type='keyboard' bus='usb'>
>       <address type='usb' bus='0' port='2'/>
>     </input>
>     <input type='mouse' bus='usb'>
>       <address type='usb' bus='0' port='1'/>
>     </input>
>     <graphics type='vnc' port='-1' autoport='yes'>
>       <listen type='address'/>
>     </graphics>
> I think the usb mouse should be removed for better user experience because
> the user may also encounters
> the double pointer issue in this situation. What do you think about? Andrea?

While I agree that having both input devices results in a pretty poor
user experience, we can't really go ahead and remove an existing
device that, for all we know, has been explicitly added by the user.
So the current behavior, while unfortunate, is correct and expected.

---

Something that I should try again is running a graphical guest with
both a tablet and a mouse on all architectures and compare behaviors.
I seem to recall x86 was dealing with that much better than other
architectures, basically ignoring the mouse and using the tablet
only, possibly as a consequence of the mouse being a built-in PS/2
device and the tablet being a USB one - which is not the case on any
other architecture. Perhaps there is a way to convince the display
server to give priority to the tablet when both it and a mouse are
present? That'd be cool.

Comment 13 Dan Zheng 2019-05-28 06:16:02 UTC
OK. As to the existing device, users should know what they really want. So I agree.
Then I mark this bug verified.

Comment 14 IBM Bug Proxy 2019-07-18 08:54:39 UTC
------- Comment From hannsj_uhl.com 2019-07-18 04:40 EDT-------
.

Comment 16 errata-xmlrpc 2019-11-05 20:48:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:3345


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