Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 202389 - x11-wm/ratpoison interactive ( C-T: ) boxes disable keyboard
Summary: x11-wm/ratpoison interactive ( C-T: ) boxes disable keyboard
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Desktop WM Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on: 211520
Blocks:
  Show dependency tree
 
Reported: 2007-12-15 15:53 UTC by Niklas Thörne
Modified: 2008-04-24 08:17 UTC (History)
1 user (show)

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


Attachments
test case (xorg-grab.c,1.26 KB, text/plain)
2007-12-20 17:41 UTC, Ewgenij Starostin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Niklas Thörne 2007-12-15 15:53:53 UTC
After upgrading to xorg-server-1.4.0.90, whenever entering something in an interactive ratpoison box (C-T: ), further keyboard input is disabled (mouse works fine though). I have not been able to find any log information regarding this problem.

Reproducible: Always

Steps to Reproduce:
1. start ratpoison
2. press C-T:
3. enter a command, followed by newline

Actual Results:  
Further keyboard input is disabled.

Expected Results:  
Valid command execution.

emerge --info


Portage 2.1.4_rc10 (default-linux/x86/2006.1, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r3 i686)
=================================================================
System uname: 2.6.23-gentoo-r3 i686 AMD Athlon(tm) XP 2000+
Timestamp of tree: Sat, 15 Dec 2007 08:16:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe -fno-ident -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fno-ident -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="en en_GB sv"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/share/overlay"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X alsa berkdb bitmap-fonts cli cracklib crypt cups dri fortran gdbm gpm iconv isdnlog midi motif mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection sdl session spl ssl symlink tcpd truetype truetype-fonts type1-fonts x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 ps2mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB sv" USERLAND="GNU" VIDEO_CARDS="radeon fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Niklas Thörne 2007-12-15 16:24:41 UTC
EDIT: Downgrading to xorg-server-1.4-r2 confirms that the bug was actually introduced in 1.4.0.90.
Comment 2 Ewgenij Starostin 2007-12-19 13:51:53 UTC
Same here. Attaching to the Xorg process yields this backtrace:
#0  0x0809a4ee in EnqueueEvent (xE=0x82e1710, device=0x82f2e40, count=1)
    at events.c:1070
#1  0x0809a89d in PlayReleasedEvents () at events.c:1161
#2  0x0809ab5c in ComputeFreezes () at events.c:1235
#3  0x0809b2ce in DeactivateKeyboardGrab (keybd=0x82de210) at events.c:1431
#4  0x080a1f5b in ProcUngrabKeyboard (client=0x8531a58) at events.c:4296
#5  0x0818c27f in XaceCatchDispatchProc (client=0x8531a58) at xace.c:281
#6  0x08089ba5 in Dispatch () at dispatch.c:502
#7  0x080728c0 in main (argc=9, argv=0xbfd58ee4, envp=0xbfd58f0c) at main.c:452

#4 is presumably (I didn’t really check this) in relation to an XUngrabKeyboard call in ratpoison’s src/input.c. (A directly subsequent call to XUnmapWindow to remove the input line window doesn’t happen.)

This is a bit inconvenient, particularly because it disables C-M-backspace and the VT switch keys along with everything else.
Comment 3 Ewgenij Starostin 2007-12-20 17:41:29 UTC
Created attachment 138986 [details]
test case

Here is a bit of code which mimics the relevant Xlib function calls from ratpoison. It grabs the keyboard, waits and ungrabs. If the user hits any keys while the keyboard is grabbed, ungrabbing hangs as above. This code only works (for me) if no windowmanager is running, i. e. it should be run e. g. as
X :1 & ( sleep 5 ; DISPLAY=:1 xterm -e ./a.out ) &

Is X supposed to behave like that with this code?
Comment 4 David Shakaryan (RETIRED) gentoo-dev 2008-01-06 09:16:22 UTC
Hrm, not sure where to start.

Is this with ratpoison 1.4.1 or 1.4.2?
Comment 5 Niklas Thörne 2008-01-06 10:00:53 UTC
(In reply to comment #4)
> Hrm, not sure where to start.
> 
> Is this with ratpoison 1.4.1 or 1.4.2?
> 

In my case it is ratpoison-1.4.1
I think that a fair guess is that this bug was introduced by the keyboard LED patch that was added to Xorg, as I think that I've read somewhere that the patch is somewhat 'ugly', and by the fact that this bug is a keyboard event related issue.
Comment 6 ashtophet 2008-01-16 15:59:37 UTC
I'm having this on my box too... Seems to be a xorg bug:

cfr. http://bugs.freedesktop.org/show_bug.cgi?id=13511
Comment 7 ashtophet 2008-02-25 17:25:20 UTC
ratpoison 1.4.3 solves this here
Comment 8 David Shakaryan (RETIRED) gentoo-dev 2008-04-24 08:17:57 UTC
Ratpoison 1.4.3 is now in the tree. Closing this bug fixed.