xboxdrv not working through runcommand-onstart.sh but does from ssh
-
Hi guys!
I'm trying to follow the xboxdrv example on the wiki:
https://github.com/RetroPie/RetroPie-Setup/wiki/Universal-Controller-Calibration-&-Mapping-Using-xboxdrvFirst problem is that the sample doesn't seem to work as-is.
Simplifying one of the commands to just:
basicPS3="sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv --evdev /dev/input/event3 --detach-kernel-driver --evdev-keymap BTN_BASE5=l2,BTN_BASE6=r2 --ui-buttonmap l2=KEY_RIGHTBRACE,r2=KEY_6" joycommand="$basicPS3 &" eval $joycommand
Doesn't work. If you remove the ">/dev/null" redirect you see it seems the eval chokes on the arguments
It does load fine if I don't use eval and just call it direct, but it doesn't respond to the button presses:
#!/bin/bash sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv --evdev /dev/input/event3 --detach-kernel-driver --evdev-keymap BTN_BASE5=l2,BTN_BASE6=r2 --ui-buttonmap l2=KEY_RIGHTBRACE,r2=KEY_6 &
I'm using a remote putty ssh session to see if xboxdrv starts and it does, so I know it's running.
However, If I don't run through the script, but instead manually run it from the remote ssh session, using the exact same command, everything works as expected. The buttons map correctly to keyboard commands.
I'm currently testing with a stock 4.4 build on RPi3.
Did some searching but didn't seem to find anyone else having an issue with this.Any ideas?
-
@dsstrainer said in xboxdrv not working through runcommand-onstart.sh but does from ssh:
Any ideas?
Don't use
eval
and just start the command directly ? -
@mitu said in xboxdrv not working through runcommand-onstart.sh but does from ssh:
@dsstrainer said in xboxdrv not working through runcommand-onstart.sh but does from ssh:
Any ideas?
Don't use
eval
and just start the command directly ?Yea I think you didn't read the rest of my post
-
@dsstrainer said in xboxdrv not working through runcommand-onstart.sh but does from ssh:
Yea I think you didn't read the rest of my post
Yes, you're right :). I need to get some coffee.
-
Still getting nowhere with this.
I've got it down to this command:
sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv --evdev /dev/input/event3 --detach --evdev-keymap BTN_BASE5=l2,BTN_BASE6=r2 --ui-buttonmap l2=KEY_RIGHTBRACE,r2=KEY_6
Works perfectly if i run it in a remote ssh session before starting the game. Here is what it looks like in ps -ef | grep xboxdrv
root 12033 11480 0 01:52 pts/2 00:00:00 sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv --evdev /dev/input/event3 --detach --evdev-keymap BTN_BASE5=l2,BTN_BASE6=r2 --ui-buttonmap l2=KEY_RIGHTBRACE,r2=KEY_6 root 12037 12033 2 01:52 pts/2 00:00:00 /opt/retropie/supplementary/xboxdrv/bin/xboxdrv --evdev /dev/input/event3 --detach --evdev-keymap BTN_BASE5=l2,BTN_BASE6=r2 --ui-buttonmap l2=KEY_RIGHTBRACE,r2=KEY_6
But if I run the same command through runcommand-onstart.sh, It starts fine and the ps command shows the same results. I see it say "Xbox userspace driver loaded blah blah" in the yellow font at the bottom of the screen after startinge the rom. So I know its loading and it seems like it should work. But the buttons do not do what I expect. If i do evtest on the new userspace events, it shows the button is triggering correctly. It's just not doing what it should in the game.
root 12196 1 0 01:53 tty1 00:00:00 sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv --evdev /dev/input/event3 --detach --evdev-keymap BTN_BASE5=l2,BTN_BASE6=r2 --ui-buttonmap l2=KEY_RIGHTBRACE,r2=KEY_6 root 12216 12196 1 01:53 tty1 00:00:00 /opt/retropie/supplementary/xboxdrv/bin/xboxdrv --evdev /dev/input/event3 --detach --evdev-keymap BTN_BASE5=l2,BTN_BASE6=r2 --ui-buttonmap l2=KEY_RIGHTBRACE,r2=KEY_6
Any other ideas? Anyone have a successful xboxdrv start script of any kind?
I am going to try loading it with autostart before emulationstation loads and see if it works that way. -
Also it does seem to start 2 copies of itself.. one with sudo, one without... but I don't think that matters as it happens in either case.
-
Starting to see a pattern actually that it only works if I run it from the remote ssh connection AFTER the game starts. Can't remember if that was always the case but perhaps I can add some delayed start to a script so that it runs in the bg after the rom loads.
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.