Dolphin, the GameCube and Wii emulator - Forums

Full Version: No controllers listed under devices Linux
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I am running dolphin 4.0-5456 on ubuntu 14.04 and I cannot find any of my connected controllers.

I am using playstation 2 controllers connected to a playstation 2 to usb adapter.

I tested with jstest-gtk and that is able to recognize both controllers and all the joysticks and buttons, so I know they are being registered by linux.

I know they are under /dev/input/js0 and js1 however there are also event0-12 in there as well.

I tried installing xboxdrv too see if that would help but still nothing showing up in dolphin other than Xlib/0/Keyboard Mouse and Xinput2//Virtual core pointer

is there anyway I can get dolphin to recognize my controllers?


My solution, which isn't really a solution but it worked for me was to run debian instead of ubuntu.
I was running Openelec and a debian chroot in order to get the needed libraries, the controllers were not being recognized by the ubuntu chroot.
I think the real reson for the difference was in ubuntu I was using ubuntu's SDL lib and in debian, when building dolphin, there was no SDL li, so dolphin used its own.
what Does /proc/bus/input/devices show, do you see your device in there? Its ok to have events there. Any evdev that has a ABS_X (Absolute X) should get a joystick device when joydev is loaded. If you unplug it does js0 or js1 go a way?
(02-13-2015, 05:49 AM)ulao Wrote: [ -> ]what Does /proc/bus/input/devices show, do you see your device in there? Its ok to have events there. Any evdev that has a ABS_X (Absolute X) should get a joystick device when joydev is loaded.  If you unplug it does js0 or js1 go a way?


This is the complete output of cat /proc/bus/input/devices


You can see below my two controllers as js0 and js1


js0 and js1 go away when I unplug

What happens when you run evtest/jstest and move the joystick and press buttons.

evtest /dev/input/event4
or
evtest /dev/input/event3


and like wise

jstest /dev/input/js0
or
jstest /dev/input/js1


If both show output and Dolphin just does not list the js's then use Xboxdrv mapping.

set the event to map, and then map all the buttons analogs.
example.
./xboxdrv --ui-clear \
--evdev /dev/input/event3\
--evdev-keymap BTN_A=a,BTN_B=b,BTN_C=x,BTN_X=y \
--evdev-absmap ABS_X=x1,ABS_Y=y1 \
\
--ui-buttonmap a=BTN_A,b=BTN_B,x=BTN_X,y=BTN_Y \
--ui-axismap x1=ABS_X,y1=ABS_Y

You can run this on boot or something to get by until a dev or another comments on the Dolphin issue.
I did at one point follow the tutorial here,
https://steamcommunity.com/app/221410/discussions/0/558748653738497361/

But I will try remapping the inputs. Once I do map them in xboxdrv they will show up in dolphin?
I know for a fact they show up in 4 of the joy stick GUI test app when I had to do that for an unrelated reason. I believe there is a good chance that will get you working. Though its very strange they dont show up in your GUI test apps if it works on the command line JStest. You never commented on that.
So I re-walked through that link I showed in my last post, and then followed your example, but still I am not getting anything in dolphin.

The command I sent
Code:
xboxdrv --ui-clear --evdev /dev/input/event3 --evdev-keymap BTN_THUMB2=a,BTN_THUMB=b,BTN_TOP=x,BTN_TRIGGER=y,BTN_BASE3=back,BTN_BASE4=start,BTN_BASE=lb,BTN_BASE2=rb,BTN_TOP2=lt,BTN_PINKIE=rt,BTN_BASE5=tl,BTN_BASE6=tr --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RZ=x2,ABS_Z=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y --axismap -Y1=Y1,-Y2=Y2 --ui-buttonmap a=BTN_THUMB2,b=BTN_THUMB,x=BTN_TOP,y=BTN_TRIGGER,start=BTN_BASE4,back=BTN_BASE3,rb=BTN_BASE2,rt=BTN_PINKIE,lb=BTN_BASE,lt=BTN_TOP2,tr=BTN_BASE6,tl=BTN_BASE5 --ui-axismap dpad_x=ABS_HAT0X,dpad_y=ABS_HAT0Y,x1=ABS_X,y1=ABS_Y,y2=ABS_Z,x2=ABS_RZ  --silent

The output
Code:
xboxdrv 0.8.5 - http://pingus.seul.org/~grumbel/xboxdrv/
Copyright © 2008-2011 Ingo Ruhnke <grumbel@gmx.de>
Licensed under GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain
conditions; see the file COPYING for details.


Your Xbox/Xbox360 controller should now be available as:
 /dev/input/js2
 /dev/input/event13

Press Ctrl-c to quit

I press ctrl-c and try dolphin, but I don't get anything other than the keyboard and virtual core pointer in the dolphin devices.

I try running xboxdrv again but it doesn't show any controllers connected.

I probably should have stated this in the beginning, but I am running ubuntu through a chroot on top of openelec
(02-14-2015, 03:18 AM)ulao Wrote: [ -> ]I know for a fact they show up in 4 of the joy stick GUI test app when I had to do that for an unrelated reason. I believe there is a good chance that will get you working. Though its very strange they dont show up in your GUI test apps if it works on the command line JStest. You never commented on that.

No they DO show up in jstest-gtk

they also work in the CLI test jstest and evtest
Ok then its more of a Dolpinh issue... unless the chroot is denying access that Dolphin needs? I'm not sure if running on an embedded environment has any effect on things but it could.

Dont hit CNTL - c, test in dolphin while its running. See if js2 in in there. This is just a patch/work around.
So I left xboxdrv running and opened dolphin, still nothing else showed up in the devices dropdown. without closing xboxdrv I opened jstest-gtk and it showed the new input that xboxdrv created and both jstest and evtest worked on js2 and event13. However, I looked at /proc/bus/input/devices and neither js2 or event13 were shown.

when looking at the xboxdrv manpage, I saw this instruction but I don't know how I would go about doing that.
Quote:As  a  regular  PC  joystick  will  most likely already create a
             /dev/input/jsX device by itself, you might need to  get  rid  of
             that  so  that  a  game will properly detect the joystick device
             created by xboxdrv. The easiest way to  accomplish  that  is  to
             simply  delete  the  old  joystick  and  rename  the device that
             xboxdrv created to  /dev/input/js0.  When  you  use  udev,  this
             operation  should  be  harmless and automatically reverse itself
             when you remove the controller and plug it back in or  when  you
             reboot the computer.
Pages: 1 2