RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Xbox 360 controllers - xboxdrv

    Scheduled Pinned Locked Moved Help and Support
    xboxcontroller3.8
    8 Posts 3 Posters 5.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      hijikel
      last edited by hijikel

      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 controllers

      Edit: 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?

      1 Reply Last reply Reply Quote 0
      • mediamogulM
        mediamogul Global Moderator
        last edited by mediamogul

        What exactly is your goal here and why was the default installation of xboxdrv insufficient?

        RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

        1 Reply Last reply Reply Quote 0
        • H
          hijikel
          last edited by hijikel

          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.

          herb_fargusH mediamogulM 2 Replies Last reply Reply Quote 0
          • herb_fargusH
            herb_fargus administrators @hijikel
            last edited by

            @hijikel using the default does treat them as two separate controllers. At least it does for me

            If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

            Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

            H 1 Reply Last reply Reply Quote 0
            • mediamogulM
              mediamogul Global Moderator @hijikel
              last edited by mediamogul

              @hijikel

              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.

              RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

              1 Reply Last reply Reply Quote 0
              • H
                hijikel @herb_fargus
                last edited by

                @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) #2

                However, 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:

                @hijikel

                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...

                herb_fargusH 1 Reply Last reply Reply Quote 0
                • herb_fargusH
                  herb_fargus administrators @hijikel
                  last edited by

                  @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.

                  If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

                  Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

                  H 1 Reply Last reply Reply Quote 0
                  • H
                    hijikel @herb_fargus
                    last edited by

                    @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.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post

                    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.