RetroPie Crashes With 4 Joystick's hooked up to it
-
I'm working on building a 4-player arcade cabinet but when I have 3+ Joysticks plugged in RetroPie almost always (90% of the time) crashes with the following error.
emulationstation: /home/pi/RetroPie-Setup/tmp/build/emulationstation/es-core/src/InputManager.cpp:84: void InputManager::addJoystickByDeviceIndex(int): Assertaion 'joy' failed. Aborted
I have not seen this error at all if only 2 Joysticks are plugged in.
Here are the specs of my build
RaspberryPi: Raspberry Pi 4 Model B (CanaKit)
PSU: DCAR-RSP 3A5C Output: 5.1v / 3.5A
Retro Pie: v4.8
Emulation Station: v2.10.1rpHere is a link to the Joystick Kit from Amazon.
I pulled out the SDcard to look for error logs but didn't see any. I'm pretty new to working with Raspberry Pi's so I'm not sure what else I could/should be doing to troubleshoot.
-
This happens when the joystick (one of them in your case) is disconnecting while being configured. Most likely there isn't enough power from the Pi's USB ports to drive all 4 joysticks.
You should get a separately powered USB hub and connect the joystick to it, then connect the hub to the PI.
-
@mitu Thanks for the advice. I picked up a 7-port USB Hub with its own power supply today and started getting a different error message.
Now when I power on the Raspberry Pi I get a blue screen with an error message that Emulation Station crashed and that I should
- Make sure my file/folder permissions are correct
- make sure my gpu_split is set high enough and/or switch back to Carbon theme.
I just flashed the RetroPie image using Raspberry Pi Imager so I'm thinking my USB hub is not compatible maybe. The system successfully boots with 2 joysticks plugged into the Raspberry Pi but as soon I plug 1 into the hub I start getting the above error. Is there a recommended USB hub I should try?
Thanks Again!
-
Could be a similar problem with the 'EG Starts' ('Egstarts' ?) encoders [1], not related to the power draw, which was solved by some users with a configuration.
Try adding at the end of/boot/cmdline.txt
(you'll find the file on the boot partition of the sdcard, editable from a PC also) the following stanza:usbhid.quirks=0x0079:0x0006:0x0400
Note that the file is just one single line of options, make sure don't add a new line - just edit the file and, at the end of the other boot options, add a space followed by the options above.
-
@mitu That did the trick! I have no idea what it does but everything is working wonderfully now.
-
FWIW, in short: it instructs the kernel to relax the USB protocol for devices that do not implement the USB HID spec by the letter, either because of poorly engineered/implemented firmware or the vendor did not foresee/test a specific setup (in this case connecting four devices of the same kind).
The hexadecimal numbers relate to <vendorid>:<deviceid>:<applicable quirk> (Links to kernel source code tree).
@d3r3kdrumm0nd please mark your initial post title with [solved] as a courtesy for other users who might face the same issue.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.