Bug 1010516 - Problem setting custom keymap file for console using vconsole.conf
Problem setting custom keymap file for console using vconsole.conf
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
20
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-20 22:58 EDT by stan
Modified: 2013-09-24 17:09 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-24 17:09:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description stan 2013-09-20 22:58:45 EDT
Description of problem:  Can't set a custom keymap for the console in Fedora 20.


Version-Release number of selected component (if applicable)
Name        : systemd
Version     : 207
Release     : 4.fc20
Architecture: x86_64

How reproducible:
Every time.


Steps to Reproduce:
1.  Put a custom console keymap file in /lib/kbd/keymaps/xkb
2.  Put that keymap name in /etc/vconsole.conf as the KEYMAP=
3.  Reboot


Actual results:
Will pull in default us keymap instead of custom keymap.

Expected results:
Custom keymap is set for consoles as part of boot process.


Additional info:
Comment 1 stan 2013-09-20 23:03:50 EDT
I originally posted the following in 
https://bugzilla.redhat.com/show_bug.cgi?id=981805
Adam suggested it should be a separate bug, so I thought I'd transfer the information here.

"""
This bug seems like a good place to mention a problem I'm having with the new keyboard process in F20.

I run a unique custom keymap (ergonomic).  In the past, I've just copied the two keymap files (same keymap, one for console, one for X) into the appropriate places, changed the appropriate configuration files, and was good to go.  Tweak once at install, then never have to touch anything again.

It was pretty easy to tweak X to accept the keymap in F20, a return to the days when the evdev.xml and base.xml files were used.  Put the custom keymap file in xkb/symbols and a stanza for it in the xml files in xkb/rules, and in business.  I made it default by using a file in /usr/share/X11/xorg.conf.d, though I usually use a .Xkbmap file in my home directory.  Unfortunately, since I am unable to officially install F20 because of an obscure bug in the image, I used unconventional manual means, and can't login for now.  But no matter what I do, I can't get systemd to accept my custom console file.  I put the name in /etc/vconsole.conf (the replacement for /etc/sysconfig/keyboard), and it ignores it.  I suspect that it isn't actually reading the /lib/kbd/keymaps/xkb directory to see which keymaps are present, but is instead looking at a fixed internal list derived from approved X keymappings.  And since my custom keymap isn't on that approved list, it's ignored and systemd defaults to us.

Would it be possible to have systemd look at the keymaps present for the console, so people who want to run unique custom keymaps can do so?  Or maybe, it could be added to a conf file somewhere.  Or perhaps there is already a way to do this, and I'm not just aware of it yet.  If so, please tell me.

Thanks.
"""
Comment 2 stan 2013-09-21 12:19:51 EDT
Reinstalling some packages and an SELinux filesystem relabel gave me login access to the F20 system.  When I logged in as root and tried to load the custom keymap with loadkeys custom-keymap it failed.  From memory, the error was 
unable to access include file linux-raw-bare
When I put the custom-keymap in /lib/kbd/keymaps/legacy/i386/dvorak and used loadkeys /lib/kbd/keymaps/legacy/i386/dvorak/custom-keymap
it worked.

So, I assume there is some magic associated with the keymaps in /lib/kbd/keymaps/xkb.  How do I imitate that magic so vconsole will load my custom keymap on boot?
Comment 3 stan 2013-09-24 16:12:24 EDT
Progress.  Installed package setup-console, based on the information at
https://lists.fedoraproject.org/pipermail/devel/2013-May/183099.html
I then used the program ckbcomp to convert the X version of my custom keymap,
ckbcomp -charmap ISO-8859-1 -compact custom custom-convert.map
gzip it, and put it in /lib/kbd/keymaps/xkb(chcon, chmod), and now I can load it just by 
loadkeys custom-convert
But when I put this custom-convert keymap name in /etc/vconsole.conf, it still doesn't load it on boot.
Comment 4 stan 2013-09-24 17:09:09 EDT
Ran dracut to create a custom initramfs for the kernel, and bingo!  It loads the custom keymap on boot.

So there is a workaround for the problem.  Will be closing this ticket.

Note You need to log in before you can comment on or make changes to this bug.