After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 768710 - Input messed up when external monitor unplugged using Wayland
Input messed up when external monitor unplugged using Wayland
Status: RESOLVED NOTGNOME
Product: mutter
Classification: Core
Component: wayland
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2016-07-12 03:32 UTC by Jason Ekstrand
Modified: 2016-08-19 13:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jason Ekstrand 2016-07-12 03:32:10 UTC
Gnome shell version: 3.20.3-1.fc24
Mutter version 3.20.3-1.fc24
Wayland

My laptop has a high-dpi 3200x1800 display.  When I plug in my low-dpi external 2560x1600 external display and close the lid, everything switches over fine.  When I open the lid and unplug the display, everything seems to switch back over just fine except that mouse input in XWayland apps are broken.  In particular, the mouse position seems to have the Y axis locked but the Y axis works just fine.
Comment 1 Jonas Ådahl 2016-07-12 03:47:40 UTC
Most likely a mutter bug; and if not, possibly an Xwayland, but lets explore mutter first.
Comment 2 Jason Ekstrand 2016-07-12 15:34:38 UTC
As a side-note, this appears to be a problem with input getting to XWayland wrong because it affects all X apps and restarting an app doesn't fix it.  The only way to fix it is to log out and log back in.
Comment 3 Jonas Ådahl 2016-07-12 15:42:25 UTC
(In reply to Jason Ekstrand from comment #2)
> As a side-note, this appears to be a problem with input getting to XWayland
> wrong because it affects all X apps and restarting an app doesn't fix it. 
> The only way to fix it is to log out and log back in.

It could also be that Xwayland transforms the input wrong (I haven't debugged nor reproduced yet, but I still suspect it's more likely mutters wrong doing though).
Comment 4 Jason Ekstrand 2016-07-12 15:50:00 UTC
Another note: This came after I updated gnome-shell, mutter, and xwayland.  Old gnome-shell and mutter were both 3.20.2-1.fc24.  XWayland was updated from 1.18.3-4.fc24.x86_64 to 1.18.3-5.fc24.x86_64.
Comment 5 Jonas Ådahl 2016-07-13 01:18:15 UTC
The most suspicious commit would be

commit 16e2953c6ffacf80be48345766327d72e5475928
Author: Rui Matos <tiagomatos@gmail.com>
Date:   Mon May 16 20:28:14 2016 +0200

    wayland-outputs: Refactor event sending to ensure we're consistent
    
    This makes us behave the same both on bind and when an output
    changes. In particular, we were not sending scale and done events on
    output changes. We were also unconditionally sending mode events on
    output changes even though these should only be sent if there is an
    actual mode change.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=766528


then.
Comment 6 Rui Matos 2016-07-13 17:22:11 UTC
The problem was uncovered by that mutter patch but this is really a bug in xwayland, see https://patchwork.freedesktop.org/patch/98554/
Comment 7 Jonas Ådahl 2016-08-19 09:12:14 UTC
Jason, does the Xwayland patch fix the issue for you? It has been merged to the xserver, so if so I think we can close this one as NOTGNOME.
Comment 8 Jason Ekstrand 2016-08-19 13:19:44 UTC
(In reply to Jonas Ådahl from comment #7)
> Jason, does the Xwayland patch fix the issue for you? It has been merged to
> the xserver, so if so I think we can close this one as NOTGNOME.

It's working well now.  No idea what patch it was that fixed it.