Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 289265 - sys-apps/kbd-1.15.1 getting "KDSKBENT invalid argument" at boot
Summary: sys-apps/kbd-1.15.1 getting "KDSKBENT invalid argument" at boot
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 289321 289329 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-10-16 03:58 UTC by James Erickson
Modified: 2022-06-03 01:19 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
OpenRC keymaps init script patch (keymaps.diff,1.81 KB, patch)
2009-11-11 20:45 UTC, Roy Marples
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Erickson 2009-10-16 03:58:05 UTC
getting "KDSKBENT invalid argument failed to bind key 6 to value 61604" and "failed to bind key 46 to value 61602". i am using "us" keymap and utf-8. 

Reproducible: Always

Steps to Reproduce:
1.boot
2.
3.

Actual Results:  
gives KDSKBENT invalid argument messages

Expected Results:  
set keymap successfully

Portage 2.2_rc46 (default/linux/amd64/10.0, gcc-4.4.1, glibc-2.10.1-r0, 2.6.31-gentoo-r3 x86_64)
=================================================================
System uname: Linux-2.6.31-gentoo-r3-x86_64-Intel-R-_Xeon-R-_CPU_E5450_@_3.00GHz-with-gentoo-2.0.1
Timestamp of tree: Fri, 16 Oct 2009 03:00:01 +0000
app-shells/bash:     4.0_p33
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.3, 3.1.1-r1
dev-python/pycrypto: 2.0.1-r8
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.5.1-r1
sys-apps/sandbox:    2.1
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://gentoo.cites.uiuc.edu/pub/gentoo/ "
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/dev/shm"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 acl alsa amd64 berkdb bzip2 cairo cli cracklib crypt cups dbus directfb dri dvdr emacs encode esd fbcon ffmpeg flac fontconfig fortran gd gdbm gif glitz gpm gstreamer gtk hal iconv imap ipv6 isdnlog jpeg jpeg2k lame mad mmx modules mp3 mpeg mpeg2 mplayer mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre perl png pppd python readline reflection sdl session smtp spl sse sse2 ssl sysfs tcl tcpd theora tiff tk unicode usb v4l v4l2 vorbis xorg xv zlib" ALSA_CARDS="virtuoso" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 James Erickson 2009-10-16 15:33:35 UTC
289321 and 289329 are duplicates of this bug. i apologize for this as my child was hitting the refresh key.
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-10-16 15:43:30 UTC
*** Bug 289321 has been marked as a duplicate of this bug. ***
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-10-16 15:44:37 UTC
*** Bug 289329 has been marked as a duplicate of this bug. ***
Comment 4 tangram 2009-10-19 07:44:47 UTC
After update to sys-apps/kbd-1.15.1
I have same problem on x86, but ONLY if I return from X environment
to simple console ( exit X, restart pc and boot in text environment - without X).
As "First Aid" you can change /etc/init.d/keymaps script:
{
--- /etc/init.d/keymaps	2009-10-18 19:21:23.000000000 +0200
+++ /etc/init.d/keymaps.bak	2009-10-18 18:51:00.000000000 +0200
@@ -42,7 +42,7 @@
 		msg="UTF-8"
 	fi
 	yesno $windowkeys && wkeys="windowkeys"
-	loadkeys -q $loadkeys_uni $wkeys $keymap $extended_keymaps > /dev/null 2>&1
+	loadkeys -q $loadkeys_uni $wkeys $keymap $extended_keymaps
 	eend $? "Error loading key mappings" || return $?
 
 	if yesno $fix_euro; then
@@ -57,7 +57,7 @@
 	ebegin "Setting keyboard mode [$msg]"
 	if yesno $unicode; then
 		dumpkeys ${dumpkeys_charset:+-c} \
-			$dumpkeys_charset | loadkeys --unicode > /dev/null 2>&1
+			$dumpkeys_charset | loadkeys --unicode
 	fi
 	n=1
 	while [ $n -le $ttyn ]; do
}
Simply loadkeys and dumpkeys messages are redirected to null.

