1

The built-in keyboard of my laptop is connected to the system as a USB device.

During installation of XUbuntu 16.04 from the official 64 bit ISO image, I was asked about my keyboard layout.

I entered German, keyboard layout changed as requested and installation went as expected.

But after reboot, the keyboard was set to US layout.

I ran dpkg-reconfigure keyboard-configuration and afterwards, keyboard layout was back to German. Nice.

But after reboot, the keyboard was set to US layout.

I checked /etc/default/keyboard and it did contain the expected entries:

XKBMODEL="pc105"
XKBLAYOUT="de"

But after reboot, the keyboard was set to US layout.

I ran setxkbmap -query and it returned:

rules: evdev
model: pc105
layout: de

The layout is US, despite -query returning DE. When I ran setxkbmap de, the layout changed as requested.

But after reboot, the keyboard was set to US layout.

I pushed CTRL+ALT+F1 and got a non-GUI console. There, keyboard was German directly after reboot.

What is going on here? Why is lightdm on X starting with a US layout, while the non-X text console is DE?

I have tried various suggestions on this site and elsewhere to fix it, but to no avail. Also curious, my XUbuntu desktop machine is also using a USB keyboard and does not show this behaviour.

hez
  • 181

1 Answers1

1

I use an Ubuntu 16.04 based Openbox custom spin, and I had the same problem, but with a 'gb' keyboard being reset to 'us'.

My solution:

Open file manager.

Key in 'ctrl+h' to show '.hidden files'.

To '.profile' add this line (without quotes): 'setxkbmap de' (I used 'setxkbmap -layout gb').

I hope this helps.

This is a bug that keeps on cropping up in different releases or after kernel updates, so it seems to be one that's not getting fixed.

  • Sadly, won't help much in my case, as the wrong keyboard setting is already active on the login screen, where my .profile file hasn't been executed yet. – hez Aug 24 '16 at 14:00