Login into a TTY console fails due to wrong keyboad mapping: What to do?

When I try to login into a TTY console (like via CTRL+ALT+F3) or into the Recovery Console, then the password I enter there for that specific account appears to be always wrong.

The reason for this behavior is a wrong keyboard mapping for my keyboard which reflects the German alphabet. The keyboard mapping for inputs into TTY consoles and for the Recovery Console seems to be set to US keyboard settings. I can see that when I use the key on my keyboard that normally would create a specific character from within the German alphabet, but in fact this key generates a completely different character on the screen.

All other logins in my Desktop Environment (KDE) work, including all logins in virtual consoles.

This is the output of the localectl command in a virtual console:

[<User>@<Hostname>: /etc/default]$ localectl status
System Locale: LANG=de_DE.UTF-8
               LANGUAGE=de_DE:en:C:en_US
    VC Keymap: de
   X11 Layout: de
[<User>@<Hostname>: /etc/default]$ 

I cannot find out how to permanently change the keyboard mapping for TTY’s and the Recovery Console to a keyboard mapping corresponding to the keys on a keyboard for the German language.

Does anybody maybe have an idea?

I looked into all threads here in this forum which maybe could deal with the same problem which I have, but none of the other threads helped me to resolve the issue reported here by myself.

No, that specific character I need to enter on my German keyboard cannot be created by just doing a lot of try and error stuff on my keyboard :wink:

Change the layout globally. :point_down:

see what is here:
cat /etc/vconsole.conf

does it look like this?

KEYMAP=de-latin1-nodeadkeys
FONT=
FONT_MAP=

… edit that file, done.


You can also ensure to have that keymap in the initrd,
by putting at least the “keymap” HOOK in /etc/mkinitcpio.conf - possibly, if you set a font, also the “consolefont” HOOK
or
“sd-vconsole” instead.

mkinitcpio -P
grub-mkconfig -o /boot/grub/grub.cfg
or
update-grub

In my example, it’s just the keymap
the font is still the default

@Aragorn
would that GUI approach also be possible in Xfce4?
Not that I need it …

2 Likes

Thanks for your advice. I will try that in the corresponding KDE system setting dialog, but before applying this setting change, I will logout from here and be right back after a reboot :wink:

1 Like

This I do not know — I’m afraid I am not familiar with Xfce and its configuration dialogs. :man_shrugging:

O.k., thanks anyway.
There is an option that does look like it - I’ll try it some day.

2 Likes

Is this what you’re looking for?


… click the one where my mouse pointer is and see if this works. :wink:

Hi @Nachlese and @Aragorn ,

Now I successfully can login into a TTY console - Thanks a lot to the both of you :wink:

First I applied Aragorn’s advice which did not resolve the problem.

Then I read the advice by Nachlese, implemented it, applied a reboot, and now the issue is resolved.

I changed the content in the file /etc/vconsole.conf from

KEYMAP=de

to

KEYMAP=de-latin1-nodeadkeys
FONT=
FONT_MAP=

I checked the “Hooks” in the file /etc/mkinitcpio.conf - both were already present.

Then I created the initramfs file using the “mkinitcpio -P” command - its output said two times that the “consolefont” was missing in its configuration or so, so I searched all Manjaro packets for the string “consolefont”, but did not get any package name returned.

So I applied the “mkinitcpio -P” command, applied a reboot, and: problem solved :wink:

Thanks a lot. I will now go to bed.

AFAIK it’s not possible in any GUI.

However you can use localectl, which is a little easier and changes it immediately.

https://wiki.archlinux.org/title/Linux_console/Keyboard_configuration#Persistent_configuration

2 Likes

No extra package needed - the fonts are already there.

Linux console - ArchWiki

What you saw is not an error, just a consequence of telling the system to look for a “consolefont”
while you didn’t specify one.

The easy way around it is:

remove the “consolefont” HOOK - so the system won’t try to find one, while none is actually set
or
set a font
or
remove the last two lines

This is the only line you need:

KEYMAP=de-latin1-nodeadkeys

The font will then be the default - but the keymap will be correct.

4 Likes

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