I discovered that in new version kbd remembers keymap settings to the file and these
files differ in national( in my case polish) characters.
{
--- ckeymap.txt	2009-10-18 19:07:53.000000000 +0200
+++ xkeymap.txt	2009-10-18 19:01:05.000000000 +0200
@@ -65,7 +65,7 @@
 	shift	alt	keycode  15 = Meta_Tab        
 keycode  16 = q               
 keycode  17 = w               
-keycode  18 = +e               +E               eogonek          Eogonek          Control_e        Control_e        Control_e        Meta_e           Meta_E           Meta_Control_e  
+keycode  18 = +e               +E               ecircumflex      Ecircumflex      Control_e        Control_e        Control_e        Meta_e           Meta_E           Meta_Control_e  
 keycode  19 = r               
 keycode  20 = t               
 keycode  21 = y               
@@ -87,15 +87,15 @@
 	control	keycode  28 = Meta_Control_m  
 	alt	keycode  28 = Meta_Control_m  
 keycode  29 = Control         
-keycode  30 = +a               +A               aogonek          Aogonek          Control_a        Control_a        Control_a        Meta_a           Meta_A           Meta_Control_a  
-keycode  31 = +s               +S               sacute           Sacute           Control_s        Control_s        Control_s        Meta_s           Meta_S           Meta_Control_s  
+keycode  30 = +a               +A               plusminus        exclamdown       Control_a        Control_a        Control_a        Meta_a           Meta_A           Meta_Control_a  
+keycode  31 = +s               +S               paragraph        brokenbar        Control_s        Control_s        Control_s        Meta_s           Meta_S           Meta_Control_s  
 keycode  32 = d               
 keycode  33 = f               
 keycode  34 = g               
 keycode  35 = h               
 keycode  36 = j               
 keycode  37 = k               
-keycode  38 = +l               +L               lstroke          Lstroke          Control_l        Control_l        Control_l        Meta_l           Meta_L           Meta_Control_l  
+keycode  38 = +l               +L               threesuperior    sterling         Control_l        Control_l        Control_l        Meta_l           Meta_L           Meta_Control_l  
 keycode  39 = semicolon        colon           
 	alt	keycode  39 = Meta_semicolon  
 	shift	alt	keycode  39 = Meta_colon      
@@ -115,12 +115,12 @@
 	alt	keycode  43 = Meta_backslash  
 	shift	alt	keycode  43 = Meta_bar        
 	control	alt	keycode  43 = Meta_Control_backslash
-keycode  44 = +z               +Z               zabovedot        Zabovedot        Control_z        Control_z        Control_z        Meta_z           Meta_Z           Meta_Control_z  
-keycode  45 = +x               +X               zacute           Zacute           Control_x        Control_x        Control_x        Meta_x           Meta_X           Meta_Control_x  
-keycode  46 = +c               +C               cacute           Cacute           Control_c        Control_c        Control_c        Meta_c           Meta_C           Meta_Control_c  
+keycode  44 = +z               +Z               questiondown     macron           Control_z        Control_z        Control_z        Meta_z           Meta_Z           Meta_Control_z  
+keycode  45 = +x               +X               onequarter       notsign          Control_x        Control_x        Control_x        Meta_x           Meta_X           Meta_Control_x  
+keycode  46 = +c               +C               ae               AE               Control_c        Control_c        Control_c        Meta_c           Meta_C           Meta_Control_c  
 keycode  47 = v               
 keycode  48 = b               
-keycode  49 = +n               +N               nacute           Nacute           Control_n        Control_n        Control_n        Meta_n           Meta_N           Meta_Control_n  
+keycode  49 = +n               +N               ntilde           Ntilde           Control_n        Control_n        Control_n        Meta_n           Meta_N           Meta_Control_n  
 keycode  50 = m               
 keycode  51 = comma            less            
 	alt	keycode  51 = Meta_comma      
}
Comment 5 megadriver 2009-10-23 10:27:29 UTC
Happens here as well, also since upgrading to kdb-1.15.1. In my case, spanish (es) keyboard, utf-8 and euro fix enabled:

