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 776639 - Key Presses Repeated, Lost or Out of Order Wayland
Key Presses Repeated, Lost or Out of Order Wayland
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: keyboard
3.22.x
Other Linux
: Normal major
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2016-12-31 01:03 UTC by jackieb
Modified: 2021-07-05 14:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description jackieb 2016-12-31 01:03:13 UTC
1. control+t in Chromium creates 99 new tabs
2. control+shift+n in Visual Studio Code creates 3 new windows
3. typing in Chromium address bar while tabs are loading causes characters out of order, repeating 40 or so characters or characters missing
4. typing in overview app search sometimes causes 2-3 repeated characters
5. LibreOffice Writer often ignores enter
6. Characters typed in LibreOffice Writer are input out of order
7. LibreOffice Writer acts on significant keys out of order, like control+f or enter, so that characters typed before or after the significant key-press are switched to the pother side. This appears to be caused by switching focus or creating dialogs

3.22.2
Comment 1 André Klapper 2017-01-01 01:23:54 UTC
Which distribution is this about?
Comment 2 Olivier Fourdan 2017-01-12 10:41:09 UTC
Hi, could you tell which xserver/Xwayland version is used?
Comment 3 jackieb 2017-01-12 18:19:36 UTC
It’s Wayland

echo Observed on $(date --utc --rfc-3339=date) && echo $(lsb_release --description --codename --short) && uname --nodename --kernel-release --kernel-version && for _P in gnome-session libwayland-server0 lightdm; do dpkg --status $_P | egrep "^(V|Pa)"; done

Observed on 2017-01-12
Ubuntu 16.10 yakkety
c89 4.8.0-32-generic #34-Ubuntu SMP Tue Dec 13 14:30:43 UTC 2016
Package: gnome-session
Version: 3.22.2-1ubuntu1~ubuntu16.10.1
Package: libwayland-server0
Version: 1.11.0-2
Package: lightdm
Version: 1.19.5-0ubuntu1

https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1650629
Comment 4 Olivier Fourdan 2017-01-13 08:09:53 UTC
Chromium is an X11 application, not a Wayland native, so it's running in Xwayland.

Xwayland has a fix for that in Xserver 1.19:

   https://cgit.freedesktop.org/xorg/xserver/commit/?id=fda5675
   https://cgit.freedesktop.org/xorg/xserver/commit/?id=239705a
   https://cgit.freedesktop.org/xorg/xserver/commit/?id=26ad25a
   https://cgit.freedesktop.org/xorg/xserver/commit/?id=88e981e

Which version on Xwayland are you using?
Comment 5 jackieb 2017-01-13 14:43:44 UTC
xwayland may fix Chromium and Visual Studio Code.

Will it also fix:
GNOME Shell overview Application search?
LibreOffice Writer?
- those probably do not use Xwayland



upgrade to Xwayland from Xserver 1.19 fixed 2016-06-03:
- requires updating the xserver
- time to Ubuntu is over 7 months
- exists for Debian Sid https://debian.pkgs.org/sid/debian-main-amd64/xwayland_1.19.0-3_amd64.deb.html
- for Ubuntu, the patches need to be applied to the package from source

Latest Ubuntu build is 1.18.4
https://launchpad.net/ubuntu/+source/xorg-server/

dpkg --status xwayland | egrep "^(V|Pa)"
Package: xwayland
Version: 2:1.18.4-1ubuntu6.1
Comment 6 Olivier Fourdan 2017-01-13 15:14:39 UTC
(In reply to jackieb from comment #5)
> xwayland may fix Chromium and Visual Studio Code.

Yes, but this bugs contains several issues with different programs.

> Will it also fix:
> GNOME Shell overview Application search?
> LibreOffice Writer?
> - those probably do not use Xwayland

LibreOffice is still using Xwayland, I reckon.

In Wayland, the client is responsible for the key repeat, meaning that different clients may behave differently, and the same issue might be found in different clients.

In the case of X11 applications, as mentioned, Xwayland 1.19.x has some code to improve the key repeat. A similar fix is also found in gtk3.

But it's worth noting that the issue occurs because the compositor cannot cope with the load and delays the key release notification, while clients start repeating the key, so it may be that your system is overloaded.
Comment 7 jackieb 2017-01-13 22:21:36 UTC
Here’s the coolest way ever to determine if an app uses Wayland or Xwayland:

https://medium.com/@bugaevc/how-to-easily-determine-if-an-app-runs-on-xwayland-or-on-wayland-natively-8191b506ab9a

1. Launch xeyes from GNOME Terminal
2. While moving the mouse cursor over a Wayland Application window, the eyes do not move.

LibreOffice, gedit, GNOME Terminal, Evolution are Wayland
Chromium, Visual Studio Code are Xwayland

In terms of overload:
- this happen when GNOME overview Application search populates results
- or when Chromium is loading tabs
- and I guess LibreOffice is slow on handling all keystrokes :)

When there for short periods of time are more processes ready to execute than cpu cores, ie. the Linux run-queue is not empty. So it is not inadequate hardware or anything.

It is noticed that creating large windows or dialogs on GNOME 3.22 is noticeably slow as opposed to for 3.20 or X. This is one occasion when key-troubles happen.

I will report back 1.19 results…
Comment 8 Christian Stadelmann 2017-02-11 21:35:36 UTC
(In reply to jackieb from comment #0)
> 6. Characters typed in LibreOffice Writer are input out of order
> 7. LibreOffice Writer acts on significant keys out of order, like control+f
> or enter, so that characters typed before or after the significant key-press
> are switched to the pother side. This appears to be caused by switching
> focus or creating dialogs

For the issue of randomizing letter order, most notably in LibreOffice, see these two bug reports:
https://bugzilla.gnome.org/show_bug.cgi?id=778019
https://bugzilla.redhat.com/show_bug.cgi?id=1377293

(In reply to jackieb from comment #0)
> 1. control+t in Chromium creates 99 new tabs
> 2. control+shift+n in Visual Studio Code creates 3 new windows
> 3. typing in Chromium address bar while tabs are loading causes characters
> out of order, repeating 40 or so characters or characters missing
> 4. typing in overview app search sometimes causes 2-3 repeated characters

See also:
https://bugzilla.gnome.org/show_bug.cgi?id=757942 (fixed with XWayland 1.19.x)
https://bugzilla.gnome.org/show_bug.cgi?id=777693 (not yet fixed)
Comment 9 Robert Sand 2018-01-31 07:08:11 UTC
I experience this when pressing the super key on the keyboard or opening the activities screen in Gnome 3.22.2. When I start typing for a program title or file that I want to search for, very often the second letter and the third letters are swapped around.

So if I type "ter" for 'terminal', it writes "tre" on the search bar.
If I type the whole program name "terminal" it writes "treminal" in the search bar.

It doesn't happen always, but very often - and I am certain that I don't actually type it wrong. I cannot really determine a reason for when it happens. Maybe when it loads indexed entries? (Because now, when I've stress-tested it over and over again, I've reached a point where the error doesn't occur anymore... But after a reboot it will happen again - maybe alså after a period of time? Haven't tested, will observe and revert back my findings...
Comment 10 GNOME Infrastructure Team 2021-07-05 14:26:30 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of  gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/

Thank you for your understanding and your help.