Bug 2076596 - The KDE ibus panel is not able to switch keyboard layouts on Wayland
Summary: The KDE ibus panel is not able to switch keyboard layouts on Wayland
Alias: None
Product: Fedora
Classification: Fedora
Component: ibus
Version: 36
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: fujiwara
QA Contact: Fedora Extras Quality Assurance
: 2100970 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2022-04-19 13:06 UTC by Lukas Ruzicka
Modified: 2022-06-28 06:06 UTC (History)
13 users (show)

Fixed In Version: ibus-1.5.26-4.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2022-04-22 01:19:35 UTC
Type: Bug

Attachments (Terms of Use)
The ibus panel with incorrect layout. (221.96 KB, image/png)
2022-04-19 13:06 UTC, Lukas Ruzicka
no flags Details
ibus warning message not translated (199.40 KB, image/png)
2022-04-24 11:35 UTC, Geraldo Simião
no flags Details

System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-437 0 None None None 2022-04-26 07:36:38 UTC

Description Lukas Ruzicka 2022-04-19 13:06:20 UTC
Created attachment 1873514 [details]
The ibus panel with incorrect layout.

Description of problem:

I have freshly installed KDE Live 20220418 and made following settings during the installation:

* System language is English.
* Keyboard layout is Czech.

After the installation, the keyboard is correctly laid out to "czech" and uses the correct czech mappings. When I check for the system settings using `localectl status`, I get the same result:

System Locale: LANG=en_US.UTF-8
    VC Keymap: cz
   X11 Layout: cz

However, when I log into the KDE session, the IBUS-panel shows incorrectly "EN", but the layout is not English and even when I specifically select it using the panel, it does not have any influence.

Also, when I use the panel to add other languages, it does not affect the system layout which is used for the KDE session, as well as for applications (kwrite, konsole), which remains "czech" all the time.

Version-Release number of selected component (if applicable):
KDE Plasma 5.24.4

How reproducible:


Steps to Reproduce:

1. Install KDE Live with non-english layout (as the only one)
2. Log into the newly installed session.
3. See if ibus-panel shows the correct layout.
4. Try using ibus-panel to modify keyboard layout in the KDE session.

Actual results:

ibus-panel cannot modify keyboard layout

Expected results:

ibus-panel should be able to modify keyboard layout or should not be the default method to do so.

Additional info:

See screenshot

