Bug 472702 - Keyboard layout switcher suddenly stops working
Summary: Keyboard layout switcher suddenly stops working
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: Keyboard Layout widget (show other bugs)
Version: 5.27.7
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-27 14:53 UTC by gudvinr+kde
Modified: 2024-02-13 03:45 UTC (History)
2 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 gudvinr+kde 2023-07-27 14:53:49 UTC
SUMMARY
When VS Code window is focused, keyboard layout switcher stops working.
It doesn't behave that way with other electron apps (i.e. discord that uses electron 25).
If I focus other apps or desktop, I don't see the problem too.

VS Code itself uses electron 22.

Restarting app doesn't fix the problem.

STEPS TO REPRODUCE
1. Open VS Code

OBSERVED RESULT
Keyboard switcher hides from tray
Hotkey doesn't work

EXPECTED RESULT
Keyboard switching works

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10
Kernel Version: 6.1.39-1-lts (64-bit)
Graphics Platform: X11
Comment 1 gudvinr+kde 2023-08-02 10:56:10 UTC
Not sure if that's related but I also had a situation when layout switcher was just gone.
I am typing text, switching layout, typing more text, switching layout back and notice that it is missing and I can't switch layout anymore.

I tried to toggle settings in keyboard KCM and I got switcher in tray back, but I still couldn't switch layout in all apps except system settings.
I also tried to launch other apps to see if it only recovers in newly opened windows but it doesn't.

So, I think it is not related to VS Code nor electron apps.
Comment 2 gudvinr+kde 2023-08-03 12:23:45 UTC
Okay, that happens now WAY too often. I basically catch this bug every day now and it basically makes system unusable because I can't use only one layout.

What can I do to investigate this behaviour further? There are no core dumps in coredumpctl, not errors in journalctl. My layout switcher just silently goes away.
Comment 3 Nate Graham 2023-09-07 19:25:32 UTC
So the moment you open VS Code, the keyboard switcher System Tray item disappears? Or does it happen some time later?

Does it happen on Wayland too, or only on X11?
Comment 4 gudvinr+kde 2023-09-11 14:03:37 UTC
No, I use an app for a while and at some point I notice that I can't switch layout.

It's tricky to track down why or even when that happens because when you code, obviously you use latin layout most of the time. I rarely switch to other layout. That only happens when I edit TODO lists which doesn't even happen for every session.

So given that, I don't even look at layout indicator most of the time unless layout switch suddenly stops working. But I have no reliable indicator of that. I'd gladly post log output or whatever but I didn't see anything in journalctl related to layouts
Comment 5 gudvinr+kde 2023-09-25 12:19:30 UTC
So, here we are.

I was writing some text in Firefox right now, then switched language to English and couldn't switch back.
Then noticed that layout switcher is missing

Operating System: Arch Linux 
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
Kernel Version: 6.1.55-1-lts (64-bit)
Graphics Platform: X11
Comment 6 gudvinr+kde 2023-09-25 15:02:54 UTC
If I restart firefox process, layout switcher is still missing. But when I focus other windows, it works there.

However, if I open krunner or focus plasma desktop, it doesn't work if firefox was focused before. But if I focus other window and then open krunner, switcher is active there too.
Comment 7 gudvinr+kde 2023-09-25 15:04:50 UTC
I also tried to switch between "Switching Policy" in Keyboard KCM.

If I switch to Global or Window, I can see layout switcher (and switching works). But after I switch back to Application, it stops working again (in firefox only).
Comment 8 Andrey 2023-09-28 21:56:48 UTC
Can you try on Wayland?
Comment 9 Andrey 2024-01-12 23:04:29 UTC
(In reply to Andrey from comment #8)
> Can you try on Wayland?
Comment 10 gudvinr+kde 2024-01-14 00:40:31 UTC
Sadly I can't until at least most annoying bugs on Wayland are fixed. I don't use it as my main environment and it's too much of a hassle.
At the very least, last time I switched to Wayland and back, it messed up display layout (twice), panel layout and display scale.
Also since it takes some time to experience this bug, I need to work with the system for a bit. But some of the window rules don't work, global menus also don't work and other stuff I use doesn't work too.

Maybe I'll try it when Plasma 6 comes out and I report it after a while.
Comment 11 Bug Janitor Service 2024-01-29 03:45:34 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Bug Janitor Service 2024-02-13 03:45:31 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!