Keyboard layout issue on X server

Hi,
I installed a fresh FreeBSD 13.2 and I installed the graphical interface with the desktop-installer script. But I have an issue with my keyboard layout on X.
I configured it like this:
Code:
/usr/local/etc/X11/xorg.conf.d/00-keyboard.conf

Section "InputClass"
        Identifier "Keyboard1"
        MatchIsKeyboard "on"
        Option "XkbLayout" "fr"
        Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection
But when X starts, it is still in US keyboard layout.

My login manager is XDM and my desktop environment is Lumina.

(On my previous installs, I used to install the graphical environment by myself and everything worked fine. It is the first time I used the script, maybe I missed something ^^')
 
Check /var/log/Xorg.0.log and see if your settings are actually getting applied.
 
I don't see anything in the log.
A similar issue was reported here on Wayland and I see that Lumina has the dependency. Could it be the same case?

EDIT:
I've read a multitude of fixes, from using xkb_layout (with _) to AutoAddDevices.

xorg.conf()
Each class can override settings from a
previous class, so it is best to arrange the sections with the most
generic matches first.
It is usually not necessary to provide InputDevice
sections in the xorg.conf if hotplugging is in use (i.e. AutoAddDevices
is enabled). If hotplugging is enabled, InputDevice sections using the
mouse, kbd and vmmouse driver will be ignored.

 
From Xorg.0.log, alias keyboard.txt.
Rich (BB code):
[  1013.044] (==) Using config directory: "/etc/X11/xorg.conf.d"
[  1013.044] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
/usr/local/etc/X11/xorg.conf.d/00-keyboard.conf
That config directory isn't used by Xorg. Why not?

I assume the directory, subdirectory names and filename extension of the configuration file are correct.

What happens when you copy the config file under /usr/local/share/X11/xorg.conf.d ?
 
xorg.conf()
Finally, configuration files will also be searched for in a directory
reserved for system use. This is to separate configuration files from
the vendor or 3rd party packages from those of local administration.
These files are found in the following directory:

/usr/local/share/X11/xorg.conf.d

Is it an exotic external USB keyboard?
 
Sorry to answer only now...
From Xorg.0.log, alias keyboard.txt.
Rich (BB code):
[  1013.044] (==) Using config directory: "/etc/X11/xorg.conf.d"
[  1013.044] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"

That config directory isn't used by Xorg. Why not?

I assume the directory, subdirectory names and filename extension of the configuration file are correct.

What happens when you copy the config file under /usr/local/share/X11/xorg.conf.d ?
Copying my .conf file in /usr/local/share/X11/xorg.conf.d fixed the problem. : )

And nope, it's not an exotic keyboard, just a standard AZERTY one.
 
I had a similar issue, and I solved it by adding this line
Code:
exec --no-startup-id "setxkbmap --layout no"
at the end of my configuration file for the windows manager (.config/i3/config).

Thanks, SirDice and T-Daemon, for pointing out that Xorg.0.log tells us which config files for Xorg actually get applied during start-up.

However, I am perplexed by the plethora of configuration files for the desktop enviroment.

  1. Shouldn't we put all config files for Xorg into /usr since /etc is reserved for the base system?
  2. If yes, do we really have to divide them between /usr/local/share/X11 and /usr/local/etc/X11? I mean, this is how sysutils/desktop-installer sets it up, but is it a bug, or is it a feature?
  3. Where exactly should the keyboard map be set? In Xorg through xorg.conf.d, or by setxkbmap when starting WM?
 
1. The skel of package places files in /etc for the sake of compatibility. See xorg.conf(). /usr is host specific. (FreeBSD way)
2. /usr/local/share is architecture independent (shared), I usually see configuration templates there. Use /usr/local/etc to configure your host.
3. Use xorg.conf.d for persistent configuration. setxkbmap is for the current user session although it can be applied at startup with xinitrc, for example.

Just my opinion.

hier()
 
Back
Top