I have tried to add an input source through gsettings gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us'), ('xkb', 'ru')]" but it still produced the same result: text input remains at default layout.
Restarting the GNOME Shell fixes the issue and the 'ru' layout gets added in /etc/default/keyboard configuration file: XKBLAYOUT=us,ru This may explain why rearranging the order of input sources magically fixes the bug: newly added input sources probably need to be put into defaults once to be recognized later. However, manually editing the keyboard configuration file does nothing. What probably happens is that gnome-shell recognizes the added input sources but 'forgets' 1) to send the appropriate command to XKB (setxkbmap ru) whenever the switch shortcut is invoked; or 2) to reconfigure the keyboard settings. -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to gnome-control-center in Ubuntu. https://bugs.launchpad.net/bugs/1890875 Title: Keyboard won't switch its layout to a newly added second input source unless their order is rearranged Status in GNOME Shell: Unknown Status in gnome-control-center package in Ubuntu: Fix Released Bug description: What should happen: Adding a second input source (Russian, in my case) should result in being able to switch to it and use it immediately. What happens now: It is not recognized until you rearrange its order, or reboot. Steps to reproduce this bug: 1. Have English set as primary language. 2. Go to Settings > Region & Language > Input Sources and add Russian. 3. Russian layout is added to Input Sources and the indicator becomes visible in the Top Bar. 4. You can switch between languages with the assigned keyboard shortcut but the text input won't change. 5. Rearrange their order in Input Sources: make Russian primary, English secondary. 6. You can now enter text in Russian. 7. You can now put Russian back to being second in the list (so it does not cause problems at logic screen, opening up new browser window, etc.) or 5. Reboot or re-login (restarting gnome-shell works as well: killall -3 gnome-shell or Alt+F2 > r > Enter) Screenshots are attached. The bug is easily reproduced as many times as possible. ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: gnome-control-center 1:3.28.2-0ubuntu0.18.04.6 ProcVersionSignature: Ubuntu 4.15.0-112.113-generic 4.15.18 Uname: Linux 4.15.0-112-generic x86_64 ApportVersion: 2.20.9-0ubuntu7.16 Architecture: amd64 CurrentDesktop: ubuntu:GNOME Date: Sat Aug 8 13:39:01 2020 InstallationDate: Installed on 2016-11-03 (1373 days ago) InstallationMedia: Ubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719) SourcePackage: gnome-control-center UpgradeStatus: Upgraded to bionic on 2020-07-24 (15 days ago) To manage notifications about this bug go to: https://bugs.launchpad.net/gnome-shell/+bug/1890875/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp