Comment 67 for bug 1875062

Revision history for this message
Benjamin Drung (bdrung) wrote : Re: [20.04] Keyboard layout not enabled immediately during installation when typing username/password

Thanks to Nicolas Mouart and Dag Bjerkeli for analyzing the problem. I could easily reproduce/simulate the problem:

Bug report
==========

Tested on Ubuntu 21.10 with virt-manager. Created a virtual machine and selected "Ubuntu 21.04" as OS (which uses machine type pc-q35-6.0) and changed the video to virtio with 3D acceleration. Used jammy-desktop-amd64.iso from 2022-04-05.

* Install Welcome -> Try Ubuntu (keep English as language)
* Install Ubuntu 22.04 LTS
* Welcome -> Continue (keep English as language)
* Keyboard Layout -> Change to German (Neo 2), but other layouts will work too -> Continue
* Updates and other software -> Continue
* Installation type -> select what you want -> Install now
* Where are you? -> Continue
* Open a terminal and run:
```
sudo udevadm trigger
```

and boom. They keyboard layout changed back to English.

ubiquity sets /etc/default/keyboard when you select a keyboard layout, but does not change the keyboard set in GNOME.

Workaround
==========

Before installation: Open Settings -> Keyboard -> Input Sources -> Add (plus sign) your keyboard layout to the input sources. Then select your keyboard layout in the keyboard selector.

Fix
===

gnome-session settings should be changed when a keyboard layout is selected in ubiquity.