Comment 1 Fedora Blocker Bugs Application 2022-04-19 13:10:25 UTC
Proposed as a Blocker for 36-final by Fedora user lruzicka using the blocker tracking app because:

 This violates the criterion about the basic functionality of default applications (https://fedoraproject.org/wiki/Fedora_36_Final_Release_Criteria#Default_application_functionality) or alternatively the default panel functionality (as the selector is placed in the panel) https://fedoraproject.org/wiki/Fedora_36_Final_Release_Criteria#Default_panel_functionality.

Comment 2 Matthew Miller 2022-04-19 18:03:32 UTC
Is this new to F36?

Comment 3 Geoffrey Marr 2022-04-19 18:58:57 UTC
Discussed during the 2022-04-19 blocker review meeting: [0]

The decision to classify this bug as an "AcceptedBlocker (Final)" was made as it violates the following criterion:

"All elements of the default panel (or equivalent) configuration in all release-blocking desktops must function correctly in typical use".

We also note it violates the spirit of the "keyboard layout configuration" criterion, which should be updated to require that switching work for default-switched configurations.

[0] https://meetbot.fedoraproject.org/fedora-blocker-review/2022-04-19/f36-blocker-review.2022-04-19-16.09.txt

Comment 4 fujiwara 2022-04-20 02:29:15 UTC
I guess you use Wayland session.
IBus panel runs setxkbmap internally so ibus cannot change the layout in Wayland.
You could run systemsettings5 and configure Input devices -> Keyboard instead.

The possible fix is to hide all XKB engines in Wayland but shows input method engines only in Wayland session.
I think the right fix is to integrate the IBus panel to Plasma Wayland compositor likes GNOME Wayland.

Comment 5 Fedora Update System 2022-04-20 11:54:36 UTC
FEDORA-2022-cc6ec114f7 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-cc6ec114f7

Comment 6 fujiwara 2022-04-20 12:00:22 UTC
I hide XKB engines for Plasma Wayland for Fedora 36.
You need to run `ibus reset-config` after you install ibus-1.5.26-4.fc36.

Comment 7 Fedora Update System 2022-04-20 15:31:15 UTC
FEDORA-2022-cc6ec114f7 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-cc6ec114f7`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-cc6ec114f7

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Lukas Ruzicka 2022-04-20 16:35:32 UTC
Thanks for the info. So, I can confirm that IBUS stopped showing the layouts on Wayland, hid the icon (although there is a placeholder left producing an unoccupied spot) and shows a warning that the layout settings do not work in Wayland and users should use systemsettings5 instead.

If this is how you want to solve this, I think it is sufficient for the time's being.

Comment 9 Adam Williamson 2022-04-21 16:03:00 UTC
fujiwara: "I think the right fix is to integrate the IBus panel to Plasma Wayland compositor likes GNOME Wayland."

is this something you can do, or does it need help from the KDE team? I agree the update should be 'enough' for release, but it would be nice to get the "right fix" done as a post-release update. Thanks!

Comment 10 Fedora Update System 2022-04-22 01:19:35 UTC
FEDORA-2022-cc6ec114f7 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 fujiwara 2022-04-22 06:22:38 UTC

I think it needs the help from KDE team since implementing Plasma Wayland compositor is complicated for me.
Currently one upstream bug exists: https://bugreports.qt.io/browse/QTBUG-96872

On the other hand, I will implement a new XKB setting in IBus in Fedora 37 to work with Wayland desktop. It would be nice to file another bug for ibus.

Comment 12 Adam Williamson 2022-04-22 14:34:19 UTC
We can re-open this bug for F37 and mark it as not release-blocking, I guess. It's basically the same problem, we just worked around it so far.

Comment 13 Geraldo Simião 2022-04-24 11:35:43 UTC
Created attachment 1874662 [details]
ibus warning message not translated

It seems warning is fine, but its only in English, even on other languages installations.
Screen capture of a fresh install from the iso F36-KDE-RC1.1 (Fedora-KDE-Live-x86_64-36-1.1.iso)

Comment 14 Adam Williamson 2022-04-24 15:28:58 UTC
Oh, yes, that's a good point :| As it was very newly added it's unlikely anyone translated it before we put it in the RC. We'll have to think whether it's worth getting it translated to at least the most common/active languages and respinning...

CCing i18n-bugs list.

Comment 15 Adam Williamson 2022-04-25 15:19:46 UTC
Gonna kick this back to F36 and 'proposed blocker' just for now so we can vote at the blocker review meeting on whether we need the text translated.

Comment 16 Geoffrey Marr 2022-04-25 18:13:42 UTC
Discussed during the 2022-04-25 blocker review meeting: [0]

The decision to consider this bug as sufficiently resolved was made as we agreed this was unfortunate but we have no realistic way to resolve it in an acceptable time frame, and at least the panel element is indeed disabled, so the criterion is satisfied.

[0] https://meetbot.fedoraproject.org/fedora-blocker-review/2022-04-25/f36-blocker-review.2022-04-25-16.00.txt

Comment 17 dacanizares 2022-05-27 17:27:11 UTC
We're using the following command and seems to be working on F36 on Wayland as a workaround to set our keyboard (system-wide) to US Int. With Dead Keys: ibus engine xkb:us:intl:eng

Comment 18 fujiwara 2022-06-25 14:54:06 UTC
*** Bug 2100970 has been marked as a duplicate of this bug. ***

Comment 19 fujiwara 2022-06-28 06:06:10 UTC
Evaluating QtWayland, seems Compositor handles XKB and the changing layouts does not exported to IM modules.
On the other hands, Plasma keyboard indicator is located at /usr/share/plasma/plasmoids/org.kde.plasma.keyboardlayout and seems the scripts accesses the Plasma APIs to change layouts.
IBus panel indicator uses libappindicator to send the IBus UI with D-Bus methods to Plasma panel at present.
Probably I think to migrate IBus panel to the plasmoids scripts for Plasma desktop but need more example implementations of the plasmoids.

Note You need to log in before you can comment on or make changes to this bug.