Keyboard layout resets on reboot

I’ve searched on the web for a solution but I’ve found nothing that works for me.
I set an italian keyboard layout on system settings, but everytime I restart the system it reset the keyboard layout to “us”.
The only way to solve at the moment is changing manually the layout, switching to another one and then back to “it”, or running the follwing command in the console:

setxkbmap it

I need a solution to solve this issue definitely. Thanks

Hi @fgiorgio

Do you use a local language different of your keyboard layout?

Check the link posted under and don’t forget run the commands with sudo.

Regards.

Hi @xtym, thank you for your suggestion. I’ve followed the doc you mentioned.
After reboot, the command sudo localectl status shows me the correct settings:

System Locale: LANG=it_IT.UTF-8
VC Keymap: it
X11 Layout: it

apps like text editor and console seems to use the correct layout, but other ones like Chrome browser, PhpStorm IDE, Slack, etc are still using the wrong layout.

The command setxkbmap -query shows me:

rules: evdev
model: pc105
layout: us

while after launching the command setxkbmap it all works properly (until the next reboot) and the result is:

rules: evdev
model: pc105
layout: it

Did you do?

sudo localectl set-keymap it

If you didn’t, do it and reboot and post output of localectl status

Yes I did it, this is the output:

System Locale: LANG=it_IT.UTF-8
VC Keymap: it
X11 Layout: it

but there are some apps, like Chrome, that are still using the wrong layout.

Did you check trough gnome settings that your input is it? like mine is Swedish

In the gear icon you can select use this language for every window , check that this options is the one selected,

In the gnome settings is all set to italian, and “*use this language for every window” is checked.

All look ok

Try
sudo localectl set-locale LANG=it_IT.UTF-8

And Reboot

If it doesn’t work try clean cache files and try fix the keyboard again.

To clean user cache:

rm -r .cache/*

There are something what is changing your keyboard layout for some reason before restart maybe someone can help us with it. I am out of ideas :confused: I need go but if i find something i will leave you know.

I tried both the commands but nothing changed.

Look for this option in Internet

gsettings set org.gnome.settings-daemon.plugins.keyboard active false

It Looks like is a bug with some xorg config.

https://bugzilla.redhat.com/show_bug.cgi?id=1528892

Fixing the plug-in to mode false with rhe command abovementioned should do the trick. But read whole information before because i really don’t know if it can works.

Regards

I don’t have org.gnome.settings-daemon.plugins.keyboard in my configurations so the command fails.
I’ve tried the other suggestions in the articles without success.

There’s a way lo launch setxkbmap it command at startup?

This is a workaround:
I’ve added setxkbmap.desktop file in ~/.config/autostart/ with this content:

[Desktop Entry]
Name=setxkbmap
Comment=setxkbmap
Exec=setxkbmap it
StartupNotify=false
Terminal=false
Type=Application

So the command setxkbmap it is executed on startup setting the right keyboard layout.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.