Bug 26900 - X.org crashes instantly when pushing a joystick button / direction
Summary: X.org crashes instantly when pushing a joystick button / direction
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/joystick (show other bugs)
Version: 7.5 (2009.10)
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Sascha Hlusiak
QA Contact: Xorg Project Team
URL:
Whiteboard: 2011BRB_Reviewed
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-05 01:12 UTC by Mahendra Tallur
Modified: 2018-06-12 19:07 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg crash log (20.04 KB, text/plain)
2010-03-05 01:12 UTC, Mahendra Tallur
no flags Details
lshal output (149.70 KB, text/plain)
2010-03-05 01:14 UTC, Mahendra Tallur
no flags Details
evtest-capture, with the fdi file, screen, sdlmame (2.43 KB, text/xml)
2010-03-14 03:19 UTC, Mahendra Tallur
no flags Details

Description Mahendra Tallur 2010-03-05 01:12:29 UTC
Created attachment 33781 [details]
Xorg crash log

Hi ! Here's a follow-up to my previous bugreport ( http://bugs.freedesktop.org/show_bug.cgi?id=26884 ).

Using a Speedlink 360 style Gamepad, aka SL-6555-SBK, aka
acrux-usb-gamepad-8116 
Software : ArchLinux 64 bits, xf86-input-evdev 2.3.2-1, xf86-input-joystick 1.5.0-1, xorg-server 1.7.5-1, kernel26 2.6.32.9-1

ISSUE : with some fullscreen apps using the joystick (like xmoto, sdlmame), pressing a button, or moving an axis triggers an instant crash of the X server.

(whether it uses the evdev or joystick driver ; had to add an HAL rule to /etc/hal/fdi/policy beforehand ; otherwise, even though the stick was seen as /dev/input/js0 AND detected by the games, it wouldn't initialize (LED unlit) and wouldn't work.)

HOWEVER : in windowed games, no trash was triggered. (i.e. windowed sdlmame, rrootage)

Attached : the relevant xorg log.
I will also add my lshal, evtest output, and the fdi file.

Cheers !
Comment 1 Mahendra Tallur 2010-03-05 01:14:06 UTC
Created attachment 33782 [details]
lshal output
Comment 2 Mahendra Tallur 2010-03-05 01:22:53 UTC
Unfortunately, I cannot provide an evtest-capture output.

Indeed : I need to unplug / replug the gamepad to get it initialized. If I switch to the TTY1 console, the gamepad needs to be initialized again. If I use evtest-capture in my X session, the crash is too sudden and the generated xml file is empty...
Comment 3 Mahendra Tallur 2010-03-05 01:43:31 UTC
I forgot an important piece of information : the crash doesn't depend on the GPU driver used. (occurs with both VESA and NVIDIA drivers)
Comment 4 Peter Hutterer 2010-03-08 20:26:17 UTC
if it only crashes once you press the joystick, you can still get the evtest output from it this way:

start a terminal, then start screen. inside screen, run evtest-capture. now crash the server, when it comes back reconnect to the screen session with "screen -r". This shouldn't kill the evtest-capture process and thus flush the xml file.
Comment 5 Mahendra Tallur 2010-03-14 03:18:49 UTC
Thank you Peter, that's really good to know !

So here's the evtest-capture.xml file. 
I just launched sdlmame and moved the horizontal axis of the first stick to the left, then it brought down the whole X server.

Cheers !
Comment 6 Mahendra Tallur 2010-03-14 03:19:27 UTC
Created attachment 34033 [details]
evtest-capture, with the fdi file, screen, sdlmame
Comment 7 Peter Hutterer 2010-03-16 21:30:33 UTC
reassigning to joystick driver, I can't reproduce this with evdev.
Comment 8 Sascha Hlusiak 2010-03-21 04:03:37 UTC
Did you set input.x11_options.SendCoreEvents to 'false'? Does it crash when you set it to true? If you have it to false you could as well just deactivate the joystick driver completely to be sure it's the joystick module that triggers the crash. I will try to reproduce it..
Comment 9 Mahendra Tallur 2010-03-23 08:21:35 UTC
Hello Sascha,

thanks for your reply !

I eventually decided to install both Archlinux and Ubuntu at the same time.

I can confirm that :

- with Archlinux (current), the crash occurs with input.x11_options.SendCoreEvents set to false. BUT INDEED, it doesn't crash when it is set to true ! Your assumption was right !

- with Ubuntu (Lucid Beta 1), it doesn't crash (strangely, it doesn't seem to respect the aforementioned option, which it did in Karmic - with no crash either).

The other issues exist in both cases (custom FDI required, axis problems, unplug / replug required).

Cheers !
Comment 10 Sascha Hlusiak 2011-04-20 13:04:49 UTC
I can not reproduce this bug with quake3. 

Generally joystick clients fight over the data so unless you are really using the xorg joystick driver, it's a good idea to generalle disable it completely. Setting SendCoreEvents to false is a workaround but will still keep the joystick module working in the background, possibly causing it to fight over the device with the game so you need to unplug it and replug it to make it work. 

If you do not use the joystick as a mouse device, I recommend to remove the joystick module. What distribution installs and enables the joystick driver by default? Usually that's not what people want. 

The crash seems to happen only when the joystick is in "floating" mode (not generating core events). Can you reproduce the bug with recent versions of xorg-server?
Comment 11 Adam Jackson 2018-06-12 19:07:01 UTC
Mass closure: This bug has been untouched for more than six years, and is not
obviously still valid. Please reopen this bug or file a new report if you continue to experience issues with current releases.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.