GNOME Bugzilla – Bug 780039
gnome-shell always uses "us" keyboard layout on first login despite correct input sources being set by gnome-settings-daemon
Last modified: 2021-07-05 14:14:19 UTC
On a fresh installation of Debian Stretch with GNOME 3.22 configured in debian-installer with a French locale and a French keyboard layout, when I login for the first time with my new user (hence there's no ~/.config/dconf/ yet) gnome-shell is started with the "us" keyboard layout active (instead of the expected "fr" one). But the keyboard layout menu shows "French" first and "English (US)" second (as does gnome-control-center) and the correct value is stored in dconf in org.gnome.desktop.input-sources.sources. localed is also reporting "fr" as the recommended keyboard layout. $ dconf dump /org/gnome/desktop/input-sources/ [/] sources=[('xkb', 'fr+latin9'), ('xkb', 'us')] xkb-options=@as [] $ localectl status System Locale: LANG=fr_FR.UTF-8 VC Keymap: n/a X11 Layout: fr X11 Model: pc105 X11 Variant: latin9 A simple gnome-shell restart (with ALT+F2 r) is enough to get the French keyboard layout active by default. In Debian, we are not using gnome-initial-setup so the gsettings for input-sources is set by gnome-settings-daemon on first login. I'm not sure how this can be explained... maybe a concurrency issue between gnome-shell and gnome-settings-daemon where gnome-shell picks the "us" layout by default because gnome-settings-daemon has not yet set the correct value? And then when the good value is set, it stays on the current keyboard layout instead of switching to the default one? I filed this on gnome-shell because it seems the most likely culprit here but it might be that this needs to be fixed somewhere else. Feel free to move around as appropriate. NB: This also affects very badly Debian live images: the user configuration does not persist across reboots and gnome-shell is thus always started with the undesired keyboard layout.
*** Bug 784651 has been marked as a duplicate of this bug. ***
The other question is why is the English layout is added at all by default
The rational of the "us" layout is actually explained in bug #697597
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/ Thank you for your understanding and your help.