• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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

Failure to boot with xboxdrv initialisation in rc.local

Scheduled Pinned Locked Moved Help and Support
xboxdrvboot failcustom controls
25 Posts 2 Posters 1.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.
  • M
    mitu Global Moderator @Applepie2
    last edited by 21 Dec 2022, 20:07

    @Applepie2 said in Failure to boot with xboxdrv initialisation in rc.local:

    Is sudo xboxdrv enough of a path from the autostart script?

    No, you need to add the full path to xboxdrv.

    1 Reply Last reply Reply Quote 0
    • A
      Applepie2
      last edited by 21 Dec 2022, 22:51

      Added the full path and checked the command was correct again and see no noticeable errors.

      It still doesn't appear to be running the command successfully though as the controller is still being recognised as Teensyduino_Keyboard_Mouse_Joystick. Is there anyway to get a verbose output from the autostart.sh script, so I can see what is actually happening?

      M 1 Reply Last reply 22 Dec 2022, 04:47 Reply Quote 0
      • M
        mitu Global Moderator @Applepie2
        last edited by 22 Dec 2022, 04:47

        @Applepie2 You can comment out the emulationstation #auto line and see the output of the command on the terminal, just after the boot. You can also redirect the output of the command to a log file and inspect the log file.

        sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv 1>&2 2>/home/pi/xboxdrv.log \
        .... # the rest of the xboxdrv command parameters
        #emulationstation #auto
        A 1 Reply Last reply 22 Dec 2022, 11:37 Reply Quote 0
        • A
          Applepie2 @mitu
          last edited by Applepie2 22 Dec 2022, 11:37

          @mitu I've tried both options you mentioned above and I see the success message print in the terminal saying that the controller is mapped to js3, and the log remains empty. This leads me to believe that the command is running successfully.

          However, the controller still seems to be seen by emulationstation/retroarch as "Teensyduino_Keyboard_Mouse_Joystick".

          If I go into the terminal and check with ls /dev/input/js* then only js0, js1 and js2 are shown. Equally if I try to run jstest on js3 then it says (as expect based on the previous command) No such file or directory.

          Is there any reason that the command would appear to run successfully but NOT actually map the controls?

          Thank you again so much for your advice, sorry for taking up your time!

          EDIT:
          I've found a typo in the command (I'm gonna blame tiredness for missing it last night). I had used a - instead of a _ on one of the button mappings. The command is now certainly running and I am able to boot into emulationstation. However now my controller doesn't work at all in emulationstation. If I run jstest on js3 though it is working perfectly and everything is mapped as expected. Do I need to somehow assign a different primary controller, or register the controller with emulationstation somehow?

          M 1 Reply Last reply 22 Dec 2022, 11:54 Reply Quote 0
          • M
            mitu Global Moderator @Applepie2
            last edited by mitu 22 Dec 2022, 11:54

            @Applepie2 said in Failure to boot with xboxdrv initialisation in rc.local:

            Do I need to somehow assign a different primary controller, or register the controller with emulationstation somehow?

            EmulationStation doesn't have the notion of a 'Primary Controller', it will receive inputs from all (supported/known) controllers.
            Run emulationstation with the --debug parameter and post the log, it should show the controller(s) it detects. Try to configure the gamepad and then exit (press F4).

            In addition to the log from EmulationStation, please post the output of cat /proc/bus/input/devices after xboxdrv has been started.

            A 1 Reply Last reply 22 Dec 2022, 13:06 Reply Quote 0
            • A
              Applepie2 @mitu
              last edited by 22 Dec 2022, 13:06

              @mitu For the emulationstation log I get:

              Dec 22 12:56:27 lvl3: SystemView:getViewElements()
              Dec 22 12:56:27 lvl3: fireEvent: system-select c64 gotostart
              Dec 22 12:56:27 lvl2: Added known joystick 'Teensyduino Keyboard/Mouse/Joystick' (instance ID: 0, device index: 0).
              Dec 22 12:56:27 lvl2: Added known joystick 'Teensyduino Keyboard/Mouse/Joystick (instance ID: 1, device index: 1).
              Dec 22 12:56:29 lvl2:Added unconfigured joystick 'ApplePi Controller' (GUID:030000005e0400008e02000010010000, instance ID: 2, device index: 2). 
              

              For the output of cat /proc/bus/input/devices I get a list of all my devices, which includes the registered 'ApplePi Controller':

              I: Bus=0003 Vendor=045e Product=028e Version=0110
              N: Name="ApplePi Controller"
              P: Phys=
              S: Sysfs=/devices/virtual/input/input25
              U: Uniq=
              H: Handlers=event3 js3
              B: PROP=0
              B: EV=20000b
              B: KEY=7cdb03c0 0 0 0 0 0 0 0 0 0
              B: ABS=3f
              B: FF=1 3f870000 0 0
              

              As a side note, at the moment I am manually typing these outputs out for you, is there a simple way for me to be able to copy and paste the whole logs?

              M 1 Reply Last reply 22 Dec 2022, 14:06 Reply Quote 0
              • A
                Applepie2
                last edited by 22 Dec 2022, 13:57

                After reading the log myself I guessed that I hadn't reconfigured the controller properly in emulationstation, so after redoing the configuration everything is working great.

                Thanks so much for all the help, problem is solved!

                1 Reply Last reply Reply Quote 0
                • M
                  mitu Global Moderator @Applepie2
                  last edited by 22 Dec 2022, 14:06

                  @Applepie2 said in Failure to boot with xboxdrv initialisation in rc.local:

                  As a side note, at the moment I am manually typing these outputs out for you, is there a simple way for me to be able to copy and paste the whole logs?

                  You can use SSH to log in and issue commands, transfer files/text from the Pi.

                  From the EmulationStation log, it looks like the controller is detected as a joystick. Can you also post the entire log - including the inputs recorded during the configuration screen ?

                  Should be easier to transfer if you're using SSH. The log file can also be found via file shares at \\retropie\configs\all\emulationstation\es_log.txt.

                  As a last resort, you can configure the device manually by adding the appropriate entries in es_input.cfg (same folder as the log file).

                  1 Reply Last reply Reply Quote 0
                  • A
                    Applepie2
                    last edited by 22 Dec 2022, 14:12

                    It was my own fault for not configuring the controller again in emulationstation, sorry about that!

                    The only issue I now have is that although it works perfectly in emulationstation, the controller doesn't work at all in any of emulators I've tried (only been testing libretro core emulators). On launch it now shows that three controllers are recognised Teensyduino Keyboard/Mouse/Joystick in port 1, Teensyduino Keyboard/Mouse/Joystick in port 2 and ApplePi Controller in port 3.

                    I feel there may be some conflict as both the physical controller and virtual remapped version as they are both being seen.

                    M 1 Reply Last reply 22 Dec 2022, 14:23 Reply Quote 0
                    • M
                      mitu Global Moderator @Applepie2
                      last edited by 22 Dec 2022, 14:23

                      @Applepie2 said in Failure to boot with xboxdrv initialisation in rc.local:

                      I feel there may be some conflict as both the physical controller and virtual remapped version as they are both being seen.

                      Yes, I think that's the case. You may use the Configuration Editor to re-order the joysticks so #3 (ApplePie) appears are #1 and takes over as Player 1.
                      This will work for RetroArch, for other (stadalone) emulators there may be additional configuration to be done to re-order the joysticks.

                      A 1 Reply Last reply 22 Dec 2022, 14:41 Reply Quote 0
                      • A
                        Applepie2 @mitu
                        last edited by 22 Dec 2022, 14:41

                        @mitu Perfect! That's solved it! Everything works brilliantly now, thanks again so much for all your help!

                        1 Reply Last reply Reply Quote 1
                        25 out of 25
                        • First post
                          25/25
                          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.

                          This community forum collects and processes your personal information.
                          consent.not_received