-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xwayland: applications at some point receive neverending stream of characters #6095
Comments
Can you try sway/wlroots master? |
yeah, should be able to do that. Primarily for verification or do you have something particular in mind that could be the culprit/fix? |
A couple of text-input fixes have made it to master. |
Now on: As the issue only rarely occurs (from my felt memories less than once a month), reporting back can take some time even if the issue still exists. |
I believe I have been having the same issue on latest master versions of sway/wlroots (r6647.03daa53a-1/0.12.0.r382.g6230f7be-1 on Arch linux w/hidpi patch) and for a while before that. In my case, the issue pops up relatively quickly after I start using an XWayland app. To be more precise, any key is repeated, pressing ESC will only have the effect of switching the key repeat to be ESC. I believe modifiers are also repeated, and in one case while no key was visibly repeated anywhere the logs were still filling up with:
Sometime, but not always, this is proceeded/succeeded with spamming of the following:
I am not sure where to proceed from here, but I have confirmed that killing XWayland does stop the events and repeating keys on the sway and wlroots side. I could upload the whole debug log, but it's already around 10MBs after a few occurrences of this issue with no obvious relevant events. |
Might be related but a different one, as for me |
What version of xwayland are you running? Could be xwayland not handling e.g. wl_keyboard.enter/leave correctly. |
21.1.0 |
I updated from sway 1.5/wlroots 0.12.0 to sway/wlroots master today and had this happen to me a couple times very shortly after. In my case, killing fcitx5 stopped the spam. I'm on Arch, no patches, fcitx 5.0.7. |
Can confirm that sway, |
Are you also running fcitx? |
No, I don't (at least as far as I can tell, i.e. no other package accidentially vendors it). |
And I can confirm that explicitly killing |
now happened with a different number key again, but so far it's always been number keys. I can, as I have just confirmed, stop said stream also by typing any character, not just backspace, Esc and such. |
According to libinput, release events are generated when device is unplugged, and libinput copies this behavior for device removal. Let's do the same for our virtual keyboard. https://github.com/wayland-project/libinput/commit/8f846a41fa0566fbd72ece676656e20e56ce43e6 This is another attempt to fix swaywm#2034 and the following sway issue: swaywm/sway#6254 Note that we have other key repeating issues in sway, which aren't addressed by this patch. Since the virtual keyboard itself isn't destroyed when the keyboard grab is destroyed, we'll probably need some trick to reset the state of the corresponding virtual keyboard when the grab is released. swaywm/sway#6095 swaywm/sway#6193
According to libinput, release events are generated when device is unplugged, and libinput copies this behavior for device removal. Let's do the same for our virtual keyboard. https://github.com/wayland-project/libinput/commit/8f846a41fa0566fbd72ece676656e20e56ce43e6 This is another attempt to fix #2034 and the following sway issue: swaywm/sway#6254 Note that we have other key repeating issues in sway, which aren't addressed by this patch. Since the virtual keyboard itself isn't destroyed when the keyboard grab is destroyed, we'll probably need some trick to reset the state of the corresponding virtual keyboard when the grab is released. swaywm/sway#6095 swaywm/sway#6193
I can +1 this issue. I am getting the same problem on Arch Linux where switching focus to a window causes a stream of "4" to keep being sent to the window. I am on SwayWM version 1.6.1 and xorg-xweyland version 21.1.4-1. I have not yet confirmed if XWayland is related to this. The issue does not occur on Alacritty. Switching focus to an alacritty window doesnt send a stream of input (although I'm not sure if its because alacritty reads input directly from an stty) I also can't seem to figure what causes the issue - it starts and stops randomly for me. It doesn't happen very often but when it does there doesn't seem to be any clear reason for it and it usually lasts a few minutes or so before stopping on its own. |
To work around the problem, you can disable the Wayland input method frontend of fcitx5.
It will disable input method support on Alacritty, but most of the GUI apps are Gtk/Qt-based, |
Also seeing this on Arch and sway 1.7. Not running |
fcitx5 since 5.0.17 and 5.1.0 has a workaround for this issue, and when it is removed, the problem still occurs. |
Description
Sometimes (i.e. it suddenly happens, so far it is completely non-obvious to me how it is triggered) xwayland-clients start to receive an endless stream of keys upon gaining focus, as if a key was continuously pressed all the time.
So far I have observed this with number keys, most prominently I have observed it with
2
, but I think I have seen7
in the past as well.Steps to reproduce:
Ways to stop the behavior:
Sway Version: 1.5.1
Debug Log:
At time of noticing the issue, the log is filled with the following lines (the frequency of the entries seems to roughly match the frequency with which characters are streaming in):
As it is very unclear how this is triggered, it only happens rarely and I haven't found a way to manually trigger this, thinning down the configuration proves to be difficult and lengthy. WIP.
The text was updated successfully, but these errors were encountered: