I’m getting this in my log when I try to start X:
[ 7780.894] (EE) Error compiling keymap (server-0)
[ 7780.894] (EE) XKB: Couldn’t compile keymap
[ 7780.894] XKB: Failed to compile keymap
[ 7780.894] Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
Fatal server error:
[ 7780.894] Failed to activate core devices.
What’s going on? “Couldn’t compile keymap” has to be one of the most useless error messages ever. Why can’t you compile the keymap??!
I renamed the “xkbcomp” executable and replaced it with a script which logged options and output before executing the original. I’m seeing this output:
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Error: Cannot open “/tmp/server-0.xkm” to write keyboard descriptio
… However, I don’t understand why it’s unable to create a file in /tmp. I’ve verified the file doesn’t already exist before xkbcomp is run, and that all users can create files in /tmp (the “t” bit is set).
Once again, the error message is bad: please tell my why you can’t open the file. (Hint: it’s called perror).
Turns out the permissions were the problem. They were: rwxr-xrwt, i.e. the group was denied write permission. I didn’t think this was a problem seeing as “other” users are allowed to write files, but apparently that’s not how Linux permission checking works.