Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 225043 - scrambled keysyms in Xnest, x11-base/xorg-server-1.4.0.90-r3
Summary: scrambled keysyms in Xnest, x11-base/xorg-server-1.4.0.90-r3
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL: http://bugs.freedesktop.org/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-05 19:36 UTC by Carl Michal
Modified: 2008-08-23 09:32 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Michal 2008-06-05 19:36:24 UTC
If I start a session in an Xnest window, my 'm' key doesn't work properly.  An m appears exactly every second time I press the key.

I went through the Xnest source and found what is happening.  In dix/getevents.c, in the routine:
GetKeyboardValuatorEvents
near line 448, there is a check to see if the event is a KeyRelease of a modifier key.  This check is catching the release of the 'm' and interpreting it as the release of Shift_Lock, rather than as m.

So I had this print out the keysyms of every keypress, and this routine sees all the keysyms scrambled badly, compared to what's listed keysymdef.h in xproto.  

Running xev inside the Xnest though sees the correct keysyms - but it only ever sees every second m.

I can 'fix' this by simply commenting out the check for the Shift_Lock, but that's obviously not a good fix - it seems the keysym mapping isn't getting set up correctly.

emerge --info:
Portage 2.1.4.4 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.24-gentoo-r4 x86_64 Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz
Timestamp of tree: Tue, 03 Jun 2008 18:30:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=nocona -fomit-frame-pointer -pipe -g"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=nocona -fomit-frame-pointer -pipe -g"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer nostrip sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LINGUAS="en en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
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="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac ac3 acpi aiglx alsa amd64 asf berkdb cairo cdr cli commercial cracklib crypt cups dbus divx4linux dri dts dvd dvdr dvdread emacs emboss encode evo exif fam ffmpeg flac fortran gdbm gif gimpprint gnome gphoto2 gpm gstreamer gtk gtk2 hal iconv id3 isdnlog jpeg mad midi mikmod mjpeg mmx mmxext mp3 mp4 mpeg mpeg2 mudflap ncurses network nls nptl nptlonly nsplugin ogg opengl openmp oss pam pcre pdf perl png pppd python qt3support quicktime readline reflection sdl session spell spl sse sse2 ssl svg tcltk tcpd tetex theora thumnailing tiff tk truetype unicode userlocales vcd vorbis wmf x264 xcb xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter 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="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="i810 vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS



Reproducible: Always

Steps to Reproduce:
Comment 1 Donnie Berkholz (RETIRED) gentoo-dev 2008-06-06 06:53:23 UTC
Hm. Could you try out xorg-server-9999 in the x11 overlay? It's accessible via layman.
Comment 2 Carl Michal 2008-06-06 19:10:24 UTC
That's more easily said than done.

xorg-server-9999 wants libX11-9999, which wants libxcb-9999

libxcb-9999 doesn't install libxcb-xlib whose absence causes xorg-server to fail to build.

Removing the patch to libxcb that prevents libxcb-xlib from being installed seems to solve that problem, but now anything that links to X11 complains:
/usr/lib/libX11.so.6: undefined symbol: xcb_take_socket

I've tried rebuilding libX11 a couple of times, to no avail...
Comment 3 Donnie Berkholz (RETIRED) gentoo-dev 2008-06-06 19:32:23 UTC
(In reply to comment #2)
> That's more easily said than done.
> 
> xorg-server-9999 wants libX11-9999, which wants libxcb-9999
> 
> libxcb-9999 doesn't install libxcb-xlib whose absence causes xorg-server to
> fail to build.

Hmm. If you've been using the released libX11 with USE=xcb, you'll need to run revdep-rebuild when moving to the overlay one because of the change you noted.
Comment 4 Carl Michal 2008-06-06 21:16:02 UTC
ok,

xorg-server-9999 installed and working.  

Xnest segfaults on startup:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2b52b9e55d10 (LWP 13988)]
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x000000000043abd9 in miPointerDeviceInitialize (pDev=0x967c20, pScreen=0x7aa570) at mipointer.c:269
#2  0x00000000004e513a in ActivateDevice (dev=0x967c20) at devices.c:373
#3  0x00000000004e8145 in InitAndStartDevices () at devices.c:555
#4  0x0000000000501c1e in main (argc=2, argv=0x7ffff348c508, envp=<value
Comment 5 Donnie Berkholz (RETIRED) gentoo-dev 2008-06-07 01:03:10 UTC
(In reply to comment #4)
> ok,
> 
> xorg-server-9999 installed and working.  
> 
> Xnest segfaults on startup:

Nice. Have you tried Xephyr? (Build with USE=kdrive to get it.)
Comment 6 Carl Michal 2008-06-07 05:51:25 UTC
Thanks, it looks like Xephyr will do what I need.  The lack of a -geometry option is a little unfortunate, but such is life.

It sounds like I should maybe file the Xnest bug upstream... 

Just for my sanity though - do you see this problem too?  If you start Xnest and run xev inside it, most keystrokes give a Keypress event then a Keyrelease event, but m only gives one or the other...
Comment 7 Donnie Berkholz (RETIRED) gentoo-dev 2008-06-07 06:24:06 UTC
(In reply to comment #6)
> Thanks, it looks like Xephyr will do what I need.  The lack of a -geometry
> option is a little unfortunate, but such is life.

Xephyr is kind of the wave of the future.

> It sounds like I should maybe file the Xnest bug upstream... 

That sounds like a good idea. bugs.freedesktop.org, xorg product.

One thing you might like to try first is bumping your xkeyboard-config ebuild locally to 1.3 and see how that works.

> Just for my sanity though - do you see this problem too?  If you start Xnest
> and run xev inside it, most keystrokes give a Keypress event then a Keyrelease
> event, but m only gives one or the other...

Neither of those servers are actually working for me right now, so I couldn't test this out.
Comment 8 Carl Michal 2008-06-08 05:51:12 UTC
Thanks, I tried bumping xkeyboard-config to no avail.

Filed upstream:

http://bugs.freedesktop.org/show_bug.cgi?id=16268
Comment 9 Donnie Berkholz (RETIRED) gentoo-dev 2008-06-08 05:58:00 UTC
Excellent. Please reopen once it's fixed upstream, and I can add a patch then.
Comment 10 Manfred Lebek 2008-08-23 09:32:16 UTC
if started with option +kb, the key is working.

source: http://www.debianforum.de/forum/viewtopic.php?f=2&p=630838