When I plug in an external keyboard, the xkb keymap is reset so that keyboard layout switching is disabled. Results from setxkbmap -print will follow this bug report. Possibly a regression, or duplicate of #295438. Reproducible: Always Steps to Reproduce: 1. Plug in external keyboard. Actual Results: 1. Attempt to switch keyboard layouts (using keyboard shortcut or system tray). No change. 2. Load keyboard layout config. Make random change and apply. 3. Keyboard switching occurs again. Expected Results: Keyboard switching remains working. Might be duplicate of apparently resolved bug 295438. Results from setxkbmap -print to follow.
Created attachment 92814 [details] Initial state of xkb keymap with required layouts. Initial state of xkb keymap with required layouts.
(Sorry, I'll print the outputs below instead of attaching them...) Initial state of xkb keymap with required layouts: xkb_keymap { xkb_keycodes { include "evdev+aliases(qwerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; xkb_symbols { include "pc+gb+gr:2+il(biblicalSIL):3+inet(evdev)+group(alt_shift_toggle)+compose(paus)+nbsp(none)" }; xkb_geometry { include "pc(pc101)" }; }; Final state of xkb keymap after plugging in external keyboard: xkb_keymap { xkb_keycodes { include "evdev+aliases(qwerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; xkb_symbols { include "pc+gb+inet(evdev)" }; xkb_geometry { include "pc(pc105)" }; };
I have the same problem. KDE framework 5.14.0, Plasma 5.4.1, Debian. Here is .xsession-errors after unplugging and re-plugging an external USB keyboard with US layout: ### now unplugging keyboard Solid::Backends::UDev::input_str_to_bitmask can't handle some bits ("2a0", "0", "0", "0", "0", "0", "10000", "2000000", "3878", "d801d001", "1e0000", "0", "0", "0") QXcbConnection: XCB error: 6 (BadCursor), sequence: 25250, resource id: 37748777, major code: 2 (ChangeWindowAttributes), minor code: 0 kcm_keyboard: configuring layouts true configuring options true ### layout switching now works kcm_keyboard: Fetched layout groups from X server: layouts: ("us", "se") variants: ("euro", "") kcm_keyboard: Fetched layout groups from X server: layouts: ("us", "se") variants: ("euro", "") kcm_keyboard: Fetched layout groups from X server: layouts: ("us", "se") variants: ("euro", "") kcm_keyboard: Fetched layout groups from X server: layouts: ("us", "se") variants: ("euro", "") kcm_keyboard: Fetched layout groups from X server: layouts: ("us", "se") variants: ("euro", "") kcm_keyboard: Fetched layout groups from X server: layouts: ("us", "se") variants: ("euro", "") kcm_keyboard: Fetched layout groups from X server: layouts: ("us", "se") variants: ("euro", "") kcm_keyboard: Fetched layout groups from X server: layouts: ("us", "se") variants: ("euro", "") ### now plugging in keyboard again Solid::Backends::UDev::input_str_to_bitmask can't handle some bits ("2a0", "0", "0", "0", "0", "0", "10000", "2000000", "3878", "d801d001", "1e0000", "0", "0", "0") kcm_keyboard: configuring layouts true configuring options true kcm_keyboard: Fetched layout groups from X server: layouts: ("se") variants: ("") kcm_keyboard: Layout map change: "us(euro),se," --> "se," kcm_keyboard: Layout map change from external source: clearing layout memory kcm_keyboard: Fetched layout groups from X server: layouts: ("se") variants: ("") kcm_keyboard: Fetched layout groups from X server: layouts: ("se") variants: ("") kcm_keyboard: Fetched layout groups from X server: layouts: ("se") variants: ("") ### layout switching does not work The workaround mentioned by the OP works for me too.
Created attachment 94709 [details] X.org log
I revealed that xkb layout reset when any USB device is plugged in when there is no config at ~/.config/kxkbrc
That's the behavior of X.org - when new input device is connected the xkb layouts are reset. In KDE we have a workaround - we are catching new device event and reapplying mouse and keyboard configuration. But if your KDE keyboard configuration setting is off you're on your own.
(In reply to Andriy Rysin from comment #6) > That's the behavior of X.org - when new input device is connected the xkb > layouts are reset. > In KDE we have a workaround - we are catching new device event and > reapplying mouse and keyboard configuration. But if your KDE keyboard > configuration setting is off you're on your own. made a patch https://phabricator.kde.org/D21497 in case of patch is ok I'll land it tomorrow
Git commit a14258a0cd60f99e4585d7d1e34f3e029715f342 by Oleg Solovyov. Committed on 04/06/2019 at 14:22. Pushed by osolovyov into branch 'master'. fill layouts from X server when there are no layouts in config Summary: BUG: 348198 Test Plan: 1) move ~/.config/kxkbrc 2) connect a USB keyboard 3) layout changing works Reviewers: ngraham, broulik, hein, #plasma Reviewed By: ngraham Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D21497 M +10 -5 kcms/keyboard/keyboard_config.cpp M +1 -0 kcms/keyboard/keyboard_daemon.cpp https://commits.kde.org/plasma-desktop/a14258a0cd60f99e4585d7d1e34f3e029715f342