Welcome to awesome bug tracking system.

FS#1077 - Using english keyboard layout instead of Xorg's config. awesome.restart() fixes it.

Attached to Project: awesome
Opened by Pierre Neidhardt (ambrevar) - Thursday, 03 January 2013, 12:59 GMT
Last edited by Uli Schlachter (psychon) - Monday, 11 February 2013, 14:49 GMT
Task Type Bug Report
Category Core
Status Closed
Assigned To No-one
Operating System Linux
Severity High
Priority Normal
Reported Version git/3.5
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No


Keyboard layout was OK on 3.4.
For 3.5 and git version, Awesome defaults to english layout. Calling awesome.restart() (e.g. with SUPER+SHIFT+R) will correctly set the layout according to Xorg config. That's quite annoying indeed.

Only Awesome is affected, i.e. all other applications will use the Xorg config. So basically the affected parts are
* key bindings
* Run command
* Run lua code

Using Arch Linux x86_64, Xorg 1.13, blank user session, startx and 'exec awesome' as the sole command.
This task depends upon

Closed by  Uli Schlachter (psychon)
Monday, 11 February 2013, 14:49 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in master and 3.4.15.
Comment by Uli Schlachter (psychon) - Thursday, 03 January 2013, 18:04 GMT
How/when/where do you change your keyboard layout? Could this be "keyboard layout changes are ignored after startup"?
Comment by Pierre Neidhardt (ambrevar) - Thursday, 03 January 2013, 21:47 GMT
The only place where I changed my keyboard layout is in the Xorg config: /etc/X11/xorg.conf.d/10-evdev.conf

Section "InputClass"
Identifier "evdev keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbLayout" "fr"
Comment by Oscar Trujillo (oscardt19) - Sunday, 06 January 2013, 04:02 GMT
I have the same problem, but I do the keyboard config in /etc/X11/xorg.conf.d/10-keyboard.conf
Section "InputClass"
Identifier "Keyboard Defaults"
MatchIsKeyboard "on"
Option "XkbLayout" "latam"

At the moment, is the only program that is working wrong
Comment by Asbjørn Nilsen Riseth (luser32) - Sunday, 06 January 2013, 13:26 GMT
Same problem here. Keyboard config in /etc/X11/xorg.conf.
Comment by Alexander Hirsch (z33ky) - Sunday, 06 January 2013, 17:11 GMT
The last version where it worked correctly is v3.4-768-ged9f218.
Comment by Pierre Neidhardt (ambrevar) - Monday, 07 January 2013, 11:27 GMT
Someone made me notice that it works when using a login manager. I tried with LXDM and it works!
Anyway that's not a workaround properly speaking since I do not need/want to use a login manager.
Comment by Alex (lynix) - Saturday, 26 January 2013, 09:14 GMT
I'm using LightDM on Arch Linux x64, and the wrong layout problem nevertheless...
Comment by Alex (lynix) - Tuesday, 29 January 2013, 08:17 GMT
No progress on this?

I tested the following login managers: lightdm, lxdm, gdm, slim and gdm-old (2.20).
No luck with any of these, so I suspect it is no login-manager related problem.
Comment by Pierre Neidhardt (ambrevar) - Tuesday, 29 January 2013, 11:41 GMT
Strange, I just tested with
* lxdm 0.4.1
* systemd 197
* xorg 1.13
on Arch Linux x64, and it still works for me.

I do not know why it does not work for you.

However that it works with Login Managers makes sense to me : if you init Xorg with anything else but awesome, keyboard layout gets set properly. My guess is the following : this may be a sync problem. Xorg and awesome are actually starting at the same time, and Xorg config may be out of sync for Awesome.

I really do not know much about X programming however...
Comment by anrxc (anrxc) - Friday, 01 February 2013, 21:16 GMT
Attaching psychon's patch for v3.4.14 from the mailing list.
Comment by Uli Schlachter (psychon) - Friday, 01 February 2013, 22:09 GMT
Just committed this to git (both 3.4 and master), could some people test if this fixes this bug, please?

commit 03759b48478eb716af8b62e01ef3b5140c582f58
Author: Uli Schlachter <>
Date: Fri Feb 1 23:06:08 2013 +0100

Fix keyboard layouts

Commit 08ca70c00d06c6 added support for Xlib cursor themes by making awesome use
Xlib for its X11 connection and for setting cursor icons. Everything else was
still done through xcb.

However, an unexpected side effect of this is that Xlib enabled the XKB
extension without asking us. This changes the way that keyboard events are
reported which causes problems with various keyboard events.

(Normally, Xlib hides these things by silently fixing up the events that it
hands out to applications. However, since we bypassed Xlib via xcb...)

The fix is simple: Luckily Xlib provides a function for disabling its XKB
support which is just what we need.

Signed-off-by: Uli Schlachter <>
Comment by Alexander Hirsch (z33ky) - Saturday, 02 February 2013, 10:20 GMT
That fixes the problem for me.
Comment by Alex (lynix) - Saturday, 02 February 2013, 13:52 GMT
For me, too (using 'awesome-git' from AUR on Arch Linux).
Comment by Pierre Neidhardt (ambrevar) - Saturday, 02 February 2013, 16:45 GMT
Works perfectly, thanks a lot!