Bug 511611 - [Bug] Occasionally, kwin_wayland failing to get access to input devices from logind, resulting in inaccessible mouse and keyboard in its graphical session.
Summary: [Bug] Occasionally, kwin_wayland failing to get access to input devices from ...
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: input (other bugs)
Version First Reported In: 6.5.0
Platform: Arch Linux Linux
: HI major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-04 11:47 UTC by craftfever
Modified: 2025-12-01 21:48 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description craftfever 2025-11-04 11:47:38 UTC
SUMMARY

Occasionally, kwin_wayland failing to request access to input devices from logind, resulting in inaccessible mouse and keyboard in its graphical session. This happens not every login, just at random login attempt, both at the clean boot or re-login. Mouse and keyboard are inaccessible in this case due to permission request failing (btw, mouse pointer is invisible, but it is not the problem with drm and video driver in this situation. so software cursor doesn't help). And when that happens, I can't interact with my PC though keyboard. keystrokes are blocked and the ways to deal with it is wait for screen off and sysrq-ing virtual console and login to it or hit ctrl+alt+del to reboot system. At the time, when error happened, this log line appears in journald:

Failed to activate /org/freedesktop/login1/session/_32 session. Maybe another compositor is running?

There is no another compositor runnging and I using sddm greeter with Wayland backend. This error didn't happen in 6.4.5 or even 6.4.91 and appeared with Plasma 6.5.0 release.

STEPS TO REPRODUCE
1.  Login from sddm to Plasma Wayland session.
2.  Expect no possibility for interaction with interface (only ctrl+alt+del or wait for screen of and sysrq-ing)


OBSERVED RESULT

No possibility for interaction with interface (only ctrl+alt+del or wait for screen of and sysrq-ing). (happens not every time)

EXPECTED RESULT

Normal interraction with interface (which happens not every login)

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Arch Linux (kernel 6.17.7, 6.12.57-lts)
KDE Plasma Version: 6.5.0-6.5.1
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0

ADDITIONAL INFORMATION
Comment 1 craftfever 2025-11-04 18:08:59 UTC
*I wrongly reversed observed and expected results fields< so vice versa, little correction.
Comment 2 Denis Reva 2025-11-10 05:17:22 UTC
I am able to reproduce it with Gentoo on SDDM/Wayland with kwin
Comment 3 TraceyC 2025-11-10 18:49:24 UTC
(In reply to Denis Reva from comment #2)
> I am able to reproduce it with Gentoo on SDDM/Wayland with kwin

Please provide information about your system, either from kinfo on command line or About This System. Thanks.
Comment 4 craftfever 2025-11-23 11:50:49 UTC
(In reply to TraceyC from comment #3)
> (In reply to Denis Reva from comment #2)
> > I am able to reproduce it with Gentoo on SDDM/Wayland with kwin
> 
> Please provide information about your system, either from kinfo on command
> line or About This System. Thanks.

For the topic, I ant to share further observations. It looks like there is interference woth real-time scheduling of kwin_wayland and CAP_SYS_NICE capability. I removed this capability from kwin_wayland (with setcao) to disable RT scheduling and additional interference permission and issue has completely gone. Before, that same occasional inaccessible input devices in Kwin Wayland session. (But I don't remember, that this happened in 6.4.x version, only starting from 6.5.0 and onward issue appears. So removing CAP_SYS_NICE capability with disabling RT kwin sched helps.
Comment 5 craftfever 2025-11-23 11:51:37 UTC
(In reply to craftfever from comment #4)
> (In reply to TraceyC from comment #3)
> > (In reply to Denis Reva from comment #2)
> > > I am able to reproduce it with Gentoo on SDDM/Wayland with kwin
> > 
> > Please provide information about your system, either from kinfo on command
> > line or About This System. Thanks.
> 
> For the topic, I ant to share further observations. It looks like there is
> interference woth real-time scheduling of kwin_wayland and CAP_SYS_NICE
> capability. I removed this capability from kwin_wayland (with setcao) to
> disable RT scheduling and additional interference permission and issue has
> completely gone. Before, that same occasional inaccessible input devices in
> Kwin Wayland session. (But I don't remember, that this happened in 6.4.x
> version, only starting from 6.5.0 and onward issue appears. So removing
> CAP_SYS_NICE capability with disabling RT kwin sched helps.

*setcap, correction