Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 448098 - x11-base/xorg-server-1.13 x11-apps/xinput - xinput --map-to-output 10 (keyboard related id) VGA1 (any display) - X segmentation fault
Summary: x11-base/xorg-server-1.13 x11-apps/xinput - xinput --map-to-output 10 (keyboa...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-21 17:35 UTC by Matthew Schultz
Modified: 2017-03-05 06:02 UTC (History)
0 users

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


Attachments
kdm.log (kdm.log,4.33 KB, text/plain)
2012-12-21 17:36 UTC, Matthew Schultz
Details
xinput_x_crash_backtrace.txt (xinput_x_crash_backtrace.txt,2.72 KB, text/plain)
2012-12-27 03:37 UTC, Matthew Schultz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Schultz 2012-12-21 17:35:36 UTC
kdm segfaults when attempting to log in and renders kdm useless.  I can log in through a terminal and use startx though and KDE starts without issue.

Reproducible: Always

Steps to Reproduce:
1. Try to log in through kdm
2. After entering username/password and pressing enter, the screen goes black and and brings back kdm login.
Actual Results:  
Cannot log in through kdm.

Expected Results:  
Log in through kdm.

emerge --info:

emerge --info
Portage 2.1.11.31 (default/linux/amd64/10.0, gcc-4.5.4, glibc-2.15-r3, 3.6.2-gentoo x86_64)
=================================================================
System uname: Linux-3.6.2-gentoo-x86_64-Intel-R-_Core-TM-_i5-2540M_CPU_@_2.60GHz-with-gentoo-2.2
Timestamp of tree: Tue, 11 Dec 2012 21:00:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3                                                                                                                                                                          
dev-util/cmake:           2.8.9                                                                                                                                                                                    
dev-util/pkgconfig:       0.27.1                                                                                                                                                                                   
sys-apps/baselayout:      2.2                                                                                                                                                                                      
sys-apps/openrc:          0.11.8                                                                                                                                                                                   
sys-apps/sandbox:         2.5                                                                                                                                                                                      
sys-devel/autoconf:       2.13, 2.68                                                                                                                                                                               
sys-devel/automake:       1.9.6-r3, 1.11.6                                                                                                                                                                         
sys-devel/binutils:       2.22-r1                                                                                                                                                                                  
sys-devel/gcc:            4.5.4                                                                                                                                                                                    
sys-devel/gcc-config:     1.7.3                                                                                                                                                                                    
sys-devel/libtool:        2.4-r1                                                                                                                                                                                   
sys-devel/make:           3.82-r3                                                                                                                                                                                  
sys-kernel/linux-headers: 3.6 (virtual/os-headers)                                                                                                                                                                 
sys-libs/glibc:           2.15-r3
Repositories: gentoo sunrise x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://portage.home http://gentoo.cites.uiuc.edu/pub/gentoo/ http://gentoo.mirrors.easynews.com/linux/gentoo/"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /usr/local/portage"
SYNC="rsync://server.home/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 apache2 audiofile avi bcmath bdf berkdb bluetooth bzip2 cairo calendar caps cdda cdr chardet cjk clamav cli consolekit cracklib crypt css ctype cups curl curlwrappers cxx dbus declarative device-mapper dga directfb dri dts dvb dvd dvdread emu-linux-x86 enca encode exif fbcon ffmpeg flac fontconfig foomaticdb fortran ftp fts3 gd gdbm gif gmp gnutls gpm gsm gtk gtk2 gzip hash hbci iconv idn ieee1394 imagemagick imap imlib innodb ipv6 ithreads java java6 javascript jpeg jpeg2k json kde keymap kipi lcms libcaca libnotify lirc lm_sensors logrotate lzma lzo mad matroska mbox mcal mhash mime mjpeg mmx mmxext mng modules mp3 mp4 mpeg mplayer msession mudflap multilib mysql mysqli mysqlnd mythtv ncurses network nls nptl nptlonly nsplugin nss nvidia offensive ofx ogg openal opengl openmp openssl osc osmesa oss pam pcntl pcre pdf pdo pear perl php png policykit posix ppds pppd python qt qt3 qt3support qt4 quicktime readline reflection rtc samba sasl sdl seamonkey session simplexml smp snmp soap sockets spell spl sql sqlite sse sse2 ssl ssse3 subversion suhosin svg syslog sysvipc tcpd theora threads thumbnail tidy tiff tokenizer transcode truetype tslib udev udisks unicode usb utempter v4l v4l2 vcd vdpau vorbis vpx wddx webkit wifi x264 xcb xcomposite xforms xine xinerama xml xpm xsl xv xvfb xvid xvmc zip 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 mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics tslib" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US ru" PHP_TARGETS="php5-2 php5-3 php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" SANE_BACKENDS="epson epson2" USERLAND="GNU" VIDEO_CARDS="nvidia intel nv vesa fbdev v4l qxl virtualbox" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Matthew Schultz 2012-12-21 17:36:56 UTC
Created attachment 332944 [details]
kdm.log

Everything up to kdmgreet(13655)/kdecore (K*TimeZone*): No time zone information obtained from ktimezoned is when xdm starts.  The backtrace and segfault is logged after that when a log in is attempted through kdm.
Comment 2 Matthew Schultz 2012-12-21 17:42:48 UTC
Also despite what the kdm log says, dbus is in fact running as well as consolekit.


emerge -pv kdm

These are the packages that would be merged, in order:

Calculating dependencies  -m     -p          ... done!
[ebuild   R    ] kde-base/kdm-4.9.3:4  USE="consolekit handbook pam (-aqua) -debug -kerberos" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
rbilbo ~ # emerge -pv xorg-server

These are the packages that would be merged, in order:

Calculating dependencies  -c-     -
... done!
[ebuild   R    ] x11-base/xorg-server-1.13.0-r1  USE="ipv6 nptl tslib udev xorg xvfb -dmx -doc -kdrive -minimal (-selinux) -static-libs -xnest" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2012-12-21 18:02:54 UTC
It isn't kdm that segfaults, but X.
Comment 4 Matthew Schultz 2012-12-21 20:19:05 UTC
(In reply to comment #3)
> It isn't kdm that segfaults, but X.

Actually I found the root of the problem.  I have a script in xinitrc.d that was causing X to crash:

#!/bin/bash
# Confine touchscreen area to its own screen when in using xinerama style monitor settings
xinput --map-to-output 10 VGA1

I figured this script would suffice to confine my touchscreen activity to the touchscreen monitor on VGA1.  The problem is the xinput ids are not static and are switched around on a reboot.  As a result, the input id 10 which used to be the usb input for the touchscreen became the sleep button.  Then when kdm tried to start X, it ran that script and as a result X crashed.  Apparently --map-to-output works on any pointer device id but if you specify a keyboard related device id, it causes X to crash and segfault.  I think xinput needs to be patched to disallow specifying a keyboard related device.  I rewrote my script as such where it won't crash anymore but xinput should still be patched:

#/bin/bash
SEARCH_DEVICE="CoolTouch"
SEARCH_DISPLAY="VGA1"

TOUCH_DISPLAY=$(xrandr | grep "${SEARCH_DISPLAY} connected")
TOUCH_DEVICE=$(xinput | grep ${SEARCH_DEVICE})
if [ -n "${TOUCH_DEVICE}" ] && [ $(echo ${TOUCH_DEVICE} | wc -l) -eq 1 ] && [ -n "${TOUCH_DISPLAY}" ] && [ $(echo ${TOUCH_DISPLAY} | wc -l) -eq 1 ]; then
        xinput --map-to-output $(echo ${TOUCH_DEVICE} | awk -F= '{print $2}' | awk '{print $1}') ${TOUCH_DISPLAY}
fi
unset SEARCH_DEVICE
unset SEARCH_DISPLAY
unset TOUCH_DISPLAY
unset TOUCH_DEVICE
Comment 5 Matthew Schultz 2012-12-21 20:19:33 UTC
I would suggest a reassignment of the bug since this is not KDE related.
Comment 6 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-12-26 18:13:47 UTC
Please try with xorg-server-1.13.1 and if the issue persists, get a backtrace as per http://wiki.x.org/wiki/Development/Documentation/ServerDebugging
Comment 7 Matthew Schultz 2012-12-27 03:37:05 UTC
Created attachment 333424 [details]
xinput_x_crash_backtrace.txt

segfault message and backtrace of crash with --map-to-output set to a keyboard device instead of a pointer device.
Comment 8 Matthew Schultz 2012-12-27 03:37:29 UTC
(In reply to comment #7)
> Created attachment 333424 [details]
> xinput_x_crash_backtrace.txt
> 
> segfault message and backtrace of crash with --map-to-output set to a
> keyboard device instead of a pointer device.

tested in xorg 1.13.1
Comment 9 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-12-27 09:13:39 UTC
This looks like a bug in xorg-server. If possible, please open a bug report upstream at https://bugs.freedesktop.org/ (if no report already exists) and provide the link here.
Comment 10 Matthew Schultz 2012-12-27 13:44:35 UTC
(In reply to comment #9)
> This looks like a bug in xorg-server. If possible, please open a bug report
> upstream at https://bugs.freedesktop.org/ (if no report already exists) and
> provide the link here.

Added bug to upstream bug tracker:

https://bugs.freedesktop.org/show_bug.cgi?id=58804
Comment 11 Matt Turner gentoo-dev 2017-03-05 04:28:48 UTC
Is this still a problem with current stable versions?
Comment 12 Matthew Schultz 2017-03-05 05:24:46 UTC
It appears upstream fixed it.
Comment 13 Matt Turner gentoo-dev 2017-03-05 06:02:54 UTC
Great. Thank you for confirming.