GNOME Bugzilla – Bug 768710
Input messed up when external monitor unplugged using Wayland
Last modified: 2016-08-19 13:19:44 UTC
Gnome shell version: 3.20.3-1.fc24
Mutter version 3.20.3-1.fc24
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.
Most likely a mutter bug; and if not, possibly an Xwayland, but lets explore mutter first.
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.
(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).
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.
The most suspicious commit would be
Author: Rui Matos <email@example.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.
The problem was uncovered by that mutter patch but this is really a bug in xwayland, see https://patchwork.freedesktop.org/patch/98554/
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.
(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.