Bug 434895

Summary: Modifier keys not registering properly at random intervals
Product: [Plasma] kwin Reporter: zerocostabstraction <david.vuckovic7>
Component: inputAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DOWNSTREAM    
Severity: normal CC: nate
Priority: NOR Keywords: wayland-only
Version First Reported In: 5.21.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Kwin RC

Description zerocostabstraction 2021-03-24 17:36:49 UTC
Created attachment 137036 [details]
Kwin RC

SUMMARY

Kwin oddly swallows modifier keys at random intervals. Spits out strange errors in the Xorg log.

STEPS TO REPRODUCE
1. Use my kwin shortcuts a lot during the day
2. At random times, the combination doesn't register, only the key after the modifier. So Meta_R + a becomes a only. Ctrl + F11 becomes F11 only. 
3. Do it twice in a row and it works fine for the next few seconds, sometimes minutes. I can't find any pattern to this.

OBSERVED RESULT

Shortcuts failing to register properly.

EXPECTED RESULT

Shortcuts registering properly.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.21.3
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

Kernel: 5.11.6.1-default

CPU: Ryzen 7 1800X, 16GB of DDR4 RAM. The strange log in /var/log/Xorg.0.log:

[ 46572.992] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 11ms, your system is too slow
[ 50351.616] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 11ms, your system is too slow
[ 50661.465] (EE) event4  - Logitech USB Keyboard: client bug: event processing lagging behind by 25ms, your system is too slow
[ 51111.930] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 13ms, your system is too slow
[ 51219.446] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 16ms, your system is too slow
[ 51434.637] (EE) event4  - Logitech USB Keyboard: client bug: event processing lagging behind by 16ms, your system is too slow
[ 51699.953] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 13ms, your system is too slow
[ 51934.153] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 12ms, your system is too slow
[ 51934.153] (EE) event0  - Logitech Gaming Mouse G502: WARNING: log rate limit exceeded (5 msgs per 60min). Discarding future messages.
[ 52120.593] (II) event0  - Logitech Gaming Mouse G502: SYN_DROPPED event - some input events have been lost.
[ 52236.329] (EE) event4  - Logitech USB Keyboard: client bug: event processing lagging behind by 33ms, your system is too slow
[ 52259.866] (EE) event4  - Logitech USB Keyboard: client bug: event processing lagging behind by 22ms, your system is too slow
[ 52332.789] (EE) event4  - Logitech USB Keyboard: client bug: event processing lagging behind by 13ms, your system is too slow
[ 52332.789] (EE) event4  - Logitech USB Keyboard: WARNING: log rate limit exceeded (5 msgs per 60min). Discarding future messages.
[ 54397.158] (EE) event4  - Logitech USB Keyboard: client bug: event processing lagging behind by 16ms, your system is too slow
[ 55006.720] (EE) event4  - Logitech USB Keyboard: client bug: event processing lagging behind by 16ms, your system is too slow
[ 55010.454] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 13ms, your system is too slow
[ 55816.296] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 13ms, your system is too slow
[ 56357.926] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 13ms, your system is too slow
[ 56403.128] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 11ms, your system is too slow
[ 56500.714] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 12ms, your system is too slow
[ 56500.714] (EE) event0  - Logitech Gaming Mouse G502: WARNING: log rate limit exceeded (5 msgs per 60min). Discarding future messages.
[ 59036.218] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 11ms, your system is too slow
[ 59575.628] (EE) event4  - Logitech USB Keyboard: client bug: event processing lagging behind by 20ms, your system is too slow
[ 59589.693] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 14ms, your system is too slow
[ 59895.297] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 13ms, your system is too slow
[ 59950.598] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 13ms, your system is too slow
[ 60082.096] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 13ms, your system is too slow
[ 60082.096] (EE) event0  - Logitech Gaming Mouse G502: WARNING: log rate limit exceeded (5 msgs per 60min). Discarding future messages.
[ 60170.271] (EE) event4  - Logitech USB Keyboard: client bug: event processing lagging behind by 19ms, your system is too slow
[ 60224.450] (EE) event4  - Logitech USB Keyboard: client bug: event processing lagging behind by 22ms, your system is too slow
[ 61960.538] (EE) event4  - Logitech USB Keyboard: client bug: event processing lagging behind by 18ms, your system is too slow
[ 62396.470] (EE) event4  - Logitech USB Keyboard: client bug: event processing lagging behind by 34ms, your system is too slow
[ 62396.470] (EE) event4  - Logitech USB Keyboard: WARNING: log rate limit exceeded (5 msgs per 60min). Discarding future messages.
[ 62640.778] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 12ms, your system is too slow
[ 63349.467] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 13ms, your system is too slow
[ 63410.605] (EE) event4  - Logitech USB Keyboard: client bug: event processing lagging behind by 17ms, your system is too slow
[ 64024.693] (EE) event0  - Logitech Gaming Mouse G502: client bug: event processing lagging behind by 12ms, your system is too slow

The issue cannot be reproduced on Wayland KWin, or GNOME with the same hardware set up. Keyboard has been swapped multiple times, the mouse mentions come from the macros on my mouse. Which work fine everywhere else. Another finding is that if there's no browser running (no idea if this is just related to higher CPU usage or something), the problem never happens. The distro is openSUSE Tumbleweed, updated today. Attaching my kwinrc.
Comment 1 Nate Graham 2021-03-24 19:44:44 UTC
On Wayland, the compositor handles all input events, but if the problem happens in both Plasma and GNOME, I would tend to think that the issue is deeper than the desktop environment layer. That "your system is too slow" message seems like a clue.

I would recommend opening a similar distro for the openSUSE folks. They may be able to help you further. :)