Bug 490985 - On X11, kglobalacceld-6.1.3 grabs the keyboard and doesn't release it
Summary: On X11, kglobalacceld-6.1.3 grabs the keyboard and doesn't release it
Status: REPORTED
Alias: None
Product: frameworks-kglobalaccel
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 6.4.0
Platform: Exherbo Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords: X11-only
Depends on:
Blocks:
 
Reported: 2024-07-29 15:42 UTC by Timo Gurr
Modified: 2025-02-24 18:10 UTC (History)
3 users (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 Timo Gurr 2024-07-29 15:42:56 UTC
SUMMARY

Please move the bug to plasma kglobalacceld instead of frameworks kglobalaccel (I couldn't find the correct component in the list).

Whenever kglobalaccel comes into play like pressing META+F2 the keyboard input is blocked and keyboard input is no longer possible until restarting of the plasma-kglobalaccel user service via: systemctl --user restart plasma-kglobalaccel.service (switching tty to do that with CTRL+ALT+F3 e.g. works)
after that all the keypresses done to various input fields like konsole, browser and so on suddenly appear like they were buffered. This only happens on a X11 session, wayland is not affected as far as I can tell. It also only affects key presses, mouse input keeps working.

STEPS TO REPRODUCE
1. Update from Plasma 6.0.5 to 6.1.3 (kglobalacceld 6.1.3)
2. Use X11 session
3. Issue a shortcut META+F2

OBSERVED RESULT
Keyboard input no longer working

EXPECTED RESULT
Keyboard input to keep working

SOFTWARE/OS VERSIONS

Operating System: Exherbo 
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.10.0 (64-bit)
Graphics Platform: X11
Processors: 12 × 12th Gen Intel® Core™ i5-12500
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 770

ADDITIONAL INFORMATION
Offending commit from the Plasma/6.1 branch is 219499707e1f85d318bb23ce305de4f3cb0e0eb3 if I revert just that one things work fine again.
Comment 1 Nate Graham 2024-07-30 19:46:14 UTC
What does Meta+F2 do on your system?
Comment 2 fanzhuyifan 2024-07-30 20:23:04 UTC
Fwiw I cannot reproduce the bug on X11, git build, if I assign Meta+F2 to launch dolphin. Keyboard input still works after triggering that shortcut. Also the referenced commit doesn't change the keyboard grabbing logic for ordinary (not modifier-only) shortcuts, so something else seems be causing the issue here.

Is this problem reproducible for a new user? If not figuring out the minimal config that can cause this issue would be useful.
Comment 3 Timo Gurr 2024-07-31 09:21:49 UTC
(In reply to Nate Graham from comment #1)
> What does Meta+F2 do on your system?
krunner. Afaik ALT+F2 is the standard for krunner these days. It's also reproducible after reverting to the standard ALT+F2 among other like ALT+SPACE. It also affects any other shotcuts.

(In reply to fanzhuyifan from comment #2)
> Fwiw I cannot reproduce the bug on X11, git build, if I assign Meta+F2 to
> launch dolphin. Keyboard input still works after triggering that shortcut.
> Also the referenced commit doesn't change the keyboard grabbing logic for
> ordinary (not modifier-only) shortcuts, so something else seems be causing
> the issue here.
> 
> Is this problem reproducible for a new user? If not figuring out the minimal
> config that can cause this issue would be useful.
It's not restricted to Meta+F2 but any other shortcut, e.g. every time globalacceld seems to come into play. It's also reproducible on a completely new user without any pre-existing configs.

I've recorded a video also capturing keypresses, once the curser in the konsole windows changes from the filled white rectangle to the rectangle with just the white border e.g. window loosing focus thats the moment where I tried to launch e.g. krunner with ALT+F2. When the screen goes black I switched tty to be able restart the plasma-kglobalaccel user-service, which is the konsole window to the right where I share a screen session so you can see everything what I did. After restarting the service you can see the typed letters appearing in the konsole window I was typing to.

Video: https://nextcloud.deltaquadrant.org/s/mA9wPRMAwXkHQJJ/download/kglobalacceld.mp4
Comment 4 TraceyC 2025-02-24 17:58:58 UTC
Adding the x11-only keyword
Comment 5 fanzhuyifan 2025-02-24 18:10:58 UTC
See also 489840, a bug that seems to be only reproducible on gentoo, another source-based distro.