Bug 476830

Summary: Keyboard layout applet not shown on Wayland
Product: [Plasma] plasmashell Reporter: Silver Salonen <silver.salonen>
Component: Keyboard LayoutAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: butirsky, nate
Priority: NOR    
Version: 5.27.9   
Target Milestone: 1.0   
Platform: Manjaro   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=470737
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Silver Salonen 2023-11-11 09:43:36 UTC
SUMMARY
I've always used keyboard layouts and always had the layout icon displayed in system tray. Now I switched to Wayland and in there the icon is not displayed, even though Keyboard Layout is set to "Always shown" under Entries.

STEPS TO REPRODUCE
1. Use Wayland session
2. Configure multiple (I have 2) keyboard layouts

OBSERVED RESULT
Keyboard Layout icon is not shown in system tray.

EXPECTED RESULT
Keyboard Layout icon is shown in system tray.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11
Comment 1 Nate Graham 2023-11-15 20:02:13 UTC
Does it appear if you restart plasmashell with `systemctl restart --user plasma-plasmashell.service`?
Comment 2 Nate Graham 2023-11-15 20:03:31 UTC
Ah, it's just Bug 449531, which is fixed in Plasma 6. In which case, to answer my own question, yes it should.

*** This bug has been marked as a duplicate of bug 449531 ***
Comment 3 Silver Salonen 2023-11-16 07:19:47 UTC
> Does it appear if you restart plasmashell with `systemctl restart --user plasma-plasmashell.service`?

No, it does not. I've restarted plasmashell many times after starting using Wayland, but I've never once seen the keyboard layout icon at system tray under Wayland.
Comment 4 Silver Salonen 2023-11-16 07:20:46 UTC
(In reply to Nate Graham from comment #2)
> Ah, it's just Bug 449531, which is fixed in Plasma 6

I did read through that bug first too, and it seemed to me that what I hit was not that.
Comment 5 Nate Graham 2023-11-16 20:26:45 UTC
Ok, maybe not then.

Can you add it to the desktop as a standalone widget? If you do, does it work as expected?
Comment 6 Silver Salonen 2023-11-16 21:58:56 UTC
Nope, the widget doesn't work either. The error copied from it:
file:///usr/share/plasma/plasmoids/org.kde.plasma.keyboardlayout/contents/ui/main.qml:14:1: KeyboardLayoutButton is not a type
Comment 7 Andrey 2023-11-16 22:28:48 UTC
Please try this workaround:
https://bugs.kde.org/show_bug.cgi?id=470737#c15
Comment 8 Silver Salonen 2023-11-17 07:36:39 UTC
(In reply to Andrey from comment #7)
> Please try this workaround:
> https://bugs.kde.org/show_bug.cgi?id=470737#c15

That does not help in my case. Error is still the same.
Comment 9 Andrey 2023-11-17 08:30:42 UTC
Can you try to reproduce in VM?
Comment 10 Silver Salonen 2023-11-17 14:15:30 UTC
(In reply to Andrey from comment #9)
> Can you try to reproduce in VM?

I tried out using Wayland session in my other Manjaro computer and in there the keyboard layout icon works OK, although the installed software is pretty much the same.
Comment 11 Nate Graham 2023-11-17 17:56:16 UTC
(In reply to Silver Salonen from comment #6)
> Nope, the widget doesn't work either. The error copied from it:
> file:///usr/share/plasma/plasmoids/org.kde.plasma.keyboardlayout/contents/ui/
> main.qml:14:1: KeyboardLayoutButton is not a type

This seems like either a code error in the applet, or a packaging error in the distro. Andrey, do you have any idea which one it could be? FWIW on Fedora KDE in a Plasma 6 Wayland session I see no such error. No issue for me in the past on Plasma 5 Wayland either.
Comment 12 Silver Salonen 2023-11-17 17:58:36 UTC
(In reply to Nate Graham from comment #11)
> This seems like either a code error in the applet, or a packaging error in
> the distro. Andrey, do you have any idea which one it could be? FWIW on
> Fedora KDE in a Plasma 6 Wayland session I see no such error. No issue for
> me in the past on Plasma 5 Wayland either.

I don't think it's a packaging issue as it works OK in another computer with the same versions distro and packages.
Comment 13 Andrey 2023-11-17 18:03:15 UTC
May be some upgrade issue, hard to guess.
That is why I asked try in VM - without a way to reproduce we hardly can do anything here, and would have to close it as a "downstream" issue, whatever..