You are not logged in.

#1 2020-07-31 14:03:32

Ferdinand
Member
Registered: 2020-07-27
Posts: 2

Keymap configuration with /etc/vconsole [SOLVED]

I seems to have stumbled into an oddity with the keymap setting on a fresh install on an Asus Eee 1005HA.

If I run loadkeys no-latin1 from the command line, I get a Norwegian keyboard, except the delete key works exactly as the backspace key.
If I run loadkeys no the delete key works as expected.
So far so good - the "no" keymap is for me then smile

But here's the thing; I try both KEYMAP=no and KEYMAP=no-latin1 in the /etc/vconsole.conf and add keymap to the hooks in /etc/mkinitcpio.conf (and do mkinitcpio -P and reboot), and I get proper delete key behaviour in both cases. EDIT: See post further down; this is wrong - in both cases I get the wrong delete key functionality.

So, if I load no-latin1 with loadkeys I get trouble, but specifying it in /etc/vconsole.conf and loading it with through mkinitcpio works fine (I think that means it's loaded with the systemd service systemd-vconsole-setup.service). EDIT: Wrong again, using /etc/vconsole.conf with the keymap hook in mkinitcpio gives the wrong delete key functionality.

Also, using mkinitcpio shouldn't really be necessary in the first place because an udev rule should load it (90-vconsole.rules according to the vconsole.conf man page), but that doesn't happen.

I had to enable debug output from udev in order to see the error, but then I found this (from journalctl | grep vconsole)...

.....'/usr/lib/systemd/systemd-vconsole-setup'(err) 'gzip: error while loading shared libraries: cannot make segment writable for relocation: Operation not permitted'

...and that seems to explain why udev doesn't load the keymap, as I assume gzip is used to uncompress the keymap, and since it isn't working, the keymap isn't loaded.

Though, if I do gzip -d on the keymap files from the command line then both uncompresses fine without error.

So it's all a bit of a conundrum to me tongue

Using the keymap hook works, so I'm fine functionality-wise  - but I'm curious; has anybody else had problems with this?

Last edited by Ferdinand (2020-08-02 11:29:39)

Offline

#2 2020-07-31 17:50:18

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 637

Re: Keymap configuration with /etc/vconsole [SOLVED]

Hmm, on my machine I think I configured it origninally to use  UK keymap, but I ended up configuring it using a US base (so backslash is on a key now, and not on a three finger chord) and make my caps lock key work as ctrl in X (not in console, it turns out).  Only trouble is looking at it now, I can't find where I've made those changes, I have no /etc/vconsole.conf and nothing in /etc/X11/xorg.conf.d, which are the locations for changes I found using an internet search.

But like you, I don't really care.  It works now and it's worked since I built this machine a year or two back.


Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.

Offline

#3 2020-08-01 06:48:20

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 161
Website

Re: Keymap configuration with /etc/vconsole [SOLVED]

See https://bbs.archlinux32.org/viewtopic.php?id=506 for a detailed analysis.
You can find also workarounds there (gunzip the file bevorehand or add it as hook to
the initramdisk).

Offline

#4 2020-08-02 11:23:55

Ferdinand
Member
Registered: 2020-07-27
Posts: 2

Re: Keymap configuration with /etc/vconsole [SOLVED]

Thank's @abaumann - that thread was useful!

Basically what is needed is to decompress the required keymap manually, so that udev doesn't have to use gzip smile

BTW:
I just realized I got it wrong in my initial post; no matter if I use no or no-latin1 in /etc/vconsole.conf, together with the keymap hook for mkinitcpio, I get the backspace behaviour from the delete key.
I'll update that post.

BTW2:
There's a bonus here; manually decompressing no.map.gz, and removing the mkinitcpio hook - so that udev can load the keymap - gives a normal delete key functionality big_smile

CONCLUSION:
Loading no.map.gz using the keymap hook in mkinitcpio.conf, gives the delete key problem, but loading no.map with udev gives a good delete key.

Offline

Board footer

Powered by FluxBB