Bug 470482 - Keyboard focus deflecting after first keypress, 10-20 minutes into session, with some XWayland software
Summary: Keyboard focus deflecting after first keypress, 10-20 minutes into session, w...
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.6
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-31 09:47 UTC by Grinder Scott
Modified: 2023-07-12 19:14 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grinder Scott 2023-05-31 09:47:51 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

STEPS TO REPRODUCE
1. Open affected software (Renoise in this case)
2. Use for at least 10 minutes, saving modules frequently. Less time is needed if any Electron wrapper application is running (for some reason?)
3. Attempt to input notes on the tracker matrix

OBSERVED RESULT
One keypress is registered, then keyboard focus is deflected away from Renoise. No idea where it goes. Clicking re-latches it. Renoise does not indicate that the focus has gone elsewhere in Renoise.

EXPECTED RESULT
Keyboard focus remains persistent on Renoise, allowing the software to be used.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Devuan GNU/Linux (also observed in Arch Linux and Debian Stable)
(available in About System)
KDE Plasma Version: 5.27.2 (observed as old as 5.7, untested prior)
KDE Frameworks Version: 
Qt Version: 5

ADDITIONAL INFORMATION

Observed consistently in KWin wayland sessions for the majority of the history of the history of KWin as a wayland compositor, when using Renoise. Previously seen in Ferdi as well, seems to have been fixed their-end as of the fork to Ferdium. Issue does not present in KWin X11 sessions, nor any other wayland compositor (ruling out a Renoise issue). Issue has been final blocking item to using Plasma in Wayland for multiple years for myself and I had wrongly assumed that it would have already been reported.

Bug is more likely to happen quickly if the session has been running for at least four hours, but is always a "matter-of-time" subject, and not a "will-it-happen" subject. Longest I have been able to continually use Renoise for in a Plasma 5 wayland session was 25 minutes, directly after boot and going straight into Renoise. Shortest was 10 seconds, 5 days after boot.

If relevant, this has been observed using locally-built from-git mesa on AMD graphics hardware using the amdgpu and radeonsi driver set. This has not been tested with distro mesa on debian or devuan, but was present with distro mesa on arch linux. This has been tested with only one keyboard, which presents one keyboard, two mice, and one controller device, to the operating system. These are mentioned due to feasibility that this bug may be of the "distant ramifications" sort.
Comment 1 Grinder Scott 2023-07-11 23:34:05 UTC
Update: issue now begins at session start, rather than taking extended usage time to happen, with Plasma 5.27.5. Issue also observed with Qucs-S, occasionally Discord, and one time Firefox. I will make attempts to build a newer version of Plasma to see if it persists then.
Comment 2 Grinder Scott 2023-07-12 19:14:38 UTC
Confirmed with 5.25.6 built with kdesrc-build, as well as found application-side fix which may help indicating the issue. Turning off "override window manager shortcuts" in Renoise's settings, in the Keys tab, ends this behaviour entirely for Renoise.