I had the same problem on a fresh install* of ubuntu 17.10.
This bit of information by F.Raab was proven very useful:
However /usr/share/initramfs-tools/hooks/console_setup do not generate /etc/console-setup/cached.kmap.gz and just use the existing one, in contrast to Debian. I assume that the generation has to do once right and then it should work again and then call ´update-initramfs -u`.
It seems the file
/etc/console-setup/cached.kmap.gz was missing on my system, and apparently, the responsible programs do not create it.
The steps that did work on my system:
- Find a file to use as template:
ls | grep kmap (search for filenames containing 'kmap' in current folder). I choose
- Create a duplicate of the template file and call it
sudo cp cached_UTF-8_del.kmap.gz cached.kmap.gz(except NVIDIA drivers enabled via software & updates and grub quiet splash disabled because of shutdown bug)
sudo update-initramfs -u so
cached.kmap.gz can be integrated in the boot sequence.
(I tested that
cached.kmap.gz whas being used by running
stat cached.kmap.gz before and after step 4 and comparing the access timestamps.)
After reboot, cryptsetup would accept my LUKS pasphrase in my preferred keyboard layout, instead of QUERTY.
cached_UTF-8_del.kmap.gz already contained the correct layout. If above method does not work for you, you may try your luck with one of the commands at Change keyboard layout (English UK) on command line to English US or https://apps.ubuntu.com/cat/applications/language-selector-gnome/)
I'm on kernel
4.13.0-32-generic' (check usinguname -r`). Upgrading the kernel might mitigate the issue as well, but I did not want to do that as I feared that would result in conflicts with the NVIDIA driver again. (Why I had to leave Fedora; after almost every kernel update, my system would turn unstable again, and I don't have the skills and time to solve that.)
* except NVIDIA drivers enabled via software & updates and grub quiet splash disabled because of shutdown bug