KDSKBENT: Argumento inválido
failed to bind key 13 to value 61601
KDSKBENT: Argumento inválido
failed to bind key 41 to value 61626
KDSKBENT: Argumento inválido
failed to bind key 4 to value 61623
KDSKBENT: Argumento inválido
failed to bind key 13 to value 61631
KDSKBENT: Argumento inválido
failed to bind key 41 to value 61610
KDSKBENT: Argumento inválido
failed to bind key 7 to value 61612
KDSKBENT: Argumento inválido
failed to bind key 18 to value 61604
KDSKBENT: Argumento inválido
failed to bind key 46 to value 61602

Also, unrelated to this bug (I think): I actually have to specify "qwerty/es" as my keymap. If I only use "es", it automatically chooses the OLPC spanish keymap, instead of the "normal PC" one. It's not exclusive of Gentoo. It has happened on any distro I've ever tried since the OLPC keymaps were introduced.
Comment 6 Michael Schutte 2009-10-25 11:10:35 UTC
Hi guys!

I wrote the patch which most likely causes your problems.  May I ask you to test whether a plain “loadkeys $KEYMAP” does what you expect or whether it fails in the same way?  This could really help me figure out where exactly the problem is.
Comment 7 ootput 2009-10-25 11:21:40 UTC
(In reply to comment #6)
> Hi guys!
> 
> I wrote the patch which most likely causes your problems.  May I ask you to
> test whether a plain “loadkeys $KEYMAP” does what you expect or whether it
> fails in the same way?  This could really help me figure out where exactly the
> problem is.
> 

"loadkeys us" succeeds without errors at commandline. I'm also able to reproduce the error message using US keymap and utf-8.
Comment 8 ootput 2009-10-25 11:22:04 UTC
(In reply to comment #6)
> Hi guys!
> 
> I wrote the patch which most likely causes your problems.  May I ask you to
> test whether a plain “loadkeys $KEYMAP” does what you expect or whether it
> fails in the same way?  This could really help me figure out where exactly the
> problem is.
> 

"loadkeys us" succeeds without errors at commandline. I'm also able to reproduce the error message using US keymap and utf-8.
Comment 9 Harald van Dijk (RETIRED) gentoo-dev 2009-10-25 11:36:28 UTC
kbd 1.15 used to temporarily set the kbd_mode to unicode with loadkeys -u. kbd 1.15.1 doesn't. Changing the init script to run kbd_mode before loadkeys gets rid of the errors. Running /etc/init.d/keymaps restart succeeds. Running kbd_mode -a and then /etc/init.d/keymaps restart gives the errors.
Comment 10 Harald van Dijk (RETIRED) gentoo-dev 2009-10-25 12:38:32 UTC
To clarify without initscript: this worked in 1.15, not in 1.15.1:

kbd_mode -a && loadkeys -u us && kbd_mode -u

which is roughly what happens with the initscript.
Comment 11 Michael Schutte 2009-10-28 19:48:03 UTC
I see, thanks for your analysis.  In kbd 1.15.1, you can drop the “-u” switch altogether; loadkeys will have a look at your keyboard mode and automatically convert between 8-bit and Unicode as needed (regardless of whether the keymap file uses keysym names, U+… specifications, etc.).  This means that you can just run “kbd_mode -[au]” followed by “loadkeys $KEYMAP” to get the desired result.

I admit that the “-u” switch is absolutely pointless, confusing and broken right now; I’ll see about re-introducing the brief-switch-to-Unicode feature for compatibility reasons.  You are still encouraged to change your init script as described.  And I’d love to know whether it works for you.

Cheers!
Comment 12 Roy Marples 2009-11-11 20:45:59 UTC
Created attachment 209946 [details, diff]
OpenRC keymaps init script patch

This patch incorporates the above discussion as I read it.

Anyone care to test and report back?
Comment 13 Harald van Dijk (RETIRED) gentoo-dev 2009-11-12 21:26:22 UTC
That's looking good. I'm getting no keymaps-related error messages on boot, and all key combinations I tried seem to work.