In my case, I traced the issue to the keyboard-configuration package postinst script, which ends up calling 'setupcon --force --save' which in turn calls 'kbd_mode -u'
To reproduce:
sudo apt install --reinstall keyboard-configuration
setupcon documentation states:
"--force Do not check whether we are on the console. Notice that you can be forced to hard-reboot your computer if you run setupcon with this option and the screen is controlled by a X server."
It looks like the checks to avoid this behavior while a graphic environment is active don't work in the context of the installer.
In my case, I traced the issue to the keyboard- configuration package postinst script, which ends up calling 'setupcon --force --save' which in turn calls 'kbd_mode -u'
To reproduce: configuration
sudo apt install --reinstall keyboard-
setupcon documentation states:
"--force Do not check whether we are on the console. Notice that you can be forced to hard-reboot your computer if you run setupcon with this option and the screen is controlled by a X server."
It looks like the checks to avoid this behavior while a graphic environment is active don't work in the context of the installer.