Xbox 360 controllers - xboxdrv
-
Hi,
I've deleted my previous thread as it wasn't entirely accurate, after some more investigation I've found I can use xboxdrv when installed from apt-get (re: not from the retropie-setup script) and using the following /etc/rc.local config:
"/usr/bin/xboxdrv" --silent --daemon --dbus disabled --detach --detach-kernel-driver --wid 0 --led 2 --deadzone 4000 --trigger-as-button --next-controller --wid 1 --led 3 --deadzone 4000 --trigger-as-button
I can get both 360 controllers to act independently, they also produce output using evtest, however when I launch emulationstation, I receive this error:
[ERROR] USBController::on_read_data(): USB read failure: 32: LIBUSB_TRANSFER_ERROR
and the controllers stop responding... can anybody help with where I should start looking?
Specs:
Retropie 3.8.1
Kernel 4.4.11
RPi 3b
Official Microsoft wireless adapter
2x Official 360 elite controllersEdit: I've also blacklisted xpad in /etc/modprobe.d
Edit2: After further testing, the libusb error refers to one of the controllers dropping off, it stays physically (wirelessly) connected but the driver doesn't pick it up any more.
Edit3: I've got it working to an extent, the workaround is to kill xboxdrv after emulationstation launch, and re-execute it under sudo. Can you advise how this could be scripted so it happens automatically? is there a directory which emulationstation launches scripts from after load? -
What exactly is your goal here and why was the default installation of xboxdrv insufficient?
-
I'm wanting to use 2 wireless xbox controllers and have them recognised as 2 different inputs (eg, player 1 and player 2)
I found various problems with the standard xpad driver and xboxdrv supplied with RetroPie (/opt/retropie/supplementary/xboxdrv/bin/xboxdrv) mostly due to controllers not being assigned correctly or at all.
-
@hijikel using the default does treat them as two separate controllers. At least it does for me
-
I believe this is because xboxdrv assigns the same ID name to all controllers and RetroArch gets confused. This is also a problem when multiple, identical controllers of any kind are used. Here's a link to a group discussion regarding this issue as it specifically relates to actual XBox controllers.
http://libretro.com/forums/showthread.php?t=1800
Edit: I might be off on the cause here. I have noticed a huge discrepancy in user accounts of people using xboxdrv with multiple controllers.
-
@herb_fargus said in Xbox 360 controllers - xboxdrv:
@hijikel using the default does treat them as two separate controllers. At least it does for me
Yes, they're identifying correctly (using either version of xboxdrv) as:
Pad A: Xbox Gamepad (userspace driver)
Pad B: Xbox Gamepad (userspace driver) #2However, on very few occasions did they work correctly together, most of the time one has worked, one hasn't, I couldn't reproduce this either, it was seemingly random.
The apt-get version responds correctly (can issue led commands, identify controllers etc) over reboots as opposed to the supplied (/opt) version.Checking the version shows the supplied version as later, could something have broke?
$ /opt/retropie/supplementary/xboxdrv/bin/xboxdrv --version xboxdrv 0.8.8 - http://pingus.seul.org/~grumbel/xboxdrv/ ... $ xboxdrv --version xboxdrv 0.8.5 - http://pingus.seul.org/~grumbel/xboxdrv/
@mediamogul said in Xbox 360 controllers - xboxdrv:
I believe this is because xboxdrv assigns the same ID name to all controllers and RetroArch gets confused. This is also a problem when multiple, identical controllers of any kind are used. Here's a link to a group discussion regarding this issue as it specifically relates to actual XBox controllers.
http://libretro.com/forums/showthread.php?t=1800
Edit: I might be off on the cause here. I have noticed a huge discrepancy in user accounts of people using xboxdrv with multiple controllers.
I've had a read of that thread and I don't think it relates too much as the controllers are being identified correctly, but not working as expected. I'll attempt to double check the IDs though
Thanks for your help so far, it's much apppreciated :)
I've got 3 more questions which while related are not strictly on subject:
-
The controllers tend to drop off when launching emulationstation (leading to my 3rd question), I can't see an obvious reason for this, does emulationstation try to talk direct to controllers or would it just pickup the virtual controllers provided by xboxdrv?
-
I'm mostly referring to emulationstation because the way I understand it, RetroArch receives its config off emulationstation is that correct? or does emulationstation rely on RetroArch?
-
Can I automatically execute scripts after emulationstation has loaded? I'm thinking some kind of cron job but I'm not sure...
-
-
@hijikel The problems you're describing are likely due to a recent kernel issue that you posted on here: https://retropie.org.uk/forum/topic/2056/xbox-360-wireless-controllers-problem/2
Emulationstation configs and retroarch configs operate independently although the emulationstation config is used to generate the retroarch configs when controllers are configured for the first time on boot.
-
@herb_fargus Thanks, I had a feeling it's one and the same but I couldn't quite get a grasp on how things were configured/running, at least I've got more of a handle on how things interact now.
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.