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 758342 - mouse cursor jumps on screen under wayland when opening context menus and drop-down lists
mouse cursor jumps on screen under wayland when opening context menus and dro...
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks: WaylandRelated
 
 
Reported: 2015-11-19 14:21 UTC by Kamil Páral
Modified: 2016-11-25 08:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland debug output from gnome-control-center (61.62 KB, text/plain)
2015-12-01 10:02 UTC, Kamil Páral
Details

Description Kamil Páral 2015-11-19 14:21:28 UTC
Please note: I had to report this bug into Red Hat Bugzilla due to larger attachment size limits there. Please see the full bug description and attachments there:
https://bugzilla.redhat.com/show_bug.cgi?id=1283645

I copy the original description here:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When I open a drop-down list or a context menu under Wayland, I sometimes spot that the mouse cursor jumps to a different location for a fraction of a second (seems like 1/10 second or something similarly quick). It is probably a race condition, and it's very hard to spot. But we managed to capture the issue with a 240fps camera and furiously fast clicking :)

The mouse cursor always jumps down in vertical direction, it is never shifted horizontally. I can reproduce this best with short drop-down lists (it's most visible when very little changes on the screen otherwise), so that's why I used Display configuration where there's only a single item in the list (probably a bug, but not important here). I can also reproduce this with Nautilus and a context menu shown with a right click. If I do many right clicks quickly in Nautilus window (in an empty space), occasionally I see the mouse cursor teleport down a bit and then go back. It is not necessary to click quickly, this happens even when you do your regular work and click just once or twice, but clicking quickly of course makes it easier and faster to reproduce this.

It is also worth noting that the mouse cursor flickers when opening and closing the drop-down menu. Our theory is that the mouse cursor is moved every time for a fraction of a second, but only sometimes the monitor refresh rate allows us to see it.

We have reproduced this on two different computers.


Version-Release number of selected component (if applicable):
gnome-shell-3.18.2-2.fc23.x86_64
mutter-3.18.2-1.fc23.x86_64
gtk3-3.18.5-2.fc23.x86_64
kernel-4.2.6-300.fc23.x86_64

How reproducible:
it seems always, but you need to try for some time (half a minute or so) and you have to have a keen eye

Steps to Reproduce:
1. right click in nautilus to produce a context menu, or left click on a drop-down list to open and close it, do this repeatedly in quick succession
2. watch the space below the current cursor position
3. occasionally the cursor is visible somewhere below the currently expected position, in a vertical line


Additional info:
This might be related to this bug, but I'm not completely sure:
https://bugzilla.gnome.org/show_bug.cgi?id=758283
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 1 Matthias Clasen 2015-12-01 00:23:34 UTC
Could you provide WAYLAND_DEBUG=1 output from when this is happening ?
If it is still happening, that is...
Comment 2 Kamil Páral 2015-12-01 10:02:55 UTC
Created attachment 316581 [details]
wayland debug output from gnome-control-center

I believe it happened in this debug segment. This is from gnome-control-center, I moved the mouse over the drop-down list, clicked once to open, it happened right at that moment, then clicked again to close it and moved the mouse out of the window.

I had no problems to reproduce it, today it was visible almost on every second click or so. Sometimes only a part of the cursor was visible in a different place, usually just the tip, but it was still visible easily.
Comment 3 Jonas Ådahl 2015-12-01 10:20:29 UTC
What seems to happen is that the client sets a cursor sprite, attaches a buffer with damage to it and commits, then shortly after attaches the same buffer, with new damage and commits. I don't expect the same buffer to have changed content (if it has, then that's another bug), but I assume this is what's causing the glitch.

FWIW, this not invalid behaviour in GTK+; but at best it will waste CPU for everyone and we should probably avoid doing what we do there, but some day we should fix mutter so it can handle things like this.
Comment 4 Kamil Páral 2016-11-25 08:52:50 UTC
I no longer see this in Fedora 25, so I assume it has been fixed.