Problems with extra keyboards in ubuntu after upgrade

After upgrade from ubuntu mate 16.04 I have troubles with adding extra keyboard layouts in my ubuntu mate 20.04
I have 2 partitions: /home and /
/home is living with my installations since ubuntu 10.10
/ is reformatted all times after ubuntu upgrade
I'm simply not able to add any layouts.
If I try to add in keyboard settings new keyboard, this window freezes.
When i start mate-keyboard-properties from terminal and try to add keyboard,i'm getting following message in terminal


Keyboard preferences window freezes and does not response on any other clicks.
New user is able to add layouts for his session.
It is not working for my user.
Is it problem with my older configs from previous installations?
How can i repair it?

Hi there :slight_smile:

Please tell us, what is inside this file :
/etc/default/keyboard

Maybe your gsettings configuration files are locked from edition by a previous OS config. Please check permissions on this :slight_smile: :

┌─[✗]─[[email protected]_apbook08u]─[~]
└──╼ $ll ~/.config/dconf/user
-rw-r--r-- 1 olek olek 35020 janv. 10 11:52 /home/olek/.config/dconf/user

Hi.

My /etc/default/keyboard:

cat /etc/default/keyboard 
# KEYBOARD CONFIGURATION FILE

# Consult the keyboard(5) manual page.

XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS=""

BACKSPACE="guess"

dconf file belongs my user.

$ pwd
/home/unim95/.config/dconf
$ ll
total 72
drwxrwxr-x  2 unim95 unim95  4096 янв 10 04:54 ./
drwxr-xr-x 67 unim95 unim95  4096 янв  7 13:10 ../
-rw-rw-r--  1 unim95 unim95 64215 янв 10 04:54 user

Test user, that is able to add keyboards, has same rights in his home directory.

Hi back :slight_smile:
For me the issue comes from dconf. It should be a old installation of mate dconf that disturb your actual ubuntu from good working.

You can try forcing your keyboard layout editing dconf keys :

Try to configure it for your layout and next, give the machine a reboot.

The best solution would be to make again a new install that will create a clean profile on a new /home and next copy back your files, but without system files.

Hello

I have edited this value by hand to ['us','de','ru'] and in mate-keyboard-settings i was able to set up hotkeys for switching to another layout.
But mate-keyboard-settings throws same error and hangs when i try to edit keyboard layouts.
In my eyes recreation of the whole user profile is not best solution.
I have this profile for more than 10 years without problems.
On Desktop i have same profile, that works.
The only difference between laptop with bug and desktop without is in upgrade path.
Desktop had 18.04 ubuntu upgrade step and laptop gone direct from 16.04 to 20.04

UPD
After session restart i have no keyboard indication in tray.

@olek
Is it possible to remove only some directories that are containing Mate settings?
Or repair need recreation of user home directory?

Hi :slight_smile:
Why not to create a new user with new profile, next copy back your files without hidden ones like .config and .local and next move all to the original partition ?

You will keep your data with a new working profile :slight_smile:

@olek
It will change numeric UID for user.
I'm not really sure that everything will work after mivement and chmod.
Some scripts will die and some setting for other software like firefox, chromium and other.
That is why i want to remove settings only for mate and, may be, for gnome 2.
Other solution would be re-installation and copy, but i will try with deletion and re-login.

If you delete your actual user and create it again, linux will give the same uid to the new user.

From what I have experienced, the uid that will have the new user, is the first one available.
For chrome and firefox, you can next paste them also inside your new profile.

I'm doing a bit as you when I'm installing new setup, but I'm moving my data manually and each time asking question : fresh or this is valuable to keep existing. Chrome and so on, you can just sync your account again, so I'm choosing not to copy it's data when I'm migrating.

I understand your worries about that, but trust me there is nothing better than to let some of your apps / configs to be done again :slight_smile: