You are not logged in.

#1 2015-05-07 18:36:06

alcinos
Member
Registered: 2015-05-07
Posts: 11

Unable to stabilize keymap

Hi everyone,

I'm getting a strange behavior with my keymaps. In the console, I've set it (through mkinitcpio hooks) to bepo-latin9, and it works just fine.

However, I don't manage to configure it properly for Xorg. I've edited both my .xinitrc :

setxkbmap fr bepo
exec gnome-session
setxkbmap fr bepo

and my /etc/X11/xorg.conf.d/10-keyboard-layout.conf :

Section "InputClass"
       Identifier             "keyboard Layout"
       MatchIsKeyboard        "on"
       Option "XkbLayout"     "fr"
       Option "XkbVariant"    "bepo"
       Option "XkbOptions"    "grp:shifts_toggle"
EndSection

But when I startx, I'm always defaulted to a azerty layout… After that, there is no problem to change the layout using setxkbmap fr bepo:

$ setxkbmap fr bepo
$ setxkbmap -query
rules:      evdev
model:      pc104
layout:     fr
variant:    bepo

But then, whenever I switch to another tty, even if I don't log at all, when I switch back to the tty where the x session is started, the keymap is reset to default:

$ setxkbmap -query
rules:      evdev
model:      pc104
layout:     fr,us,fr
variant:    ,,oss

I really don't get how the tty switchin can affect the keymap at all… Any thoughts ?

Thanks in advance

Offline

#2 2015-05-07 18:55:49

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Unable to stabilize keymap

What is the output of:

localectl

Offline

#3 2015-05-07 18:59:48

alcinos
Member
Registered: 2015-05-07
Posts: 11

Re: Unable to stabilize keymap

Here it is

$ localectl
   System Locale: LANG=fr_FR.UTF-8
       VC Keymap: n/a
      X11 Layout: n/a

Offline

#4 2015-05-07 19:06:57

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Unable to stabilize keymap

Try this:

localectl --no-convert set-X11-keymap fr,bepo,grp:shifts_toggle

https://wiki.archlinux.org/index.php/Ke … _localectl

Offline

#5 2015-05-07 19:47:12

alcinos
Member
Registered: 2015-05-07
Posts: 11

Re: Unable to stabilize keymap

When I execute the command, everything seems to work as expected:

$ localectl --no-convert set-x11-keymap fr,bepo,grp:shifts_toggle
$ localectl                                                      
   System Locale: LANG=fr_FR.UTF-8
       VC Keymap: n/a
      X11 Layout: fr,bepo,grp:shifts_toggle
$ setxkbmap -query                                               
rules:      evdev
model:      pc104
layout:     fr
variant:    bepo
$ cat /etc/X11/xorg.conf.d/00-keyboard.conf 
# Read and parsed by systemd-localed. It's probably wise not to edit this file
# manually too freely.
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "fr,bepo,grp:shifts_toggle"
EndSection

But as soon as I restart x, the keymap is messed up again (even though the localectl settings persists)

$ localectl
   System Locale: LANG=fr_FR.UTF-8
       VC Keymap: n/a
      X11 Layout: fr,bepo,grp:shifts_toggle
$ setxkbmap -query
rules:      evdev
model:      pc104
layout:     fr,us,fr
variant:    ,,oss

Offline

#6 2015-05-07 19:53:10

paneless
Member
Registered: 2013-02-21
Posts: 27

Re: Unable to stabilize keymap

Hi, your .xinitrc file should read:

setxkbmap fr bepo &
exec gnome-session

Note the '&' after the setxkbmap command. Do not put one after the exec gnome session and no commands after this will be executed anyway.
Hope this helps.

Offline

#7 2015-05-07 19:56:16

alcinos
Member
Registered: 2015-05-07
Posts: 11

Re: Unable to stabilize keymap

I just tried this modification and it didn't work either.

Offline

#8 2015-05-07 20:06:40

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Unable to stabilize keymap

Do you have another keyboard configuration file in /usr/share/X11/xorg.conf.d?

If so, (re)move it.

Offline

#9 2015-05-07 20:10:11

alcinos
Member
Registered: 2015-05-07
Posts: 11

Re: Unable to stabilize keymap

I only have three conf file in xorg.conf.d:

$ ls /etc/X11/xorg.conf.d 
00-keyboard.conf  10-keyboard-layout.conf  90-monitor.conf

The first one is the one automatically generated by localectl, the second one is the one I showed in the first post and the last one contains nothing keyboard related.

Offline

#10 2015-05-07 20:15:51

paneless
Member
Registered: 2013-02-21
Posts: 27

