Getting GDM to Remember Colemak Layout

Hello, I’m a longtime Linux user who got a little interested in using openSUSE again for the first time in a couple years. However, after recently installing openSUSE Tumbleweed with GNOME, I’m having one inconvenient issue that I haven’t experienced on other distros: I’m a Colemak user, but I can’t get GDM to honor the keyboard layout upon a cold boot.

I’ve tried changing the layout to Colemak within GNOME, but it’s still just QWERTY on a cold boot. However, after logging in, it’s in Colemak as I want it to be.

The things I’ve tried so far include editing /etc/X11/xorg.conf.d/00-keyboard.conf to have the following:

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us"
        Option "XkbVariant" "colemak"
EndSection

The frustrating part is that this worked on both my Arch and Fedora installations in the past (I double checked this), yet it doesn’t affect GDM on openSUSE. It’s frustrating because I already tried changing my display manager to lightdm-slick-greeter and it picked up Colemak just fine. I would just keep using that instead as a workaround, except for the fact that I use this current openSUSE install on a laptop and would strongly appreciate being able to lock my screen within GNOME, as I need GDM enabled to screen lock on GNOME.

I’ve tried several localectl commands, including the following:

localectl --no-convert set-keymap us-colemak

localectl --no-convert set-keymap colemak

localectl --no-convert set-x11-keymap colemak

localectl --no-convert set-x11-keymap us-colemak

localectl set-x11-keymap us,us "" colemak

localectl set-x11-keymap us,us colemak ""

localectl set-keymap us-colemak,us

localectl set-x11-keymap us-colemak,us

localectl set-keymap us-colemak

localectl set-x11-keymap us-colemak

localectl set-keymap colemak

I’m not really sure what to do next, although I’m fairly certain that the localectl commands simply edit the aforementioned file with whatever I enter into them. Although I do find it worth mentioning that Colemak is not selectable during initial openSUSE setup and installation. Dvorak was present, but Colemak was nowhere to be seen. I felt the need to mention this in case this was part of something I hadn’t accounted for.

I also tried going into GNOME’s settings and, aside from setting Colemak as my default within the Keyboard settings, I went into “Region & Language” and tried changing settings there. However, only “US English” shows up without any keyboard variants being selectable.

I don’t really know what to do next from here and only asked as an absolute last resort, as I do really like what openSUSE does and want to have the chance to continue using it without inconvenience. I also really like GNOME and would prefer to continue using it, as I had a few issues here and there with KDE and Tumbleweed on my last openSUSE install a good while back. If anybody has additional suggestions on anything I haven’t tried yet, it would be greatly appreciated.

Does your GDM use X11 or Wayland?

Thank you for your response.

I checked just now and I initially thought that GDM was using Wayland. I did this a short while ago by checking /etc/gdm/custom.conf and finding out that the variable WaylandEnable=false was commented out.

I thought uncommenting this was going to fix things, but upon boot, GDM refused to start and I was in a tty. From here, I reverted changes, rebooted again, and GDM worked once more, though I’m still in QWERTY.

However, the aforementioned file says that settings from /etc/sysconfig/displaymanager/ have a higher priority. I decided to double check that, but at the bottom of this file, I have a variable reading DISPLAYMANAGER_XSERVER="Xorg", so now I’m not 100% certain what I’m running on GDM.

EDIT: Additionally, for what it’s worth, the tty picked up on my Colemak layout.

This doesn’t directly answer your question, but have you considered using some other login method that has preference over password?

For example, I have mine configured to ask for a FIDO2/U2F key and only if it fails to fallback to password. Similarly you could use a fingerprint reader, smart card, etc.

This setting does not exist in the current xdm package sources, it must be leftover from past versions (the files in /etc/sysconfig are never overwritten, only new setings are added on update).

On GDM screen switch to console, check with ps -ef whether you have X server running.

1 Like

Perhaps I can try this as a last resort, but I’m still more interested in resolving this matter first. I had the fingerprint reader working on my Fedora installation on this same laptop, but the only drawback was I could use it to login on boot, yet it would still nag me to enter my password anyway right when I got to the desktop because of my keyring not unlocking with the fingerprint.

