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 1790904 - [wayland] Multiple displays: mouse coordinates taken from the other display
Summary: [wayland] Multiple displays: mouse coordinates taken from the other display
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: spice-vdagent
Version: ---
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Julien Ropé
QA Contact: SPICE QE bug list
URL:
Whiteboard:
Depends On:
Blocks: 1806601
TreeView+ depends on / blocked
 
Reported: 2020-01-14 14:07 UTC by Radek Duda
Modified: 2021-05-18 15:30 UTC (History)
3 users (show)

Fixed In Version: spice-vdagent-0.20.0-3.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:30:21 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenscast of bug reproduction (3.56 MB, video/webm)
2020-01-14 14:07 UTC, Radek Duda
no flags Details
spice-debug log before and after reconnection (210.67 KB, text/plain)
2020-01-14 14:41 UTC, Radek Duda
no flags Details
spice-vdagentd -d -d log | grep -v mouse (22.55 KB, text/plain)
2020-01-14 14:47 UTC, Radek Duda
no flags Details

Description Radek Duda 2020-01-14 14:07:49 UTC
Created attachment 1652216 [details]
screenscast of bug reproduction

Description of problem:
After some specific steps, mouse coordinates are taken not from relevant display, but the other one, which should not be opened.


Version-Release number of selected component (if applicable):
client (rhel8.2):
virt-viewer-7.0-9.el8
spice-gtk3-0.37-1.el8.x86_64

host (rhel8.2)
qemu-kvm-4.1.0-14.module+el8.1.0+4548+ed1300f4.x86_64

guest (rhel8.2):
spice-vdagent-0.19.0-3.el8.x86_64
gdm-3.28.3-28.el8.x86_64

reproduced using rhv4.4.0-0.14.master.el7

How reproducible:
always

Steps to Reproduce:
1. Connect to VM with multiple displays enabled
(e.g.
 <video>
      <model type='qxl' ram='262144' vram='131072' vgamem='65536' heads='4' primary='yes'/>
      <alias name='ua-a11b0f92-e7c0-484e-9312-f87ae996b9f0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
)
2. Enable another display using remote-viewer:
   'Application menu' ->  'View' -> 'Displays' -> 'Display $(e.g. 2)'
3. Disable the first display:
'Application menu' ->  'View' -> 'Displays' -> 'Display 1'
4. Reconnect to VM with remote-viewer (close it and connect again)

Actual results:

* Two displays are opened now instead of just one ('Display 1' should not be opened'). Both of them show the same screen. Mouse clicks on 'Display 2' are transmitted to 'Display 1'. 'Display 1' is not responding to mouse interaction.
'Display 1' shows invariable screen.

* After resizement of 'Display $whatever' both displays are shown correctly, but mouse interaction is still transmitted to wrong display.


Expected results:
After step 4 only one display is show - 'Display 2' with proper mouse behavior.

Additional info:

Comment 1 Radek Duda 2020-01-14 14:41:51 UTC
Created attachment 1652230 [details]
spice-debug log before and after reconnection

Comment 2 Radek Duda 2020-01-14 14:47:03 UTC
Created attachment 1652232 [details]
spice-vdagentd -d -d log | grep -v mouse

Comment 3 Julien Ropé 2020-01-14 16:25:38 UTC
I don't have a rhel8.2 VM yet - I'm putting that in place.
But with a rhel8.0 VM, I can see some issues too. I get the "display 1" opened, and at some point while testing I had both displays showed in a single window.
Mouse clicks are right though. But I still don't think I have the expected behaviour.
It seems that things are working as expected only when you disable the last display.

Was this scenario working before 8.2?

Comment 4 Julien Ropé 2020-01-15 13:15:53 UTC
 I've been able to reproduce the same problem with a RHEL8.2 VM.

 I've tried various combinations of client and guest to understand where the problem may come from:
 - 8.1 client to 8.1 VM -> no issue
 - 8.1 client to 8.2 VM -> issue as described
 - 8.2 client to 8.2 VM -> issue as described
 - 8.2 client to 8.1 VM -> same issue as comment #3 : 2 displays are opened when we are expecting a single one, but mouse clicks are OK.

 Interestingly, the 8.1 to 8.1 shows that when the application is re-opened, display 1 is enabled, but not display 2.

 It seems the problem is following the VM version, so it may be an issue on the agent side.
 Now the 8.2 client doesn't behave as expected when connecting to an older VM. Not sure if it is related, or a different issue.

 I will continue investigating

Comment 5 Radek Duda 2020-01-29 13:18:49 UTC
Yes it was working before - hence this 'Regression' keyword.

Comment 6 Julien Ropé 2020-02-03 08:37:13 UTC
I've done some more tests, with the following results:

1) Rebuilt different versions of virt-viewer from a Fedora 30 computer, trying to see when the bug appeared. But going down to virt-viewer 7 and spice-gtk 37, I still see the bug. This is the version shipped with RHEL8.1, which doesn't show the bug.
This hints at a problem in a separate library.

2) Trying to confirm it, I used my rebuild virt-viewer binary on RHEL8.1 -> the bug doesn't appear.
Using the same binary on RHEL8.2 shows the bug.


Given this information, I suspect a change in other libraries (GTK?) to cause the bug.
I will try to find which library may be involved here.

Comment 8 David Blechter 2020-02-24 16:37:48 UTC
moving to the backlog to address all Wayland related issues in SPICE. The solution likely requires in number of components outside of the spice related as well.

Comment 11 Julien Ropé 2020-11-19 14:49:21 UTC
Provided a fix for it with the following commits: https://gitlab.freedesktop.org/spice/linux/vd_agent/-/merge_requests/28

Note that an unneeded window still opens, but the mouse events are now properly handled.
The additional window opening is already described in BZ#1661135

Comment 21 errata-xmlrpc 2021-05-18 15:30:21 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 (Moderate: spice-vdagent security and bug fix update), 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-2021:1791


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