Description of problem: Typing cursor jumps back and hides letters randomly while typing in Electron apps under Wayland Version-Release number of selected component (if applicable): How reproducible: 100% on wayland applications when typing a long string in an electron application Steps to Reproduce: 1. Use Wayland (I use GNOME but not sure if that part is required) 2. Open an electron application like VS Code or discord 3. Type anywhere for a bit and observe cursor jumps Actual results: Cursor intermittently jumps back 1+ characters and hides the typed characters in the process Expected results: Cursor moves forward normally and does not jump back Additional info: I tried to record a video of this with the screenshot tool, but the recording does not show the behavior even though it occurred while recording.
Wayland is just a set of protocol definitions and a small IPC library, so not "Wayland". If anything that would be Xwayland as Electron apps run by default on X11, hence on Xwayland. When you say "cursor jumps back", you mean the caret in the text widget? I fail to see how Xwayland could be tampering with the caret in the application. I fail to reproduce the exact same behavior, however what I do see is a delayed update, the last character typed on the keyboard shows up after a 1 second delay, that would corroborate the fact that the issue doesn't show on the screencast (i.e. it's more of an app painting issue).
Actually… I see something really weird now, like spurious key events when typing -relly- fast (regardless of VScode or Electro, I can even see that in weston-eventdemo). Out of curiosity, mind trying to reproduce the issue in another Wayland compositor such as weston, sway or KDE Plasma Wayland?
Well, I installed weston and loaded into it and can't launch any of my apps without a seg fault. I've tried installing Sway, but it just kicks me back to GDM when I try to login to it. I did manage to get an external video of the behavior in GNOME though: https://imgur.com/a/uDvxi2Z It gets even messier when you start trying to backspace, but I didn't want to add that in the video because it's hard to tell on video what is a backspace and what is this cursor jump bug since the letters also disappear for a moment with the bug. The issue came up on the ask forums https://ask.fedoraproject.org/t/stuttering-keyboard-on-wayland/22718/4 and I've also discussed it in Discord previously with a couple other people that were able to confirm.
I just tested on KDE Plasma Wayland and the cursor does not visually show the jumping around, but instead just has an intermittent delay between cursor movements forwards and backwards. So letters won't show up for a bit and backspaced letters won't remove for a bit.
Yeah, looking at the video I am now even more convinced this is a buffer update issue more than anything to do with keyboard. And that would possibly match what I was seeing. Can you try something real quick? In VScode, go to File → Preferences → Settings then expand the "Text Editor" section and click on cursor, and enable "Cursor Smooth Caret Animation" - Does that help?
Yes, it looks like that does fix it in VS Code.
I'd say it's a workaround, not a fix. Similarly, disabling glamor support (XWAYLAND_NO_GLAMOR=1 in /etc/environment) also avoids the issue. So I think the problem is with the present code in Xwayland, I reckon that 1 second delay is the present flip timer.
Out of curiosity, is that with NVIDIA proprietary driver?
Yes it is with the NVIDIA proprietary driver
(In reply to somethingsomethingfedora from comment #9) > Yes it is with the NVIDIA proprietary driver Ah right, that was a crucial piece of information missing :) Then I think it's another effect of upstream bug https://gitlab.freedesktop.org/xorg/xserver/-/issues/1317 (fwiw, I fail to reproduce in intel using the open source stack).
This message is a reminder that Fedora Linux 36 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '36'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 36 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 36 entered end-of-life (EOL) status on 2023-05-16. Fedora Linux 36 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed.