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 774989 - Keystrokes in search field are multiplied
Keystrokes in search field are multiplied
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: overview
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 778704 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-11-24 08:56 UTC by Johannes Rohr
Modified: 2017-06-23 13:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot of bug (1.71 MB, image/png)
2016-11-24 11:22 UTC, Johannes Rohr
  Details
clutter/evdev: Avoid losing key repeat timestamp resolution (1.49 KB, patch)
2016-11-25 12:18 UTC, Rui Matos
committed Details | Review
clutter/evdev: Dispatch libinput before generating key repeat events (3.23 KB, patch)
2016-11-25 12:18 UTC, Rui Matos
committed Details | Review
Video showing the keyboard repeats (2.57 MB, video/webm)
2016-12-29 22:55 UTC, Robert Roth
  Details

Description Johannes Rohr 2016-11-24 08:56:24 UTC
Often the search field behaves weirdly, when I enter "thunderbird" it shows "ttttthhunder". This Behaviour affects only gnome-shell, no other application, so it is definitely not an issue with the physical keyboard.
Comment 1 Johannes Rohr 2016-11-24 11:22:43 UTC
Created attachment 340676 [details]
screenshot of bug

Here is a screenshort. Note the letter "g" in the search field which is there three times, even though I have entered it only once.
Comment 2 Rui Matos 2016-11-25 12:18:27 UTC
Created attachment 340746 [details] [review]
clutter/evdev: Avoid losing key repeat timestamp resolution

Commit 9214d5029c630e6ed8fd9793f6bcb0a0ae451576 changed the notify*
API to use microseconds and we already have a microsecond time source
here so we can use the timestamp directly without losing resolution at
this layer.

--

Unrelated to this bug, just noticed while looking at this.
Comment 3 Rui Matos 2016-11-25 12:18:35 UTC
Created attachment 340747 [details] [review]
clutter/evdev: Dispatch libinput before generating key repeat events

Since both the libinput event source and the key repeat timer have the
same priority, the order in which both handlers are called is
arbitrary if both sources are ready on the same poll return. This
means that sometimes we generate key repeats when there's already a
real key event queued on libinput that would cancel the repeat timer
if only it was processed before.

One solution would be lowering the repeat timer source priority a
notch lower than the libinput source but that would mean that a steady
stream of events from libinput (e.g. pointer device motion) would
prevent any key repeats to happen.

Instead, we can fix this problem by trying to dispatch libinput from
the key repeat timer and checking if the timer source has been
destroyed before generating more key repeats.
Comment 4 Robert Roth 2016-12-29 22:55:57 UTC
Created attachment 342598 [details]
Video showing the keyboard repeats

Additional comments, which "might" help in reproducing this:
* I mostly see it repeating the first character, might be a different bug, but hopefully it is the same, so this comment makes sense here
* whenever this first appears, it is reproducible until a restart happens (I guess logout/login should also work, so gnome-shell restart should solve it)
* unfortunately gnome-shell restart with <Alt+F2> r <Enter> does not work on wayland, so a full logout/login is required
* with each gnome-shell search invocation the number of repeats for the first letter is increased by one: whenever I notice the bug by entering something, and the first letter appears n times:
  * I press escape twice to close the search (overview)
  * press Meta key/Win key to bring up the search again
  * press an alphanumeric key letter, and it appears n+1 times in the search field
* note that in the above sequence if Escape is only pressed once, the search field is cleared, pressing an alphanumeric key makes the character appear n times again in the search bar
* I did see this on two different computers, but I can not reliably reproduce it

Attaching a video to show the behaviour after it appeared (recorded with the built-in screencast tool).

If you could provide instructions on how to find more debug information that could help you, I would be glad to help solve this, as it is really annoying, and on one of the computers I saw it on, it appears on a daily basis.
Comment 5 Florian Müllner 2017-01-24 16:42:00 UTC
Review of attachment 340747 [details] [review]:

Makes sense to me
Comment 6 Florian Müllner 2017-01-24 16:42:03 UTC
Review of attachment 340746 [details] [review]:

OK
Comment 7 Rui Matos 2017-01-25 12:11:56 UTC
Attachment 340746 [details] pushed as 73524ca - clutter/evdev: Avoid losing key repeat timestamp resolution
Attachment 340747 [details] pushed as 1597b35 - clutter/evdev: Dispatch libinput before generating key repeat events
Comment 8 carlo.abelli 2017-02-15 18:42:49 UTC
*** Bug 778704 has been marked as a duplicate of this bug. ***