Failure to boot with xboxdrv initialisation in rc.local
-
@Applepie2 said in Failure to boot with xboxdrv initialisation in rc.local:
Could it be that the start up process is locked waiting for this interrupt?
Maybe, though I'd expect using either
&
ornohup
to fix this, since they send the process to run in the background.Now that I have a PI available, I've tried to run the command and I think you've missed a line continuation after the
--evdev-absmap
parameter... --device-name "ApplePi Controller" \ --evdev-absmap ABS_RZ=x1,ABS_Z=y1,ABS_Y=x2,ABS_X=y2 ...
should be
--device-name "ApplePi Controller" \ --evdev-absmap ABS_RZ=x1,ABS_Z=y1,ABS_Y=x2,ABS_X=y2 \
Try adding the missing
\
and run the command again from/etc/rc.local
. -
Added the missing the line continuation and checked all other lines to ensure there were no other
\
missing.Sadly still hangs at the same place.
-
@Applepie2 you had one more line continuation missing (for the
--calibration
param), but I assume you found it and fixed it.
What happens if you run the command directly, instead of using/etc/rc.local
? E.g.nohup sudo xboxdrv ...
- do you get the control back or it's still blocking the input ? -
If I run it directly, then it does return control.
-
I don't see why it wouldn't work also in
/etc/rc.local
. As an alternative, try adding it to the autostart script in/opt/retropie/configs/all/autostart.sh
, beforeemulationstation
is run. Try with:sudo xboxdrv --.. --ui-buttonmap tr=void,tl=void,lb=void,rb=void,guide=void \ & emulationstation #auto
-
I've tried moving the command to the autostart script
autostart.sh
, and although I now boot successfully, I don't think the command is running successfully as the controller seems to still be behaving as it was before mapping, and when loading games it still references the "Teensyduino_Keyboard_Mouse_Joystick" rather than "ApplePi Controller".I've double checked all the spelling, line continuations and everything seems fine.
My command hasn't changed, except I replaced the
nohup opt/retropie/supplementary/xboxdrv/bin/xboxdrv \
with just
sudo xboxdrv \
And I added the extra line continuation
\
and final&
back in.Is
sudo xboxdrv
enough of a path from the autostart script? -
@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
. -
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? -
@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 -
@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 tojs3
, 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 withls /dev/input/js*
then onlyjs0
,js1
andjs2
are shown. Equally if I try to runjstest
onjs3
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 runjstest
onjs3
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? -
@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.
Runemulationstation
with the--debug
parameter and post the log, it should show the controller(s) it detects. Try to configure the gamepad and then exit (pressF4
).In addition to the log from EmulationStation, please post the output of
cat /proc/bus/input/devices
afterxboxdrv
has been started. -
@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?
-
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!
-
@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). -
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
andApplePi 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.
-
@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. -
@mitu Perfect! That's solved it! Everything works brilliantly now, thanks again so much for all your help!
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.