I commented out the variable that shouldn’t be there, and everything still boots into GDM just fine. Still, no changes to the keyboard layout.

I did as you suggested on GDM by switching into tty and entering in ps -ef | grep "wayland". Three Wayland processes surfaced, so I think I am in Wayland upon starting GDM.

I said “check for X server”. I have no idea what grepping for “wayland” indicates. Provide full output of ps -efww (upload to https://paste.opensuse.org/ if it is too long).

My apologies. I misunderstood what you indicated by this. I have since gone back and saved the output from ps -efww and have it here: openSUSE Paste

I appreciate your attempts to help me troubleshoot this. Thank you for your continued patience.

You’re on Wayland:

gdm       4182  4116  0 05:47 tty7     00:00:00 /usr/libexec/gdm/gdm-wayland-session dbus-run-session -- gnome-session --autostart /usr/share/gdm/greeter/autostart
1 Like

As mentioned, GDM greeter is using Wayland so any X server configuration does not apply. I cannot check right now, will look later today or tomorrow what can be done here.

OTOH it is strange that GDM fails to start under X server (or may be failed to start X server). Xorg.log from failed attempt would certainly be useful.

1 Like

No idea whether this helps, but worth a try I guess:

localectl list-keymaps | grep -i colemak

This gives on my TW:

knurpht@Lenovo-P16:/etc/default> localectl list-keymaps | grep -i colemak
gb-colemak
gb-colemak_dh
latam-colemak
no-colemak
no-colemak_dh
no-colemak_dh_wide
ph-colemak
us-colemak
us-colemak_dh
us-colemak_dh_iso
us-colemak_dh_ortho
us-colemak_dh_wide
us-colemak_dh_wide_iso
knurpht@Lenovo-P16:>

To select one f.e. us-colemak do
loadkeys us-colemak
and test it. If it works, edit /etc/vconsole.conf and change that accordingly. AFAICS from various posts on other distros this should do the job. No way to test though.

1 Like

That is what localectl set-keymap does.

1 Like

Thank you for a prompt and clear response.

I decided to look into /etc/vconsole.conf beforehand and found out that it already said this:

KEYMAP=us-colemak
FONT=eurlatgr.psfu
FONT_MAP=
FONT_UNIMAP=
XKBLAYOUT=us-colemak

So in other words, it’s already trying to load it? I’m a little confused on why GDM is the only place it doesn’t seem to detect. As I had mentioned beforehand, even my tty detects Colemak just fine.

I’ll have a little more time later today to try and see if xorg works. I’ll update later when I have the chance.

I tested on Tumbleweed with GNOME (gdm) and after localectl set-keymap de keyboard layout in gdm immediately switched to German even without need to restart it. It was also persistent after reboot. Of course it also means that the same keyboard will be used on text mode console. Which may or may not be appropriate.

It may also be possible to set session properties (the same as configured by GNOME Control Center) for gdm user. Then it could be different from text console.

2 Likes

I’m absolutely astonished, but after feeling like I could have sworn I tried it along with so many other similar-looking commands (as evidenced by my first post), I decided to try localectl set-keymap us-colemak to see what would happen.

To my amazement, my issue is finally solved! I can finally login to GDM with Colemak even after a reboot. Just to confirm if I was going crazy, I decided to check /etc/vconsole.conf one last time and noticed a small change.

KEYMAP=us-colemak
FONT=eurlatgr.psfu
FONT_MAP=
FONT_UNIMAP=
XKBLAYOUT=us
XKBMODEL=microsoftpro
XKBVARIANT=colemak
XKBOPTIONS=terminate:ctrl_alt_bksp

Previously, there were no variables for XBKMODEL or XKBOPTIONS, so I’m under the impression that this minor change fixed everything. I’m still a bit puzzled, as I did enter this localectl command prior and even had it in my bash history, so I’m not sure why it didn’t fix my issue sooner.

Needless to say, I would like to extend a sincere thanks for all of your help and patience. I’m glad I can use GNOME on openSUSE exactly as intended now.

EDIT: Is there a way for me to mark this as a solved issue? I’m trying to find an option to do that in case anybody out there stumbles into this specific issue in the future.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.