Solved Lost keymap after login

Hi

After I log in, my keyboard layout changes to US from Finnish. Layout seems to be OK before login.

Code:
Section "InputDevice"
  Identifier  "Keyboard0"
  Driver  "kbd"
  Option "XkbModel"  "pc105"
  Option "XkbLayout"  "fi"  
EndSection
Code:
$ cat /var/log/Xorg.0.log | grep kbd
[  242.275] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[  245.346] (II) LoadModule: "kbd"
[  245.346] (II) Loading /usr/local/lib/xorg/modules/input/kbd_drv.so
[  245.354] (II) Module kbd: vendor="X.Org Foundation"
[  245.354] (II) Using input driver 'kbd' for 'USB KEYBOARD'
[  245.361] (II) Using input driver 'kbd' for 'AT Keyboard'
[  245.361] (**) Option "config_info" "hal:/org/freedesktop/Hal/devices/atkbd_0"
[  256.785] (II) UnloadModule: "kbd"
[  256.785] (II) UnloadModule: "kbd"
Code:
$ cat /var/log/Xorg.0.log | grep Keyboard
[  242.227] (**) |-->Input Device "Keyboard0"
[  242.275] (WW) Disabling Keyboard0
[  245.361] (II) config/hal: Adding input device AT Keyboard
[  245.361] (II) Using input driver 'kbd' for 'AT Keyboard'
[  245.361] (**) AT Keyboard: always reports core events
[  245.361] (**) AT Keyboard: always reports core events
[  245.361] (II) XINPUT: Adding extended input device "AT Keyboard" (type: KEYBOARD, id 8)
Code:
$ cat /var/log/Xorg.0.log | grep Layout
[  242.223] (==) ServerLayout "Multihead"
[  245.354] (**) Option "XkbLayout" "us"
[  245.361] (**) Option "XkbLayout" "us"

I tried to put this in my xorg.conf, but it wouldn't fix it:

Code:
Section "ServerFlags"
    Option "AutoAddDevices" "Off"
EndSection

I have xorg-minimal installed. Is there something I need to install separately?
 
Remove the ServerFlags section and try with:
Code:
Section "InputClass"
  Identifier "system-keyboard"
  MatchIsKeyboard "on"
  Option "XkbLayout" "fi"
EndSection
 
Remove the ServerFlags section and try with:
Code:
Section "InputClass"
  Identifier "system-keyboard"
  MatchIsKeyboard "on"
  Option "XkbLayout" "fi"
EndSection
Thanks, but it didn't help me.

The layout seems to be okay, but there are few Scandinavian letters that won't work. I checked rc.conf and
Code:
keymap="fi"
was there, so it should be okay. Maybe I need to install some missing packages or the Finnish keymap is just broken? My keyboard is a basic USB keyboard, so the option pc-105 should work fine.
 
Sorry, my knowledge does not go further… :( Nevertheless, if the layout seems okay, there is maybe a problem with the font itself, which lacks the Scandinavian glyphs, have you tried changing fonts? Or exploring the XkbVariant option in xorg.conf?
 
I'm wondering how you would know the pre-login keyboard layout unless you manually start X.

Anyway, experience has told me that one shouldn't fix those issues in xorg.conf but rather in .xinitrc (or .xsession, depending on how one starts X).

What you want is probably a line like this
Code:
setxkbmap -model  pc105 -layout "fi"

for a Finnish keyboard.

P.S. A friendly thank you to the Mods and Admins who so friendly and patiently correct my/our occasional sins against the formatting rules here. Thank you! :)
 
I removed xorg.conf, same fault still exists. I need to get keyboard working in the shell, before working with X. I'm going to try those pieces of advice tomorrow, thanks!
 
I found the solution. Just put
Code:
setenv LANG fi_FI.UTF-8
or
Code:
export LC_ALL=fi_FI.UTF-8
in .login, depending on what shell is used.

Edit: maybe
Code:
setenv LC_CTYPE fi_FI.UTF-8
is a better choice if you still want to use English.
 
Back
Top