x11-base/xorg-server fails to set keyboard layout of keyboard-touchpad-combos. The problem lies with the difference between kernel and xorg to interpret these devices. The bug surfaced with linux 3.2, possibly with kernel commit 534a7b8e1. It changes the way Logitech Unifying devices are treated. Those are wireless Keyboards, Mouses and also Keyboard+Touchpad combo that share a common USB to radio dongle (a so called "Unifying Receiver"). Since that time wireless keyboards paired to a Logitech Unifying USB Receiver is attached to the "Virtual core pointer" and not to the "Virtual core keyboard" as shown in the description of bug #46008 (https://bugs.freedesktop.org/show_bug.cgi?id=46008). That's because the kernel HID driver now reports all kinds of relatives axes and buttons for those keyboards that may not physically exist. So this affects all Keyboard-touchpad-combos wich the kernel and configures as a single "Virtual core pointer" event-device (as is with hid-logitech-dj). See bug #49950 (https://bugs.freedesktop.org/show_bug.cgi?id=49950) The problem is that Xorg sets the correct keyboard layout with its event system only at a time a key is pressed on the keyboard. When keyboard is seen as Virtual core pointer these events do not get generated. If another Virtual core keyboard is attached to the machine even a single key press is sufficient to set the correct layout which after the combo-keyboard will also use that layout. People are struggling to set the correct layout in xorg.conf.d/10-evdev.conf not realizing they have found a true bug in xorg. (https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/995715) This is an upstream bug and should be fixed in xorg-server. In the mean time here is a patch from bug #49950 to fix the issue. Tested on 1.14.3 and 1.15.0 amd64 gentoo linux. And also ebuilds.
Created attachment 371746 [details, diff] Patch xorg-server event to support combo-keyboards Tested on x11-base/xorg-server-1.14.3 & 1.15.0 Changes xorg-servers event system to send events for slave-keyboards.
Created attachment 371748 [details] Ebuild for the patch x11-base/xorg-server-1.15.0
Created attachment 371750 [details] Ebuild for the patch x11-base/xorg-server-1.14.3
The upstream bug result is libinput: fixed evdev: wontfix Switch to libinput, it's the new default.