DM ignores keyboard language

Basicly no Displaymanager besides gdm honors my localized keymap(DE).

The keymap is correctly set:


localectl
   System Locale: LC_CTYPE=de_DE.UTF-8
       VC Keymap: de
      X11 Layout: de
       X11 Model: pc105
     X11 Options: terminate:ctrl_alt_bksp

Also the keymap correctly applies on the console, aswell as in some enviroments(some inherit the wrong US keymap, but show they run the correct one, some run the correct one). This is NOT a opensuse issue but affects every distribution from arch, debian, gentoo to opensuse. The underlying issue is the fact that my keyboard is connected via a logitech unifying receiver which has its own broken kernelmodule(they worked fine pre kernel 3.2). As far as i understood it they create some kind of weird virtual keyboard/mouse pointer thingy that disregards the first time you try to set it … or something. What i know is the workaround to fix it:


$ setxkbmap -layout de -variant nodeadkeys

Execute that at any time and the keyboard is fixed to the right locale. Now i have 2 issues i would like your help with:

  1. How do i properly add that in a way it gets executed by any displaymanager after it has started, but before i try to enter my password(it doesn’t take if run to early)? Im looking for a clean way that doesn’t get overwritten by updates or yast.
  2. Can we get that fixed somehow? Atleast within opensuse? I mean that issue has been around for years, and apparently upstream doesn’t care.

Honestly this is bothering me greatly, is made worse because its an issue you can’t easily google for unless you know your logitech unifying receiver is the issue, if you just search for keyboard or locale issues you will find hundreds of helpful tipps and walkthroughs on how to setup your locale or keymap properly which won’t help you at all since its basicly a kernel driver issue.

Source on fix:
https://wiki.archlinux.org/index.php/Logitech_Unifying_Receiver#Keyboard_layout_via_xorg.conf

Call it in /etc/X11/xdm/Xsetup.
Depending on which DM you use, it might be possible to override that file’s location in its settings. E.g. sddm has an option “DisplayCommand” to specify a script to be run instead of /etc/X11/xdm/Xsetup in /etc/sddm.conf.

  1. Can we get that fixed somehow? Atleast within opensuse? I mean that issue has been around for years, and apparently upstream doesn’t care.

Well, somebody with the appropriate knowledge has to be able to reproduce and fix it.
E.g. I can’t (both).

Obviously, it’s preferable if upstream fixes a problem (especially if it’s not restricted to some distribution), but you might also try to file a bug report at http://bugzilla.opensuse.org/ (same username/password as here).

But first check that you have a file /etc/X11/xorg.conf.d/00-keyboard.conf with the appropriate settings.
Changing the XkbModel might help, that did work for other users with similar problems IIRC.
Maybe setting MatchIsKeyboard to “off” might be worth a try too, according to your problem description. But that’s just guessing…

IIUIC it is the hid_logiteck_dj kernel module that causes the problem, you you could try blacklisting it by creating a file in /etc/modprobe.d/ with this content:

blacklist hid_logitech_dj

Im wary of messing with xorg config files because i “only” have the problem with the displaymanager. Its trivial after all to set a setxkbmap as a starting application to run in any DE. Less trivial for a DM and downright hard(impossible?) for lvm passphrases etc. Also im a little bit attached to functionality of my keyboard like volume keys etc.

Anyway here are some bugreports already filed for it:

https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/995715https://bugs.freedesktop.org/show_bug.cgi?id=49950
https://bugs.freedesktop.org/show_bug.cgi?id=92897
https://bugs.freedesktop.org/show_bug.cgi?id=92896

Its a known issue since 2012, and thats how long i have the issue. Noticed it right when i first run a distro with kernel 3.2. Im just … tired. It has been 4 years, its not just affecting logitech devices. I lack the expertise but it has been very concisely explained what EXACTLY the issue is and patches have been posted and tested in the links above. Im sure upstream has a very good reason for ignoring this(designlimitation apparently), but its working on GDM, without a fault even. Its just a matter of figuring out what kind of workaround they used and applying it to other DMs, which unfortunatly is far beyond my skills.

It doesn’t help that some workaround apparently are distrospecific. opensuse for example has no /etc/lightdm/lightdm.conf file and seems to ignore it when i add it.