Re: Unable to stabilize keymap

Are KEYMAP and FONT set in /etc/vconsole.conf ?

Offline

#11 2015-05-07 20:16:48

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Unable to stabilize keymap

alcinos wrote:

I only have three conf file in xorg.conf.d:

$ ls /etc/X11/xorg.conf.d 
00-keyboard.conf  10-keyboard-layout.conf  90-monitor.conf

The first one is the one automatically generated by localectl, the second one is the one I showed in the first post and the last one contains nothing keyboard related.

Read my post again -- carefully.

You are looking in the wrong place...

EDIT: Also, delete the 10-keyboard-layout.conf -- you shouldn't need it.

Last edited by Head_on_a_Stick (2015-05-07 20:18:29)

Offline

#12 2015-05-07 20:25:10

alcinos
Member
Registered: 2015-05-07
Posts: 11

Re: Unable to stabilize keymap

paneless wrote:

Are KEYMAP and FONT set in /etc/vconsole.conf ?

Here's the content of /etc/vconsole.conf:

$ cat /etc/vconsole.conf 
FONT=ter-g32b
Head_on_a_Stick wrote:

Read my post again -- carefully.

You are looking in the wrong place...

Ooups, read a bit fast indeed. Here is the correct listing :

$ ls /usr/share/X11/xorg.conf.d 
10-evdev.conf  10-quirks.conf  50-synaptics.conf  nvidia-drm-outputclass.conf

The first one mentions a bit of keyboard conf, but no keymap :

$ cat /usr/share/X11/xorg.conf.d/10-evdev.conf  
#
# Catch-all evdev loader for udev-based systems
# We don't simply match on any device since that also adds accelerometers
# and other devices that we don't really want to use. The list below
# matches everything but joysticks.

Section "InputClass"
        Identifier "evdev pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

Section "InputClass"
        Identifier "evdev keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

Section "InputClass"
        Identifier "evdev touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

Section "InputClass"
        Identifier "evdev tablet catchall"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

Section "InputClass"
        Identifier "evdev touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

Do you think it might be the source of the interference?

EDIT: just deleted the superfluous file as you suggested, but it didn't change anything

Last edited by alcinos (2015-05-07 20:28:21)

Offline

#13 2015-05-07 20:31:38

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Unable to stabilize keymap

alcinos wrote:

Do you think it might be the source of the interference?

No, do not delete that file.

I'm stumped here, sorry.

One last roll of the dice: remove the `setxkbmap` commands from your .xinitrc and add this stanza to the start of the file (before `exec gnome-session`):

#!/bin/sh
if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

Then run the `localectl` command again and reboot.

Offline

#14 2015-05-07 20:41:18

paneless
Member
Registered: 2013-02-21
Posts: 27

Re: Unable to stabilize keymap

Also add KEYMAP=fr to  /etc/vconsole.conf and reboot.

Offline

#15 2015-05-07 21:47:15

alcinos
Member
Registered: 2015-05-07
Posts: 11

Re: Unable to stabilize keymap

Head_on_a_Stick wrote:
alcinos wrote:

Do you think it might be the source of the interference?

No, do not delete that file.

I'm stumped here, sorry.

One last roll of the dice: remove the `setxkbmap` commands from your .xinitrc and add this stanza to the start of the file (before `exec gnome-session`):

#!/bin/sh
if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

Then run the `localectl` command again and reboot.

Well I'm afraid it didn't change anything…
However, we seem to be looking at issues affecting the init phase of the Xorg server, but maybe the problem isn't here. The oddest thing is the problem of keymap switch when I switch to a tty and back to the server. Is there anything else that could interfere in the keymap configuration?

@paneless: adding this line doesn't change anything to what I get.

Offline

#16 2015-05-07 21:59:48

paneless
Member
Registered: 2013-02-21
Posts: 27

Re: Unable to stabilize keymap

Ok Alcinos, can you first confirm that you installed as per the Arch wiki installation guide. If so, was your .xinitrc copied from/etc/X11/xinit/xinitrc? Have you commented out the  non applicable 'exec' commands? Sorry lots of questions but...

Last edited by paneless (2015-05-07 22:01:01)

Offline

#17 2015-05-07 22:19:45

alcinos
Member
Registered: 2015-05-07
Posts: 11

Re: Unable to stabilize keymap

Well I mostly followed  the installation guide, but with some variations (most notably, I use a  fully encypted setting).
My xinitrc now contains only the "exec gnome session" line plus the lines Head_on_a_Stick advised me to and.

Offline

Board footer

Powered by FluxBB