You are not logged in.
Pages: 1
If I test js0 or js1 with jstest they work just fine, but since udev does't detect them I can't use them with sdl2. (mame in this case)
Any idea?
/dev/input
by-id/ event0 event10 event12 event14 event2 event4 event6 event8 js0 mice
by-path/ event1 event11 event13 event15 event3 event5 event7 event9 js1 mouse0
js0 - js1 - event 14 - event15
/dev/input/by-id/
lrwxrwxrwx 1 root root 10 Jun 26 19:24 usb-INNEX_SNES_Controller_USB-event-if00 -> ../event14
lrwxrwxrwx 1 root root 10 Jun 26 19:24 usb-INNEX_SNES_Controller_USB-event-if01 -> ../event15
lrwxrwxrwx 1 root root 9 Jun 26 13:51 usb-Logitech_Optical_USB_Mouse-event-mouse -> ../event1
lrwxrwxrwx 1 root root 9 Jun 26 13:51 usb-Logitech_Optical_USB_Mouse-mouse -> ../mouse0
/dev/input/by-path/
lrwxrwxrwx 1 root root 9 Jun 26 13:51 pci-0000:00:16.0-usb-0:1:1.0-event-mouse -> ../event1
lrwxrwxrwx 1 root root 9 Jun 26 13:51 pci-0000:00:16.0-usb-0:1:1.0-mouse -> ../mouse0
lrwxrwxrwx 1 root root 10 Jun 26 19:24 pci-0000:02:00.0-usb-0:1.3:1.0-event -> ../event14
lrwxrwxrwx 1 root root 10 Jun 26 19:24 pci-0000:02:00.0-usb-0:1.3:1.1-event -> ../event15
lrwxrwxrwx 1 root root 9 Jun 26 13:51 platform-pcspkr-event-spkr -> ../event4
dmesg
[ +0.110799] input: INNEX SNES Controller USB as /devices/pci0000:00/0000:00:09.0/0000:02:00.0/usb2/2-1/2-1.3/2-1.3:1.0/0003:1292:5366.0014/input/input29
[ +0.000285] hid-generic 0003:1292:5366.0014: input,hidraw1: USB HID v1.00 Gamepad [INNEX SNES Controller USB] on usb-0000:02:00.0-1.3/input0
[ +0.007520] input: INNEX SNES Controller USB as /devices/pci0000:00/0000:00:09.0/0000:02:00.0/usb2/2-1/2-1.3/2-1.3:1.1/0003:1292:5366.0015/input/input30
[ +0.000301] hid-generic 0003:1292:5366.0015: input,hidraw2: USB HID v1.00 Joystick [INNEX SNES Controller USB] on usb-0000:02:00.0-1.3/input1
Offline
It seems to me udev is working just fine, what do you think creates all those symlinks in /dev/input/by-id/ and /dev/input/by-path/?
I'd say your problem is somewhere else.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
@R00KIE But I find that when I connect another controller that works with sdl2, it shows the following :
╰─$ ls /dev/input/by-path/ -la
total 0
drwxr-xr-x 2 root root 140 Jun 27 11:55 ./
drwxr-xr-x 4 root root 440 Jun 27 11:55 ../
lrwxrwxrwx 1 root root 9 Jun 27 11:52 pci-0000:00:16.0-usb-0:1:1.0-event-mouse -> ../event1
lrwxrwxrwx 1 root root 9 Jun 27 11:52 pci-0000:00:16.0-usb-0:1:1.0-mouse -> ../mouse0
lrwxrwxrwx 1 root root 9 Jun 27 11:55 pci-0000:02:00.0-usb-0:1.3:1.0-event-joystick -> ../event2
lrwxrwxrwx 1 root root 6 Jun 27 11:55 pci-0000:02:00.0-usb-0:1.3:1.0-joystick -> ../js0
lrwxrwxrwx 1 root root 9 Jun 27 11:52 platform-pcspkr-event-spkr -> ../event6
╰─$ ls /dev/input/by-id/ -la
total 0
drwxr-xr-x 2 root root 120 Jun 27 11:55 ./
drwxr-xr-x 4 root root 440 Jun 27 11:55 ../
lrwxrwxrwx 1 root root 9 Jun 27 11:52 usb-Logitech_Optical_USB_Mouse-event-mouse -> ../event1
lrwxrwxrwx 1 root root 9 Jun 27 11:52 usb-Logitech_Optical_USB_Mouse-mouse -> ../mouse0
lrwxrwxrwx 1 root root 9 Jun 27 11:55 usb-Logitech_Wireless_Gamepad_F710_43A090A5-event-joystick -> ../event2
lrwxrwxrwx 1 root root 6 Jun 27 11:55 usb-Logitech_Wireless_Gamepad_F710_43A090A5-joystick -> ../js0
As you can see, it creates a event-joystick and joystick symlinks.
Offline
You might want to investigate which udev rule is responsible for that then, I'd guess it would be 60-persistent-input.rules which seems to be a catch all/generic rule. You will have to compare both your gamepads and what the rule is expecting and see if you spot a difference that might explain why for one of them some symlinks are not created.
Another thing I would test is if deleting the js/event symlinks for the F710 gamepad will make it stop working with sdl2, take this as a sanity check just in case the symlinks don't matter and sdl2 enumerates/finds joysticks some other way, in which case the problem would be somewhere else.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Another thing I would test is if deleting the js/event symlinks for the F710 gamepad will make it stop working with sdl2, take this as a sanity check just in case the symlinks don't
matter and sdl2 enumerates/finds joysticks some other way, in which case the problem would be somewhere else.
Yep. you were right. I deleted all the symlinks and it keeps working just fine. I don't know where to start looking for the other controllers. Right now I'm using Mame with wine, since "wine controller" works just fine.
Offline
I don't know where to start looking for the other controllers.
Strace the sdl client, grep for "open".
Offline
I don't know where to start looking for the other controllers.
Strace the sdl client, grep for "open".
Ok, did the strace and filter for open:
https://pastebin.com/DYR0bm3p [Joystick that works]
The event device is event2 in both cases.
I don't know what should I look for, I mean, I can see that there is a "Read Only" message, but it shows to the working controller too.
Offline
I might compare the output of 'udevadm info -a /dev/xyz' (point it a the js/event file of both gamepads) and see if you can spot any differences besides the obvious such as names, vid, pid. There must be a reason why udev doesn't create the symlinks and know why might help find out why it doesn't work for sdl2.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
I might compare the output of 'udevadm info -a /dev/xyz' (point it a the js/event file of both gamepads) and see if you can spot any differences besides the obvious such as names, vid, pid. There must be a reason why udev doesn't create the symlinks and know why might help find out why it doesn't work for sdl2.
Ok, I just did that, and the output looks almost the same.
The only diffenrece can be spoted in this image:
And I presume that the difference is because it's not one controller, but two. So that's why it has another extra parent.
Pd: and the driver ofcourse it's different, since one uses xpad, and the other one usbhid
Last edited by forbi (2017-06-27 21:48:37)
Offline
Failing device:
open("/sys/devices/pci0000:00/0000:00:09.0/0000:02:00.0/usb2/2-1/2-1.3/2-1.3:1.0/0003:1292:5366.000C/input/input22/js0/uevent", O_RDONLY|O_CLOEXEC) = 11
open("/sys/devices/pci0000:00/0000:00:09.0/0000:02:00.0/usb2/2-1/2-1.3/2-1.3:1.1/0003:1292:5366.000D/input/input23/js1/uevent", O_RDONLY|O_CLOEXEC) = 11 # couple of times
Working device:
open("/sys/devices/pci0000:00/0000:00:09.0/0000:02:00.0/usb2/2-1/2-1.3/2-1.3:1.0/input/input21/js0/uevent", O_RDONLY|O_CLOEXEC) = 11 # couple of times
open("/dev/input/js0", O_RDONLY) = 9
Smells a bit as if SDL is confused by the second device?
Is that one of those gamepads that you can daisychain? (Ie attach a second pad and link that through)?
Offline
Failing device:
open("/sys/devices/pci0000:00/0000:00:09.0/0000:02:00.0/usb2/2-1/2-1.3/2-1.3:1.0/0003:1292:5366.000C/input/input22/js0/uevent", O_RDONLY|O_CLOEXEC) = 11
open("/sys/devices/pci0000:00/0000:00:09.0/0000:02:00.0/usb2/2-1/2-1.3/2-1.3:1.1/0003:1292:5366.000D/input/input23/js1/uevent", O_RDONLY|O_CLOEXEC) = 11 # couple of timesWorking device:
open("/sys/devices/pci0000:00/0000:00:09.0/0000:02:00.0/usb2/2-1/2-1.3/2-1.3:1.0/input/input21/js0/uevent", O_RDONLY|O_CLOEXEC) = 11 # couple of times
open("/dev/input/js0", O_RDONLY) = 9Smells a bit as if SDL is confused by the second device?
Is that one of those gamepads that you can daisychain? (Ie attach a second pad and link that through)?
It's this thing;
Offline
Do you have one or two gamepads attached? Tried swapping slots?
Offline
Do you have one or two gamepads attached? Tried swapping slots?
I have two, but I tried every combination, 1, 2, switch, etc. It works for everything, but for SDL.
Offline
You could try asking in the sdl mailing list. They should be able to ask the correct questions and point you in the right direction.
You already have a good amount of information from what you've tried and what you know, just gather everything and ask. Maybe they know of a similar problem and possible workarounds or maybe it could be a simple fix once they figure out what the problem is and what to fix.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Pages: 1