GNOME Bugzilla – Bug 776639
Key Presses Repeated, Lost or Out of Order Wayland
Last modified: 2021-07-05 14:26:30 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
Which distribution is this about?
Hi, could you tell which xserver/Xwayland version is used?
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
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?
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
(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.
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…
(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)
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...
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.