Weird keyboard behaviour in KDE wayland

Hi. Occasionally i will have an issue where a key somehow gets “stuck” inside of something, and will not respond any more. Looking at keyboard scancodes it shows a press and release as usual, but when i open xev, and focus the little window, suddenly the key shows as spamming itself., as if it’s held down despite me not touching any keys. It stops when i press any other key, but still does not respond (pressing the repeating key gives zero output in xev)
How on earth can i troubleshoot this and pinpoint the issue?
As far as i can tell its something to do with a wayland surface not releasing or not getting destroyed properly and then eating all inputs somehow? It usually happens the most when working with wine programs and typing within them. Really at a loss for how to track the source of the issue down so any help would be appreciate :frowning:
Here is a screen recording showing the issue. I have xev open and evtest showing the keyboard scancodes.
https://box.kaetzle.in/u/L63Eq8.mp4

What application is/are concerned ? Do they use XWayland ?

when i open xev, and focus the little window, suddenly the key shows as spamming itself., as if it’s held down despite me not touching any keys. It stops when i press any other key, but still does not respond (pressing the repeating key gives zero output in xev)

It might be XWayland specific.

In which case the next step would be to test with another compositor and see if it is reproducible in the same conditions. If it is, the bug is in XWayland if not in KWin.

It usually happens the most when working with wine programs and typing within them

Like with Wine.

What are your system characteristics ? (kinfo command)

How on earth can i troubleshoot this and pinpoint the issue?

You describe as best as you can the situation and answer questions.
And report bugs.

1 Like

It may be an xwayland bug then yeah, as this repeating input doesn’t get logged with wev, though even in wev the key that is repeating (currently right arrow) does not respond when i press it, and the key repeating behaviour happens in other programs e.g. chromium, glxgears, that are not wine.

my kinfo is

Operating System: Arch Linux 
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.13.2-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1070

I will check out the xwayland support and see if i find anything there. I thought it might be kwin because killing kwin_wayland does resolve (and is the only way to resolve) the issue apart from reboot, I havent found any other way to stop the input from being locked by whatever keeps repeating it