I will try the file you mentioned, but this issue WILL affect others, and they won’t know to come to look here. Frankly this means that Fedora and Ubuntu work out of the box with logitech wireless, while opensuse does not(unless running gnome). Im very sure the fedora or redhat guys and gals fixed this for GDM, but how would one go about tracking that fix down?

Edit: Neither Xsetup nor lightdm.conf files are honored. Considering just switching to gdm.

But the xorg config is the place for the system-wide keyboard configuration.
Your desktop environment might override it anyway though, GNOME (and GDM) does AFAIK, and KDE can be configured to do so.

If you’re talking about Xsetup, well you asked how to run setxbmap automatically on the login screen, that file is the place for something like this.

Its trivial after all to set a setxkbmap as a starting application to run in any DE.

And it’s even more trivial to just configure the keyboard to your likings in the DE’s settings.

GNOME overrides the Xorg settings in any case AFAIK, KDE by default inherits and only overrides them if you explicitly configure the keyboard in KDE’s “Configure Desktop” (systemsettings5).

Explicitly calling setxkbmap on the login screen (or when logging in) is just a workaround at best though IMHO, and not even necessary in most cases.
For me the problem is at a lower level and should be fixed there, not via a workaround in all DMs or DEs.

Im sure upstream has a very good reason for ignoring this(designlimitation apparently), but its working on GDM, without a fault even.

As I wote above GDM has its own keyboard settings, and ignores the xorg config.
IOW, it explicitly runs setxkbmap or something to that effect.

Other DMs don’t, and just inherit the Xorg settings.

It doesn’t help that some workaround apparently are distrospecific. opensuse for example has no /etc/lightdm/lightdm.conf file and seems to ignore it when i add it.

I’m not sure about lightdm as I don’t use it, but it does have a config file somewhere.
It might look for it in /etc/xdg/lightdm/ though.

The included example config file (/usr/share/doc/packages/lightdm/lightdm.example.conf) does mention an option to specify a “greeter-setup-file”.

I will try the file you mentioned, but this issue WILL affect others, and they won’t know to come to look here.

Yes, but you did come here and asked.
I’m just replying, and trying to help you.

Frankly this means that Fedora and Ubuntu work out of the box with logitech wireless, while opensuse does not(unless running gnome).

GNOME is an officially supported option in openSUSE as well, and I doubt it works in Ubuntu or Fedora when not running GNOME (or GDM) after what you wrote.

And I’m not sure what you want from us here.
This is a user forum, your fellow users are trying to help you with problems.

If you want this to be fixed, file a bug report.
As there already are some at freedesktop.org (i.e. upstream), you might try openSUSE’s bugzilla as well.
As you apparently have a good idea what’s wrong, openSUSE’s Xorg (or kernel) developers might even come up with a fix.

PS: openSUSE’s lightdm package does contain a file named 50-suse-defaults.conf (installed to /usr/share/lightdm/lightdm.conf.d/) that does set “greeter-setup-script=/etc/X11/xdm/Xsetup”, so it should actually run /etc/X11/xdm/Xsetup. (unless you override it somewhere…)

I appreciate your help, part of the reason im doing this in the hopes that in the future if people affected by this google “opensuse displaymanager wrong language” or something they will find this and have a readymade solution for their issue.

The problem is, most of the advice on keyboard issues does NOT help in this case. For example setting a language configuration in a DE doesn’t. The DE will THINK it applies, and show so in its configuration dialog, yet it will be the US setting active. You have to pick a different keyboard language, and then switch back to your desired one, every time you reboot.

Executing “setxkbmap xy” WILL help, using “localectl set-x11keymap xy” will NOT help. Changing languages in yast won’t help either etcpp. For the uninniated its a confusing issue at best.

For the record calling setxkbmap via the Xsetup file did NOT work, i do not know why. Settings in /etc/X11/xorg.conf.d/00-keyboard.conf do not help either. It doesn’t help that the DM fails silently, there is no error message in the log about being unable to switch keyboard mapping or somesuch.

As of this time the best/easiest workaround appears to be using gdm. As for the bugreport, i don’t want to waste peoples time. Having looked at the issue a bit since my first post it appears to be a complicated issue that upstream is well aware of, even the kernel module responsible is apparently going to be phased out in the future.

Also sadly my understanding of the issue isn’t as good as it appears, i can describe the circumstances of when, where and how it appears, but you need specific hardware to reproduce it. Im not at all clear of wether its a xorg, kernel or DM issue.