Bug 449840

Summary: On X11, sometimes WindowHeap-based effects stop accepting keyboard input
Product: [Plasma] kwin Reporter: elman
Component: effects-window-managementAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: armakuni.zen, bovender, ciferkey, dannn.r, dextrocardiac, d_debnath, gobonja, jfrantzius, kde-bugs.signup, kde, kishore96, lemondejojo, logistikka, me, mo78, nate, pditchev, postix, stalliondrift, t3n3t, tom-kde.bugs, vjorlikowski, ybjqx3340
Priority: NOR Flags: vlad.zahorodnii: Wayland-
vlad.zahorodnii: X11+
Version: 5.27.10   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=448435
https://bugs.kde.org/show_bug.cgi?id=446443
Latest Commit: Version Fixed In:
Attachments: The bug in action. Search bar does not get focus. Keyboard is not recognised. Cannot click.

Description elman 2022-02-09 11:36:49 UTC
SUMMARY
Sometimes when I start overview effect, it doesn't accept any keyboard input. I can't search, I can't use Tab, I can't use arrow keys. I can only use mouse to manipulate with screen.

STEPS TO REPRODUCE
1. Press Meta+W
2. Try typing anything

OBSERVED RESULT
Nothing happens.

EXPECTED RESULT
KRunner should show search results.

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux
KDE Plasma Version: 5.24.0
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.7-1-MANJARO (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
This bug also manifested in 5.23 and occurs randomly. After restart it works again, but then eventually stops.
Comment 1 Johannes 2022-02-09 16:33:46 UTC
I'm having the same bug in Kubuntu using plasmashell 5.24. Also, hitting Tab does not focus the virtual desktop thumbnails in those cases. It makes it pretty unusable for now; I hope this will get fixed quickly.
Comment 2 Vlad Zahorodnii 2022-02-09 17:39:59 UTC
Is the search field highlighted when keyboard input doesn't work?
Comment 3 Johannes 2022-02-09 19:49:59 UTC
Created attachment 146503 [details]
The bug in action. Search bar does not get focus. Keyboard is not recognised. Cannot click.

I've captured the bug in action so you can see. Look at the attachment.
Comment 4 Johannes 2022-02-09 19:52:40 UTC
> Is the search field highlighted when keyboard input doesn't work?
No, it is not highlighted, and you cannot click it. The keyboard input does not work. Also, the custom keyboard shortcuts (other than Super+W) to open/close the effect are ineffective, as well as the escape key, which does not do anything. Super+W still works to exit the overview, otherwise, the only thing that works to exit is to click a window.
Comment 5 Vlad Zahorodnii 2022-02-09 22:03:39 UTC
The search field gets outline visible when pointer hovers it, how odd. Can you run kwin_x11 --replace in terminal, and attach the output here?
Comment 6 Vlad Zahorodnii 2022-02-09 22:08:06 UTC
Potential hypothesis: kwin/overview thinks that Meta is pressed even though it isn't
Comment 7 elman 2022-02-11 09:01:45 UTC
> Is the search field highlighted when keyboard input doesn't work?

No, it does not have focus. When I move mouse over input, it gets blue border, but still can't type any letters. Also when I click inside the input, still can't type.

However it seems that this issue only occurs when I use Meta+W shortcut. When I use Meta+Ctrl+D, everything works as expected.
Comment 8 Marko Gobin 2022-02-11 09:45:51 UTC
I also experience this issue but it only happens on x11. When issue occures, after a while it temporary starts working again.
Restarting kwin temporary fixes it.
Comment 9 elman 2022-02-11 13:10:42 UTC
> However it seems that this issue only occurs when I use Meta+W shortcut. When I use Meta+Ctrl+D, everything works as expected.

Just happened with Meta+Ctrl+D, so forget about this assumption.
Comment 10 Vlad Zahorodnii 2022-02-11 13:18:17 UTC
(In reply to Marko Gobin from comment #8)
> I also experience this issue but it only happens on x11. When issue occures,
> after a while it temporary starts working again.
> Restarting kwin temporary fixes it.

So this bug cannot be reproduced on wayland, correct?
Comment 11 Marko Gobin 2022-02-11 13:21:25 UTC
Correct. I switched to wayland since 5.24 stable was released and issue did not occur even once.
Comment 12 Nate Graham 2022-02-11 19:48:11 UTC
I also cannot reproduce on Wayland, but I have seen it intermittently (not 100%) on X11.
Comment 13 Johannes 2022-02-12 13:45:37 UTC
Just a thought: it seems that there is something that impedes global shortcuts from firing when the overview is open (for instance, I cannot switch virtual desktops using my user-defined global shortcuts, even when the overview seems to work), so I am assuming that something is reading the keys and cancelling their action. 
So perhaps the script that neutralises those keyboard shortcuts is also messing up with the keyboard altogether sometimes.

The fact that this only occurs in X11 is an additional hint on the fact that it may be related to the keyboard.
Comment 14 pditchev 2022-05-05 22:24:36 UTC
Can confirm for kwin 5.24.4, again on Manjaro.
Comment 15 Daniel Kraus 2022-06-15 09:36:50 UTC
Upgraded to Plasma 5.25 and now neither "overview" nor "present windows" accept any keyboard input except ESC.

Operating System: KDE neon 5.25
KDE Plasma Version: 5.25.0
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.4
Kernel Version: 5.13.0-48-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i5-8250U CPU @ 1.60GHz
Memory: 23,4 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: LENOVO
Product Name: 20L8S02D00
System Version: ThinkPad T480s
Comment 16 armakuni.zen 2022-07-13 11:04:23 UTC
Same here. As "Overview" was introduced (I don't remember the first version unfortunately), it worked without problems.
Since KDE 5.24.0 it will work at least one time.

I observed that the search field does not become visible focused, but this first time you can enter a search term. All further times I invoke the "Overview", it doesn't work anymore (with keyboard, only mouse).


Operating System: Manjaro Linux
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5
Kernel Version: 5.15.50-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 4 × AMD Ryzen 3 3200U with Radeon Vega Mobile Gfx
Memory: 21.4 GiB of RAM
Graphics Processor: AMD Radeon Vega 3 Graphics
Comment 17 armakuni.zen 2022-07-16 12:59:17 UTC
Meanwhile, I did some reconfiguration and remove a widget called "Launchpad Plasma". I'm unsure if this is the cause but since then I can use "Overview" normally without any issue.

I don't know if this (or maybe other widgets) can interfere with "Overview", but actually it works
Comment 18 Lee 2022-07-16 13:01:14 UTC
(In reply to armakuni.zen from comment #17)
> Meanwhile, I did some reconfiguration and remove a widget called "Launchpad
> Plasma". I'm unsure if this is the cause but since then I can use "Overview"
> normally without any issue.
> 
> I don't know if this (or maybe other widgets) can interfere with "Overview",
> but actually it works

I don't have this widget but still get this issue from time to time (with X11, didn't try in Wayland).
Comment 19 t3n3t 2022-07-27 21:28:51 UTC
Hey there. This issue affected me too for months until recently. 
Two days ago I decided to switch from Latte-dock to default Plasma panels because Latte developer abandoned project. Since then, while latte-dock is not running on my system, I do not experience this bug at all.
It's sad both because of the possible reason of the described bug and because Latte's developer resigned. *Sigh* Still, hope my info helps anyone.
Comment 20 pditchev 2022-08-02 09:55:02 UTC
(In reply to t3n3t from comment #19)
> Hey there. This issue affected me too for months until recently. 
> Two days ago I decided to switch from Latte-dock to default Plasma panels
> because Latte developer abandoned project. Since then, while latte-dock is
> not running on my system, I do not experience this bug at all.
> It's sad both because of the possible reason of the described bug and
> because Latte's developer resigned. *Sigh* Still, hope my info helps anyone.

I don't have Latte dock installed, so I cannot confirm there's a relation. On my system there's random moments where the input works, but I still don'y connect them with anything specific.
Comment 21 t3n3t 2022-08-02 10:09:16 UTC
(In reply to pditchev from comment #20)
> (In reply to t3n3t from comment #19)
> > Hey there. This issue affected me too for months until recently. 
> > Two days ago I decided to switch from Latte-dock to default Plasma panels
> > because Latte developer abandoned project. Since then, while latte-dock is
> > not running on my system, I do not experience this bug at all.
> > It's sad both because of the possible reason of the described bug and
> > because Latte's developer resigned. *Sigh* Still, hope my info helps anyone.
> 
> I don't have Latte dock installed, so I cannot confirm there's a relation.
> On my system there's random moments where the input works, but I still don'y
> connect them with anything specific.

Yeah, sorry. It turned out that latte dock is not related to this issue, since after all I still experience this bug randomly.
Comment 22 D. Debnath 2022-08-21 10:18:41 UTC
I face the same problem in the Present Windows effect. I'm guessing the problem is caused by some code which is shared by both the effects.
Comment 23 Oliver Grimm 2022-12-20 21:41:02 UTC
still confirmed for Plasma 5.26.4, KDE Frameworks 5.101.0, Qt 5.15.6 on current Debian Testing with X11/nvidia.
additional info:
- bug is gone after restarting the session
- happens with both "Meta+something" hotkey and "Not-Meta-something" hotkey.
- I could not yet find a "step-by-step" to reproduce it
- once this bug occurs, keyboard input with the overview screen remains broken till the end of that session. It never heals by itself.
Comment 24 Daniel Kraus 2022-12-21 06:21:44 UTC
Same here. It's not predictable when the bug occurs.

Operating System: KDE neon 5.26
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Kernel Version: 5.15.0-56-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i5-8250U CPU @ 1.60GHz
Memory: 23,4 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: LENOVO
Product Name: 20L8S02D00
System Version: ThinkPad T480s
Comment 25 Jörg von Frantzius 2023-01-17 16:55:07 UTC
Same for "Present Windows" Desktop Effect, the only key working is "Esc" to close the effect. 

Right now I'm seeing this on:

Operating System: Kubuntu 22.10
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Kernel Version: 5.19.0-29-generic (64-bit)
Graphics Platform: X11
Processors: 6 × AMD Ryzen 5 4500U with Radeon Graphics
Memory: 7,1 GiB of RAM
Graphics Processor: RENOIR
Manufacturer: HP
Product Name: HP Laptop 15s-eq1xxx
Comment 26 Tom Mittelstädt 2023-02-03 17:17:25 UTC
*** Bug 465237 has been marked as a duplicate of this bug. ***
Comment 27 Tom Mittelstädt 2023-02-03 17:21:23 UTC
Count me in. Same configuration as in #c25
Reproducible nothing works but hitting escape or clicking a window.
Comment 28 t3n3t 2023-02-15 12:52:35 UTC
I was experiencing this bug before (and wrote about it in this very topic). But it seems to me, that in my case the bug was showing up only if I use Meta(Super) key to use the Overview. After I revoked it and skipped to using default Meta+W shortcut, the bug doesn't seem to reproduce.
Comment 29 armakuni.zen 2023-02-16 13:03:57 UTC
(In reply to t3n3t from comment #28)
> I was experiencing this bug before (and wrote about it in this very topic).
> But it seems to me, that in my case the bug was showing up only if I use
> Meta(Super) key to use the Overview. After I revoked it and skipped to using
> default Meta+W shortcut, the bug doesn't seem to reproduce.

I had this even with the Meta+W shortcut.
Comment 30 weltenwort 2023-02-17 22:01:21 UTC
I can confirm that this still happens in Plasma 5.27.0, both for the "overview" and the "present windows" effects.

Operating System: Arch Linux 
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.12-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-8665U CPU @ 1.90GHz
Memory: 15,3 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: LENOVO
Product Name: 20QFCTO1WW
System Version: ThinkPad X1 Yoga 4th
Comment 31 armakuni.zen 2023-03-09 07:23:04 UTC
I don't know if this information is helpful, but this behaviour (no keyboard input possible) is not limited to the Overview feature. If you are using the "Desktop Expose" or the "Show (all) Windows" feature, there sometimes also keyboard is not working. On the desktop selector you could press 1 up to 9 for direct access of your desktop, and in the window feature you could filter after window title.

I'm no coder, but it seems to me that these features all use the same code base in the background where this bug occurs. Until now I don't see any pattern when this bug will happen.
Comment 32 Victor J. Orlikowski 2023-05-03 12:23:45 UTC
I am experiencing this bug as well, on 5.27.4 (as shipped with KUbuntu 23.04).

I have, however, discovered a *partial* workaround...for both the Overview effect *and* the Desktop Grid effect (which is also affected by this bug).

When the bug manifests (for me), search, tab, and arrow keys all stop functioning in the Overview effect.
Escape *also* stops functioning (which was my traditional mechanism for *exiting* the Overview effect, as well as the Desktop Grid effect).

Being able to exit these effects using the keyboard was the "most impacting" misfeature, for me.

I have discovered, however, that using the registered shortcut key combination that you used to *enter* these effects, is sufficient to *exit* them, even when the bug is actively manifesting!

So - on my configuration - "Meta-w" is the primary key combination used to enter the Overview effect, and I have an alternate key combination of "Control-Alt-Up" set up for it as well. For the Desktop Grid effect - the primary key combination used to enter it is "Control-F8", and I have an alternate key combination of "Control-Alt-PageUp" set for it.

If have discovered that, if I use "Meta-w" *or* "Control-Alt-Up" to enter the Overview effect, I can use *either* of those key combinations to exit the Overview effect (even if no other keys are working, because of this bug).

Similarly - if I have entered the Desktop Grid effect using *either* "Control-F8" *or* "Control-Alt-PageUp", I can use *either* of those key combinations to exit the Desktop Grid effect (even if no other keys are working - again, because of this bug).

This discovery makes the bug *significantly* less impacting for me - and I hope it provides a hint unto the resolution (since these exceptions to the set of non-functioning key combinations seem significant).
Comment 33 t3n3t 2023-05-31 20:01:54 UTC
So the bug is still at large, will it ever be addressed or X11 users should just ditch Overview and Present Windows Kwin effects and wait till Wayland becomes actually viable?

Also, just wondering, does this bug affect people with only one keyboard layout (I have two)?
Comment 34 armakuni.zen 2023-06-08 09:01:56 UTC
Meanwhile, I'm on Plasma 5.27.5, this bug is still there.

Today I found out, that changes on KWin effects – I recently installed Manjaro on a new computer and added some effects in KWin – seem to "restart" some sort of subsystem. I can't describe it better, I'm no developer. As you may have noticed, sometimes on changing KWin effects the screen shortly blacks out. I think this also triggers some kind of "reset". After this, keyboard entries are possible again.

Next time I would test if manually disabling and re-enabling compositing effects would trigger this, too.
Comment 35 t3n3t 2023-09-11 20:19:01 UTC
(In reply to Victor J. Orlikowski from comment #32)
> I am experiencing this bug as well, on 5.27.4 (as shipped with KUbuntu
> 23.04).
> 
> I have, however, discovered a *partial* workaround...for both the Overview
> effect *and* the Desktop Grid effect (which is also affected by this bug).
> 
> When the bug manifests (for me), search, tab, and arrow keys all stop
> functioning in the Overview effect.
> Escape *also* stops functioning (which was my traditional mechanism for
> *exiting* the Overview effect, as well as the Desktop Grid effect).
> 
> Being able to exit these effects using the keyboard was the "most impacting"
> misfeature, for me.
> 
> I have discovered, however, that using the registered shortcut key
> combination that you used to *enter* these effects, is sufficient to *exit*
> them, even when the bug is actively manifesting!
> 
> So - on my configuration - "Meta-w" is the primary key combination used to
> enter the Overview effect, and I have an alternate key combination of
> "Control-Alt-Up" set up for it as well. For the Desktop Grid effect - the
> primary key combination used to enter it is "Control-F8", and I have an
> alternate key combination of "Control-Alt-PageUp" set for it.
> 
> If have discovered that, if I use "Meta-w" *or* "Control-Alt-Up" to enter
> the Overview effect, I can use *either* of those key combinations to exit
> the Overview effect (even if no other keys are working, because of this bug).
> 
> Similarly - if I have entered the Desktop Grid effect using *either*
> "Control-F8" *or* "Control-Alt-PageUp", I can use *either* of those key
> combinations to exit the Desktop Grid effect (even if no other keys are
> working - again, because of this bug).
> 
> This discovery makes the bug *significantly* less impacting for me - and I
> hope it provides a hint unto the resolution (since these exceptions to the
> set of non-functioning key combinations seem significant).

I would like to add that using any other keyboard layout other than English stops this from working.
I.e. I use ctrl-w in Russian layout (that would be ctrl-ц) to open overview, but I can not close it with same combination until I switch language to English.
Comment 36 Nate Graham 2024-03-04 19:24:01 UTC
Demoting this from being a 15-minute bug since the X11 session is no longer default in Plasma 6.

I'm also interested in learning whether anyone using X11 on Plasma 6 can still reproduce the issue.
Comment 37 Daniel R 2024-03-16 10:26:02 UTC
yes, I am experiencing this problem

system:

Operating System: TUXEDO OS 2
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.114.0
Qt Version: 5.15.12
Kernel Version: 6.5.0-10027-tuxedo (64-bit)
Graphics Platform: X11


I found this workaround:

kwin_x11 --replace &