Subject: bug#37428: Keyboard layout setting fails when no keyboard is attached

From: dario <[email-masked]>
Date: Mon, 16 Sep 2019 17:32:31 +0200

I have Guix system installed on a Laptop/Tablet hybrid that allows
detaching the keyboard. In my system configuration, I set the keyboard
layout to the German QWERTZ using

(operating-system
...
 (keyboard-layout
  (keyboard-layout "de" "nodeadkeys"))
 (bootloader
  (bootloader-configuration
   (bootloader grub-efi-bootloader)
   (target "/boot/efi")
   (keyboard-layout keyboard-layout)))
...
 (services
  (append
   (list ...
         (set-xorg-configuration
          (xorg-configuration
           (keyboard-layout keyboard-layout)
           ...
   %desktop-services))))))

When the keyboard is attached, the keyboard layout is set correctly in
the TTY and in the graphical session. However, without the keyboard
attached, even when an external USB-keyboard is attached, the keyboard
layout is only set correctly in the TTY, but in the graphical session,
the default QWERTY layout is set.

This issue is obviously very easy to work around by either attaching the
keyboard or using setxkbmap, but the behaviour seems strange enough to
warrant reporting.

Best regards,
Dario