Bug 408855 - Added language layout doesn't appear in language list
Summary: Added language layout doesn't appear in language list
Status: RESOLVED WORKSFORME
Alias: None
Product: kxkb
Classification: Miscellaneous
Component: general (show other bugs)
Version: 3.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-17 22:06 UTC by Konstantin Kharlamov
Modified: 2019-10-25 15:09 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Kharlamov 2019-06-17 22:06:07 UTC
SUMMARY

As the title says: e.g. after adding "APL language layout" and pressing "Apply", the layouts widget doesn't show the new language.

I hope it might be helpful to note that for me language switching goes absolutely crazy. The report describes probably the most straightforward problem. Other things I observe: 1. I can't change language, until I quit "virtual keyboard" (more specifically, it changes for a moment, and then gets changed back). 2. In some apps language suddenly switches itself while typing, and can't be switched back (this one is irrelevant to "virtual keyboard").

As I'm writing this, language layouts disappeared on the system! E.g. I have 3 layouts in systemsettings5: us,ru,apl. However I can't switch languages, the widget disappeared, and `setxkbmap -query` shows "layout: us".

I can't tell steps to reproduce because clearly it's some odd misconfiguration, but I'm clueless how to debug it.

On i3wm and sway everything worked fine. I had a few XKB_* env. variables set as well as used fcitx, but in my attempts to make KDE work I disabled all of it.

I haven't found way to see kxkb version, so I choose latest one, as with Archlinux it's the one likely in use.

ADDITIONAL INFORMATION

journalctl sometimes gives these prints:

    июн 18 00:57:57 constantine-N61Ja kwin_x11[2017]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 16170, resource id: 65012048, major code: 19 (DeleteProperty), minor code: 0
    июн 18 00:57:57 constantine-N61Ja kwin_x11[2017]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 16173, resource id: 65012048, major code: 19 (DeleteProperty), minor code: 0
    июн 18 00:57:57 constantine-N61Ja kwin_x11[2017]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 16174, resource id: 65012048, major code: 18 (ChangeProperty), minor code: 0
    июн 18 00:57:57 constantine-N61Ja kwin_x11[2017]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 16175, resource id: 65012048, major code: 19 (DeleteProperty), minor code: 0
    июн 18 00:57:57 constantine-N61Ja kwin_x11[2017]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 16176, resource id: 65012048, major code: 19 (DeleteProperty), minor code: 0
    июн 18 00:57:57 constantine-N61Ja kwin_x11[2017]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 16177, resource id: 65012048, major code: 19 (DeleteProperty), minor code: 0
    июн 18 00:57:57 constantine-N61Ja kwin_x11[2017]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 16178, resource id: 65012048, major code: 7 (ReparentWindow), minor code: 0
    июн 18 00:57:57 constantine-N61Ja kwin_x11[2017]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 16179, resource id: 65012048, major code: 6 (ChangeSaveSet), minor code: 0
    июн 18 00:57:57 constantine-N61Ja kwin_x11[2017]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 16180, resource id: 65012048, major code: 2 (ChangeWindowAttributes), minor code: 0
    июн 18 00:57:57 constantine-N61Ja kwin_x11[2017]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 16181, resource id: 65012048, major code: 10 (UnmapWindow), minor code: 0


SOFTWARE/OS VERSIONS
Window API: X11
KDE Plasma Version: 5.16
KDE Frameworks Version: 5.59
Qt Version: 5.12.3
Comment 1 Konstantin Kharlamov 2019-06-17 22:30:56 UTC
UPD: turns out, to override layouts I can execute the following

     $ setxkbmap -layout us,ru -option grp:rctrl_rshift_toggle,grp_led:scroll,lv3:ralt_switch,compose:rwin

However this has no influence on systemsettings5 whatsoever, as well as configuration inside it has no influence on output in `setxkbmap -query`

So systemsettings5 is out of sync with real xkb values.
Comment 2 Konstantin Kharlamov 2019-06-17 22:37:30 UTC
UPD2: I found a pattern in apps where layout gets switched for no reason! It happens exactly when I press Shift+Space. This is reproducible in hexchat. I also found that it switches between "us,ru" even when I set lone `setxkbmap -layout us`, but it stops switching when I set the lone "setxkbmap -layout ru`.
Comment 3 Konstantin Kharlamov 2019-06-18 22:09:51 UTC
So, I figured out where from most of problems were coming: that's because GTK saves some IM cache, which needs to be updated manually, by running sudo gtk-query-immodules-2.0 --update-cache and sudo gtk-query-immodules-3.0 --update-cache.

I am not closing though since the bug about language layouts not being updated still persists.
Comment 4 Konstantin Kharlamov 2019-06-28 10:20:56 UTC
(In reply to Konstantin Kharlamov from comment #3)
> So, I figured out where from most of problems were coming: that's because
> GTK saves some IM cache, which needs to be updated manually, by running sudo
> gtk-query-immodules-2.0 --update-cache and sudo gtk-query-immodules-3.0
> --update-cache.
> 
> I am not closing though since the bug about language layouts not being
> updated still persists.

Nvm on the cache, turned out language still switches itself in non-Qt apps when pressing Shift+Space (which I do pretty much on every upper case letter).
Comment 5 Konstantin Kharlamov 2019-06-30 03:01:24 UTC
So, I spent some time debugging a dummy GTK app, and I figured that, at least, an IM getting switched on Shift+Space is caused by uim getting used. Why and how — no idea. I'd be okay with that though, weren't it causing problems on KDE.

For Shift+Space I reported to uim https://github.com/uim/uim/issues/147, hopefully the problem is almost solved.
Comment 6 Konstantin Kharlamov 2019-06-30 05:12:24 UTC
So, at this point all other problems are solved, the only thing that left is the one that bugreport is all about: adding new layouts in systemsettings5 does not do anything. If add APL layout and press Apply, the plasma widget for layouts still only shows ones that were earlier.
Comment 7 Konstantin Kharlamov 2019-06-30 10:16:30 UTC
After waking up from suspend keyboard widget indicator also disappeared. I've seen it occasionally, no idea how to make it re-appear. The side effect it makes is that keyboard layout not being kept per window.
Comment 8 Konstantin Kharlamov 2019-06-30 20:52:01 UTC
So, to fend off suspicion on uim: I completely removed it, rebooted the system, and the problem still persists.
Comment 9 Konstantin Kharlamov 2019-10-25 15:09:41 UTC
After a while the problem seem to have disappeared on its own, so right now there's nothing I can do to debug it. Hopefully it was fixed.