Keyboard layout ignored in X11 (but active in Wayland)

Some time ago, my keyboard layout (fr - variant) stopped working, certainly after an update, in KDE Plasma X11, where the command

setxkbmap -query


rules:      evdev
model:      pc105
layout:     fr

I notice it still works in KDE Plasma Wayland, where the same command returns:

rules:      evdev
model:      pc105
layout:     us

although the actual layout is fr - variant.

How to get it back on X11? Should I rather ask in the “Desktop Environments” section?


This is strange, but it may only be a user account issue. If you want to check/troubleshoot, create a new user account and login to see how it behaves on the matter.

I wonder how Plasma/KDE system settings see this issue. Does it show the old settings, but not functioning, or something else?

I would suggest using localectl to check and set such settings.
It can set system-wide configuration, if run with sudo/root privileges.

Basic setting of keyboard layout with localectl

Use localectl to set keymap layout and switch.
Find available layouts and options

localectl list-x11-keymap-models
localectl list-x11-keymap-layouts
localectl list-x11-keymap-variants [LAYOUT]
localectl list-x11-keymap-options

Examples for an English-Greek keyboard layout

Set console keymap layout

localectl --no-convert set-keymap us gr

Additionally, set X11 additional settings

localectl --no-convert set-x11-keymap us,gr pc105 , terminate:ctrl_alt_bksp,grp:lalt_lshift_toggle,grp_led:scroll

Note: the extra comma , is required and can be used to set variants. Check man localectl for more usage info.

After system modifications, kernel images should be rebuilt, because they read these settings/files.

KDE shows the old setting (not the one on which I’m fallen back).
I could enforce temporarily the layout with

setxkbmap fr -variant oss

but it reverts at reboot.
Then I tried:

localectl --no-convert set-x11-keymap fr pc105 oss

and… the layout does not change (even though I can see the changes with localectl status).

Are you in a Plasma session, or something else? If you have been using another DE/WM session on the same account, you may have some exports in dot files.
Did you try with a new user yet?

The relevant Plasma/KDE file is


You may check its contents, delete/rename it and try again with KDE system settings.

Yes, I am in a Plasma session (X11), and I have not tried to create a new user. Indeed, the problem is solved, is seems that one of the above commands actually worked.
Thank you!

PS: the file $HOME/.config/kxkbrc now communicate with the KDE settings.

Check if you also have this file and its contents, so you know whether it is solved system-wide, or for KDE only:


This way you will gain more knowledge about Archlinux, for future issues :wink: .