Linux ERROR: Stop joystick subsystem failed
#1
I'm looking for a solution to using RetroArch in Kodibuntu without the gamepad wreaking havoc with Kodi in the background.

When running RetroArch via Advanced Launcher I need Kodi to stop processing the gamepad input. Doing a bit of googling, I came upon a solution that should solve my problem: scripting to toggle gamepad support in kodi! The problem with this is when toggling gamepad support, even via the gui settings, an error is logged when disabling it
Quote:ERROR: Stop joystick subsystem failed
And when re-enabling the gamepad, it no longer works. The only solution at this point is to unplug/replug the gamepad, or rmmod/modprobe the xpad driver.

I have tried kodi 14.2 and a 15.0 build, as well as using ubuntu 14.04 and 15.04. I suspect this is an SDL or some other library issue. I plan on trying to compile the latest SDL2 for Ubuntu 14.04 and see if that helps.

Any ideas? i'd be happy if I could just get RetroArch to work without kodi being an input hog, but I guess this issue is something you all would want to be aware of anyway.
Reply
#2
I've managed to solve the joystick input problem by sending kodi.bin SIGSTOP/SIGCONT in my retroarch script.

Now i'm encountering the issue of starting retroarch makes kodi lose the keyboard. The only fix is to restart lightdm (kodibuntu). This is still annoying but since I'll be using a joystick almost exclusively not a deal breaker.
Reply
#3
Yea, resurrecting old threads is typically a no-no, but I figured I'd chime in with a hack I used for this.

If you check out CJoystick::ReleaseJoysticks() in xbmc/input/SDLJoystick.cpp in the kodi source (jarvis branch) you'll see where the log entry for your error
Code:
ERROR: Stop joystick subsystem failed
gets generated.
For whatever reason, at least in my case, SDL is not killing the joystick subsystem fast enough, causing it to hit the error.

I wrapped the SDL_QuitSubSystem call in a while loop to have it try a couple times before failing out. See here: https://gist.github.com/invisiblek/6a019...a3f36895ea

This seems to allow it to properly disable and re-enable the joystick subsystem.

Be warned, this is a hack, and if its going to fail every time (not the case for me) its probably going to lock kodi up for a full 10 seconds while it continues to try and disable the joystick subsystem.
Reply

Logout Mark Read Team Forum Stats Members Help
ERROR: Stop joystick subsystem failed0