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

    [solved] xboxdrv only works after waiting a minute

    Scheduled Pinned Locked Moved Help and Support
    xboxdrvcontrollerps3 controllerretropie 4.4
    6 Posts 2 Posters 1.3k 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.
    • S
      Sevik
      last edited by Sevik

      I'm trying to setup a xboxdrv configuration (for scummvm). I have a PS3-Controller connected by bluetooth with this basic configuration:

      sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \
      	--evdev /dev/input/event0 \
      	--silent \
      	--detach-kernel-driver \
      	--force-feedback \
      	--deadzone-trigger 15% \
      	--deadzone 4000 \
      	--mimic-xpad \
      	--evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_Z=x2,ABS_RZ=y2,ABS_#48=lt,ABS_#49=rt \
      	--evdev-keymap KEY_#302=a,KEY_#301=b,BTN_DEAD=x,KEY_#300=y,BTN_THUMB=tl,BTN_THUMB2=tr,BTN_BASE5=lb,BTN_BASE6=rb,BTN_TRIGGER=back,KEY_#720=guide,BTN_TOP=start,BTN_TOP2=du,BTN_PINKIE=dr,BTN_BASE=dd,BTN_BASE2=dl 
      

      This gives no error:

      Your Xbox/Xbox360 controller should now be available as:
        /dev/input/js1
        /dev/input/event3
      

      However, when I test the gamepad (jstest /dev/input/js1), no input is registered. But then, after 60-90seconds, everything works fine. I have no idea why, but it is very annoying zo start a game and wait 2 minutes until I can start to play.

      I'd be grateful for any hints.

      I use the new 3B+ with the 4.4 iso. Official powersupply and no other devices except the PS3-Controller are connected.

      Edit:

      • I tried again today with the 4.4 iso and install ps3 driver and xboxdrv from source (no other option anyway).
      • In my old configuration I had no sudo. Without sudo I get:
      Error: No stuitable uinput device found, tried:
      
        /dev/input/uinput: No such file or directory
        /dev/uinput: Permission denied
        /dev/misc/uinput: No such file or directory
      
      1 Reply Last reply Reply Quote 0
      • S
        Sevik
        last edited by Sevik

        It seems this is a known issue:
        https://github.com/xboxdrv/xboxdrv/issues/144

        There is even a verfied pull request that should fix the problem:
        https://github.com/xboxdrv/xboxdrv/pull/214

        @zerojay: Is it possble to merge this into the RetroPie version?
        https://github.com/zerojay/xboxdrv

        What I don't understand is why this was working for me about a year ago...

        I can confirm, it works with this patch. If anyone else has this problem: You can apply the patch by yourself:

        sudo ./RetroPie-Setup/retropie_packages.sh xboxdrv sources
        sudo nano /home/pi/RetroPie-Setup/tmp/build/xboxdrv/src/usb_gsource.cpp
        

        replace line 177

         libusb_handle_events(NULL);
        

        with:

          struct timeval to;
          to.tv_sec = 0;
          to.tv_usec = 0;
          libusb_handle_events_timeout_completed(NULL, &to, NULL);
        

        then build xboxdrv (takes some time):

        sudo ./RetroPie-Setup/retropie_packages.sh xboxdrv build
        sudo ./RetroPie-Setup/retropie_packages.sh xboxdrv install
        
        Z 1 Reply Last reply Reply Quote 1
        • Z
          zerojay @Sevik
          last edited by

          @sevik said in xboxdrv only works after waiting a minute:

          It seems this is a known issue:
          https://github.com/xboxdrv/xboxdrv/issues/144

          There is even a verfied pull request that should fix the problem:
          https://github.com/xboxdrv/xboxdrv/pull/214

          @zerojay: Is it possble to merge this into the RetroPie version?
          https://github.com/zerojay/xboxdrv

          What I don't understand is why this was working for me about a year ago...

          I can confirm, it works with this patch. If anyone else has this problem: You can apply the patch by yourself:

          sudo ./RetroPie-Setup/retropie_packages.sh xboxdrv sources
          sudo nano /home/pi/RetroPie-Setup/tmp/build/xboxdrv/src/usb_gsource.cpp
          

          replace line 177

           libusb_handle_events(NULL);
          

          with:

            struct timeval to;
            to.tv_sec = 0;
            to.tv_usec = 0;
            libusb_handle_events_timeout_completed(NULL, &to, NULL);
          

          then build xboxdrv (takes some time):

          sudo ./RetroPie-Setup/retropie_packages.sh xboxdrv build
          sudo ./RetroPie-Setup/retropie_packages.sh xboxdrv install
          

          Here you go: https://github.com/zerojay/xboxdrv/pull/8

          1 Reply Last reply Reply Quote 2
          • S
            Sevik
            last edited by

            @zerojay : That was fast, thanks!

            1 Reply Last reply Reply Quote 0
            • Z
              zerojay
              last edited by

              Let me know if everything's good.

              1 Reply Last reply Reply Quote 1
              • S
                Sevik
                last edited by

                I updated the driver via the Retropie-Setup and everythings workung fine. Thanks.

                1 Reply Last reply Reply Quote 1
                • 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.