Skip to main content
Topic: GDM doesn't respect my keyboard layout (Read 954 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

GDM doesn't respect my keyboard layout

I installed GDM today (the GNOME Display Manager/Login Screen) but it doesn't respect my keyboard layout (es).

I have it set to spanish in the xorg.conf.d/10-keyboard.conf file, the /etc/locale.conf and /etc/vconsole.conf yet GDM uses the US keyboard layout.

I tried searching on this forum but there was no other thread about this. I'm on Artix Runit, with no pending updates. This happened both in my hardware machine and a Virtualbox VM.

Re: GDM doesn't respect my keyboard layout

Reply #1
Try using

Code: [Select]
LANG=<your locale>
export LANG
in the beginning of the GDM starting script. There is quite a long thread in Russian subforum regarding sddm under openrc with similar issue and we finally figured out how to fix that.

The problem is, your locale settings are initialized after you log in, thus when your DM starts the locale could be not initialized yet. The above solution fixes that.

EDIT: well, this solution fixes the UI language, but it is not guaranteed that it'll fix the keyboard layout. But it is still worth trying.

EDIT2: also, try renaming /etc/X11/xorg.conf.d/10-keyboard.conf to 00-keyboard.conf

Re: GDM doesn't respect my keyboard layout

Reply #2
I installed GDM today (the GNOME Display Manager/Login Screen) but it doesn't respect my keyboard layout (es).

I have it set to spanish in the xorg.conf.d/10-keyboard.conf file, the /etc/locale.conf and /etc/vconsole.conf yet GDM uses the US keyboard layout.
In systemd, vconsole.conf is used to set keyboard layout in tty, as I use 66 I'm not sure if runit is customized to read it specifically. 66 does not use that file, and instead uses boot@system configuration.

/etc/vconsole.conf definitely doesn't have anything to do with X.Org in Artix.

Have you read Keyboard layout and Using X configuration files? If so, what's the contents of your /etc/X11/xorg.conf.d/10-keyboard.conf?

Re: GDM doesn't respect my keyboard layout

Reply #3
Try using

Code: [Select]
LANG=<your locale>
export LANG
in the beginning of the GDM starting script. There is quite a long thread in Russian subforum regarding sddm under openrc with similar issue and we finally figured out how to fix that.

The problem is, your locale settings are initialized after you log in, thus when your DM starts the locale could be not initialized yet. The above solution fixes that.

EDIT: well, this solution fixes the UI language, but it is not guaranteed that it'll fix the keyboard layout. But it is still worth trying.

EDIT2: also, try renaming /etc/X11/xorg.conf.d/10-keyboard.conf to 00-keyboard.conf


I tried setting this up and it didn't work. Calling setxkbmap didn't do the trick either.  :(

In systemd, vconsole.conf is used to set keyboard layout in tty, as I use 66 I'm not sure if runit is customized to read it specifically. 66 does not use that file, and instead uses boot@system configuration.

/etc/vconsole.conf definitely doesn't have anything to do with X.Org.

Have you read Keyboard layout and Using X configuration files? If so, what's the contents of your /etc/X11/xorg.conf.d/10-keyboard.conf?

I've read and applied both (except for the systemd-specific commands), without anything changing.

Re: GDM doesn't respect my keyboard layout

Reply #4
I've applied the fix and checked the troubleshooting steps. Both troubleshooting steps don't seem to apply, and the fix unfortunately didn't really do anything. It worked before, so I don't know what exactly changed.
Unfortunately, my testing seems to agree with this. GDM seems to not respect X.Org keyboard settings, contrary to that article. @Dudemanguy suggested to me that this is likely because of GDM running in XWayland instead of X.Org. But uncommenting the line
Code: [Select]
WaylandEnable=false
in /etc/gdm/custom.conf results in GDM being unable to start, with the errors
Code: [Select]
xf86OpenConsole: VT_ACTIVATE failed: Operation not permitted
xf86OpenConsole: Switching VT failed
in Xorg.0.log.

A bug on RedHat's bugzilla seems to suggest this is due to X.Org being run as non-root (this is done by GDM).

Also see this post on freebsd.org.

The solution from that article didn't work as well, since XWayland simply ignores all X.Org-related settings.

I suggest using an alternative like lightdm or sddm, if you really need a DM, or simply using a "Autostart X at login" no-DM setup otherwise.