Bug 449531 - On Wayland, Keyboard Layout applet does not appear immediately after adding a second keyboard layout; have to restart plasmashell first
Summary: On Wayland, Keyboard Layout applet does not appear immediately after adding a...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Keyboard Layout (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression, wayland
: 476830 482593 482711 484723 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-02-02 22:59 UTC by Nate Graham
Modified: 2024-03-30 10:05 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.3
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2022-02-02 22:59:37 UTC
STEPS TO REPRODUCE
1. Start with one keyboard layout
2. Open the Keyboard KCM and add a second one
3. Click "Apply"

OBSERVED RESULT
Nothing changes in the System Tray.

EXPECTED RESULT
The Keyboard Layout applet should automatically appear.

ADDITIONAL INFORMATION
Restarting plasmashell makes it appear.
Comment 1 Nate Graham 2022-02-02 23:00:29 UTC
git master wayland session, FWIW
Comment 2 Andrey 2022-02-03 12:06:02 UTC
Odd. I don't remember this bug, probably a regression.
On new layout adding, there should be a Reconfigure signal triggering the applet..
Comment 3 Fabian Vogt 2022-02-03 21:10:30 UTC
FWIW, I didn't notice any issues with that while trying to reproduce bug 449405, so I probably can't reproduce this either.
Comment 4 Andrey 2022-08-01 21:08:32 UTC
Can someone else confirm? Can't reproduce it.
Any chance to try on VM?
What second layout are you adding?
Comment 5 Nate Graham 2022-08-01 21:09:46 UTC
I'll try in a VM and with my distro-provided session. In my built-from-source Plasma session, it happens no matter what the second layout is.
Comment 6 Nate Graham 2022-08-02 17:32:27 UTC
Found the bug. It only reproduces on Wayland, not on X11.

This is consistent for me in my dev sessions, my distro-provided sessions, and in a VM: in all cases, the Keyboard Layout applet appears in the System Tray immediately after adding a second layout if I'm in an X11 session, but plasmashell must be restarted for it to appear if I'm in a Wayland session.

Lowering priority since Wayland-only bugs can't be 15-minute bugs at this point in time.
Comment 7 Andrey 2022-08-02 19:32:54 UTC
I'm a permanent Wayland user and have never had this issue.
Can you paste your ~/.config/kxkbrc?
Can someone else reproduce?
Comment 8 Andrey 2022-08-02 20:46:36 UTC
Got the issue.

I had following file which hid the issue for me:
$ cat /etc/default/keyboard
XKBLAYOUT="us,ru"
XKBVARIANT=","
BACKSPACE="guess"
XKBMODEL="pc105"
XKBOPTIONS="grp_led:scroll"
Comment 9 Nate Graham 2022-08-02 21:08:30 UTC
I have no such file on my system.
Comment 10 gerd.muncke 2023-03-08 04:45:40 UTC
My observation is:
On startup the layout icon in the system tray sometimes appears, mostly not. Consequently, this also applies to the shortcuts associated with the layouts.
A work around is opening System Settings/Input Devices/Layouts
mark a layout in the listing
move layout order (up/down)
apply
Now the icon is in the system tray and the shortcut is working
Comment 11 Marco Martin 2023-06-08 15:23:32 UTC
Git commit 7d1080a413c3cb5643786458eacdf7dfe09e21f5 by Marco Martin.
Committed on 08/06/2023 at 15:23.
Pushed by mart into branch 'master'.

Adapt applets to Plasma api changes

The root item is now ContainmentItem/PlasmoidItem, representations and tooltips
are direct properties of them

M  +4    -5    applets/keyboardlayout/contents/ui/main.qml
M  +3    -3    applets/kicker/package/contents/ui/CompactRepresentation.qml
M  +1    -1    applets/kicker/package/contents/ui/DashboardRepresentation.qml
M  +3    -3    applets/kicker/package/contents/ui/ItemListDelegate.qml
M  +2    -2    applets/kicker/package/contents/ui/ItemListDialog.qml
M  +4    -4    applets/kicker/package/contents/ui/ItemListView.qml
M  +3    -3    applets/kicker/package/contents/ui/MenuRepresentation.qml
M  +2    -2    applets/kicker/package/contents/ui/SideBarItem.qml
M  +11   -10   applets/kicker/package/contents/ui/main.qml
M  +4    -4    applets/kickoff/package/contents/ui/AbstractKickoffItemDelegate.qml
M  +2    -3    applets/kickoff/package/contents/ui/ActionMenu.qml
M  +9    -9    applets/kickoff/package/contents/ui/ApplicationsPage.qml
M  +5    -5    applets/kickoff/package/contents/ui/BasePage.qml
M  +9    -9    applets/kickoff/package/contents/ui/Footer.qml
M  +10   -10   applets/kickoff/package/contents/ui/FullRepresentation.qml
M  +17   -17   applets/kickoff/package/contents/ui/Header.qml
M  +14   -13   applets/kickoff/package/contents/ui/Kickoff.qml
M  +16   -16   applets/kickoff/package/contents/ui/KickoffGridView.qml
M  +10   -10   applets/kickoff/package/contents/ui/KickoffListView.qml
M  +2    -2    applets/kickoff/package/contents/ui/LeaveButtons.qml
M  +1    -1    applets/kickoff/package/contents/ui/ListOfGridsView.qml
M  +2    -2    applets/kickoff/package/contents/ui/ListOfGridsViewDelegate.qml
M  +3    -3    applets/kickoff/package/contents/ui/NormalPage.qml
M  +5    -5    applets/kickoff/package/contents/ui/PlacesPage.qml
M  +1    -1    applets/kickoff/package/contents/ui/SectionView.qml
M  +2    -2    applets/kimpanel/package/contents/ui/main.qml
M  +5    -5    applets/margins-separator/contents/ui/main.qml
M  +43   -41   applets/pager/package/contents/ui/main.qml
M  +57   -53   applets/showActivityManager/package/contents/ui/main.qml
M  +1    -1    applets/showdesktop/package/contents/ui/PeekController.qml
M  +135  -129  applets/showdesktop/package/contents/ui/main.qml
M  +272  -270  applets/taskmanager/package/contents/ui/main.qml
M  +19   -17   applets/trash/package/contents/ui/main.qml
M  +6    -6    applets/window-list/contents/ui/main.qml
M  +1    -1    containments/desktop/package/contents/ui/ActionButton.qml
M  +1    -1    containments/desktop/package/contents/ui/CompactRepresentation.qml
M  +14   -14   containments/desktop/package/contents/ui/ConfigOverlay.qml
M  +1    -1    containments/desktop/package/contents/ui/FolderItemDelegate.qml
M  +3    -3    containments/desktop/package/contents/ui/FolderView.qml
M  +5    -9    containments/desktop/package/contents/ui/FolderViewLayer.qml
M  +211  -197  containments/desktop/package/contents/ui/main.qml
M  +18   -18   containments/panel/contents/ui/ConfigOverlay.qml
M  +8    -7    containments/panel/contents/ui/LayoutManager.js
M  +275  -266  containments/panel/contents/ui/main.qml
M  +187  -181  desktoppackage/contents/applet/AppletError.qml
M  +14   -13   desktoppackage/contents/applet/CompactApplet.qml
M  +3    -2    desktoppackage/contents/applet/DefaultCompactRepresentation.qml
M  +4    -4    desktoppackage/contents/views/Desktop.qml
M  +15   -15   desktoppackage/contents/views/Panel.qml
M  +7    -8    kcms/touchpad/applet/qml/contents/ui/touchpad.qml
M  +2    -2    toolboxes/desktoptoolbox/contents/ui/ToolBoxContent.qml
M  +7    -6    toolboxes/desktoptoolbox/contents/ui/ToolBoxRoot.qml
M  +4    -4    toolboxes/paneltoolbox/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/7d1080a413c3cb5643786458eacdf7dfe09e21f5
Comment 12 Nate Graham 2023-11-15 20:03:31 UTC
*** Bug 476830 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2024-03-07 19:35:20 UTC
*** Bug 482593 has been marked as a duplicate of this bug. ***
Comment 14 Nate Graham 2024-03-07 19:35:43 UTC
Still getting reports about this in Plasma 6; re-opening.
Comment 15 Nate Graham 2024-03-07 19:36:19 UTC
Can still reproduce it myself.
Comment 16 Nate Graham 2024-03-11 16:11:48 UTC
*** Bug 482711 has been marked as a duplicate of this bug. ***
Comment 17 Bug Janitor Service 2024-03-13 15:22:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5424
Comment 18 Vlad Zahorodnii 2024-03-15 23:27:51 UTC
Git commit 645db7fc9047db0416f1c055554824d282c62cd3 by Vlad Zahorodnii, on behalf of Harald Sitter.
Committed on 15/03/2024 at 22:21.
Pushed by vladz into branch 'master'.

keyboard_layout: always expose dbus interface

our plasmoid only listens to signals when the interface was found.
also when switching from 2 to 1 layout we'd emit a signal that the
layouts changed but then we'd throw away our interface leaving
the client wondering what happened to us (and consequently
printing warnings because our service wasn't found)

this specifically resulted in the plasmoid not getting layout event
changes when switching from 1 to >1

M  +0    -31   autotests/integration/keyboard_layout_test.cpp
M  +0    -14   src/keyboard_layout.cpp
M  +0    -1    src/keyboard_layout.h

https://invent.kde.org/plasma/kwin/-/commit/645db7fc9047db0416f1c055554824d282c62cd3
Comment 19 Nate Graham 2024-03-16 02:40:40 UTC
Git commit 24610e67a339d5bce637e060debb6a401026d70a by Nate Graham, on behalf of Harald Sitter.
Committed on 16/03/2024 at 02:25.
Pushed by ngraham into branch 'Plasma/6.0'.

keyboard_layout: always expose dbus interface

our plasmoid only listens to signals when the interface was found.
also when switching from 2 to 1 layout we'd emit a signal that the
layouts changed but then we'd throw away our interface leaving
the client wondering what happened to us (and consequently
printing warnings because our service wasn't found)

this specifically resulted in the plasmoid not getting layout event
changes when switching from 1 to >1


(cherry picked from commit 645db7fc9047db0416f1c055554824d282c62cd3)

M  +0    -31   autotests/integration/keyboard_layout_test.cpp
M  +0    -14   src/keyboard_layout.cpp
M  +0    -1    src/keyboard_layout.h

https://invent.kde.org/plasma/kwin/-/commit/24610e67a339d5bce637e060debb6a401026d70a
Comment 20 Patrick Silva 2024-03-30 10:05:51 UTC
*** Bug 484723 has been marked as a duplicate of this bug. ***