OpenBVE
OpenBVE copied to clipboard
Is Ubuntu 20.04 not detect Densha de GO! controller?
Description
When I install driver to /lib/udev/rules.d, but not detect. Copy 99-ps2-train-controllers.rules and PC restart, but not detect.
[email protected]$ pwd
/lib/udev/rules.d
[email protected]$ ls | grep 99-ps2
99-ps2-train-controllers.rules
dmesg
[ 267.587909] usb 1-6.1: Product: TAITO_DENSYA_CON_T01
[ 267.587910] usb 1-6.1: Manufacturer: TAITO
[ 267.587911] usb 1-6.1: SerialNumber: TCPP20010
[ 267.609170] usb 1-6.3: USB disconnect, device number 9
[ 268.067960] usb 1-6.3: new full-speed USB device number 11 using xhci_hcd
[ 268.514996] usb 1-6.3: New USB device found, idVendor=0853, idProduct=011b, bcdDevice= 0.01
libusb1.0
[email protected]$ apt list | grep libusb-1.0
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libusb-1.0-0-dev/focal 2:1.0.23-2build1 amd64
libusb-1.0-0-dev/focal 2:1.0.23-2build1 i386
libusb-1.0-0/focal,now 2:1.0.23-2build1 amd64 [インストール済み、自動]
libusb-1.0-0/focal,now 2:1.0.23-2build1 i386 [インストール済み、自動]
libusb-1.0-doc/focal,focal 2:1.0.23-2build1 all
Reproduction
This issue is not data. So, no information.
Route
This is not use Route.
Train
This is not use Train.
Logs
This is not data. So, no logs.
Related information
My PC's spec: OS:Ubuntu 20.04 LTS 64bit CPU:AMD® Ryzen 7 2700x eight-core processor × 16 Memory:31.3GB Graphic:AMD Radeon RX 590 Series (POLARIS10, DRM 3.40.0, 5.11.0-40-generic, LLVM 12.0.0)
@MarcRiera this is your ballpark :)
Sorry for the late reply!
The output from dmesg seems OK, but only the first three lines are relevant. The last three are from an unrelated device (a keyboard). libusb seems properly installed as well.
Could you please install usbutils
and run usbhid-dump -m 0ae4:0004 -f -e stream
with the controller connected? You should get the raw input from the controller and the bytes should change if you move the handles or press the buttons.
Thank you for your support. This is results.
user@~$ apt list | grep usbutils
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
usbutils/focal,now 1:012-2 amd64 [インストール済み]
usbutils/focal 1:012-2 i386
user@~$ usbhid-dump -m 0ae4:0004 -f -e stream
Starting dumping interrupt transfer stream
with 1 minute timeout.
001:020:000:STREAM 1638631108.852207
01 00 00 00 00 00
.001:020:000:STREAM 1638631108.868210
01 00 00 00 08 00
.001:020:000:STREAM 1638631108.884210
01 AF 00 00 08 00
.001:020:000:STREAM 1638631108.900207
01 AF 81 FF 08 00
.001:020:000:STREAM 1638631110.789045
01 8A 81 FF 08 00
.001:020:000:STREAM 1638631110.804445
01 FF 81 FF 08 00
.001:020:000:STREAM 1638631110.820440
01 79 81 FF 08 00
.001:020:000:STREAM 1638631111.877732
01 FF 81 FF 08 00
.001:020:000:STREAM 1638631111.893229
01 8A 81 FF 08 00
.001:020:000:STREAM 1638631111.925233
01 FF 81 FF 08 00
.001:020:000:STREAM 1638631111.940574
01 94 81 FF 08 00
.001:020:000:STREAM 1638631111.989336
01 FF 81 FF 08 00
.001:020:000:STREAM 1638631112.229277
01 9A 81 FF 08 00
.001:020:000:STREAM 1638631112.292621
01 FF 81 FF 08 00
.001:020:000:STREAM 1638631112.324614
01 A2 81 FF 08 00
.001:020:000:STREAM 1638631112.373282
01 FF 81 FF 08 00
.001:020:000:STREAM 1638631112.389282
01 A8 81 FF 08 00
.001:020:000:STREAM 1638631112.484618
01 FF 81 FF 08 00
.001:020:000:STREAM 1638631112.580641
01 B2 81 FF 08 00
.001:020:000:STREAM 1638631112.628650
01 FF 81 FF 08 00
.001:020:000:STREAM 1638631112.757475
01 B9 81 FF 08 00
.001:020:000:STREAM 1638631112.788660
01 FF 81 FF 08 00
.001:020:000:STREAM 1638631112.836673
01 B9 81 FF 08 00
.001:020:000:STREAM 1638631113.796799
01 FF 81 FF 08 00
.001:020:000:STREAM 1638631113.876797
01 A8 81 FF 08 00
.001:020:000:STREAM 1638631113.892798
01 FF 81 FF 08 00
.001:020:000:STREAM 1638631113.941588
01 9A 81 FF 08 00
.001:020:000:STREAM 1638631113.956787
01 FF 81 FF 08 00
.001:020:000:STREAM 1638631114.005800
01 94 81 FF 08 00
.001:020:000:STREAM 1638631114.020806
01 FF 81 FF 08 00
.001:020:000:STREAM 1638631114.036810
01 8A 81 FF 08 00
.001:020:000:STREAM 1638631114.084806
01 FF 81 FF 08 00
.001:020:000:STREAM 1638631114.100825
01 79 81 FF 08 00
.001:020:000:STREAM 1638631114.452857
01 79 FF FF 08 00
.001:020:000:STREAM 1638631114.484845
01 79 6D FF 08 00
.001:020:000:STREAM 1638631114.564868
01 79 FF FF 08 00
.001:020:000:STREAM 1638631114.580855
01 79 54 FF 08 00
.001:020:000:STREAM 1638631114.677978
01 79 FF FF 08 00
.001:020:000:STREAM 1638631114.692900
01 79 3F FF 08 00
.001:020:000:STREAM 1638631114.772916
01 79 FF FF 08 00
.001:020:000:STREAM 1638631114.789613
01 79 21 FF 08 00
.001:020:000:STREAM 1638631114.868900
01 79 FF FF 08 00
.001:020:000:STREAM 1638631114.900914
01 79 00 FF 08 00
.001:020:000:STREAM 1638631115.396963
01 79 FF FF 08 00
.001:020:000:STREAM 1638631115.412986
01 79 21 FF 08 00
.001:020:000:STREAM 1638631115.492998
01 79 FF FF 08 00
.001:020:000:STREAM 1638631115.508988
01 79 3F FF 08 00
.001:020:000:STREAM 1638631115.556999
01 79 FF FF 08 00
.001:020:000:STREAM 1638631115.572988
01 79 54 FF 08 00
.001:020:000:STREAM 1638631115.637012
01 79 FF FF 08 00
.001:020:000:STREAM 1638631115.652996
01 79 6D FF 08 00
.001:020:000:STREAM 1638631115.717016
01 79 FF FF 08 00
.001:020:000:STREAM 1638631115.733011
01 79 81 FF 08 00
.001:020:000:STREAM 1638631116.773946
01 79 81 FF 08 08
.001:020:000:STREAM 1638631116.965168
01 79 81 FF 08 00
.001:020:000:STREAM 1638631117.077181
01 79 81 FF 08 02
.001:020:000:STREAM 1638631117.301193
01 79 81 FF 08 00
.001:020:000:STREAM 1638631117.413188
01 79 81 FF 08 04
.001:020:000:STREAM 1638631117.621233
01 79 81 FF 08 00
.001:020:000:STREAM 1638631117.749935
01 79 81 FF 08 01
.001:020:000:STREAM 1638631117.990261
01 79 81 FF 08 00
.001:020:000:STREAM 1638631118.310026
01 79 81 FF 08 20
.001:020:000:STREAM 1638631118.549353
01 79 81 FF 08 00
.001:020:000:STREAM 1638631118.677364
01 79 81 FF 08 10
.001:020:000:STREAM 1638631118.918092
01 79 81 FF 08 00
.001:020:000:STREAM 1638631119.109418
01 79 81 FF 02 00
.001:020:000:STREAM 1638631119.317434
01 79 81 FF 08 00
.001:020:000:STREAM 1638631119.445455
01 79 81 FF 00 00
.001:020:000:STREAM 1638631119.685461
01 79 81 FF 08 00
.001:020:000:STREAM 1638631119.782115
01 79 81 FF 06 00
.001:020:000:STREAM 1638631120.006284
01 79 81 FF 08 00
.001:020:000:STREAM 1638631120.085525
01 79 81 FF 04 00
.001:020:000:STREAM 1638631120.469574
01 79 81 FF 08 00
.001:020:000:STREAM 1638631120.805615
01 79 81 FF 00 00
.001:020:000:STREAM 1638631121.030279
01 79 81 FF 08 00
.001:020:000:STREAM 1638631121.078274
01 79 81 FF 00 00
.001:020:000:STREAM 1638631121.190388
01 79 81 FF 08 00
.001:020:000:STREAM 1638631121.253660
01 79 81 FF 00 00
.001:020:000:STREAM 1638631121.366716
01 79 81 FF 08 00
.001:020:000:STREAM 1638631121.430297
01 79 81 FF 00 00
.001:020:000:STREAM 1638631121.526233
01 79 81 FF 08 00
.001:020:000:STREAM 1638631121.590373
01 79 81 FF 00 00
.001:020:000:STREAM 1638631121.685695
01 79 81 FF 08 00
.001:020:000:STREAM 1638631121.766619
01 79 81 FF 00 00
.001:020:000:STREAM 1638631121.893724
01 79 81 FF 08 00
.001:020:000:STREAM 1638631122.085724
01 79 81 FF 04 00
.001:020:000:STREAM 1638631122.278239
01 79 81 FF 08 00
.001:020:000:STREAM 1638631122.421757
01 79 81 FF 06 00
.001:020:000:STREAM 1638631122.598519
01 79 81 FF 08 00
.001:020:000:STREAM 1638631122.742521
01 79 81 FF 02 00
.001:020:000:STREAM 1638631122.998276
01 79 81 FF 08 00
.^C
user@~$
I connected and moved the buttons, brakes and mascon. How is it?
@ginga81 Everything looks correct. You got results running the command without sudo, so that confirms the udev rules are working.
I assume you are running the latest version of OpenBVE (1.8.2.1)? Support for the PS2 controllers was added later than other controllers. Also remember that you need to select the correct device in the settings of DenshaDeGoInput if it is the first time or if you used a different model before.
If it is still not working, I will try to bypass USB to a virtual machine and see if I can recreate the bug.
I know that when we change the device, the setting dialog's upper right shows list and have to change. So, I was tested Ryojou-hen controller at the first support time.
But, this time, when I connect and show setting dialog, do not list. So I confused.
Only one of change, I changed the OS from 18.04 to 20.04. And I change from HDD to SSD. But I think this is not effect.
OpenBVE's version is currently 1.8.2.1.
I have recreated the bug in a virtual machine with Ubuntu 20.04 and USB redirection. Everything seems fine, yet OpenBVE does not detect the controller. If I run OpenBVE from a terminal, there is an exception:
at MonoLibUsb.MonoUsbSessionHandle..ctor () [0x00043] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at MonoLibUsb.MonoUsbEventHandler.Init (MonoLibUsb.UnixNativeTimeval unixNativeTimeval) [0x0001b] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at MonoLibUsb.MonoUsbEventHandler.Init () [0x00005] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at MonoLibUsb.MonoUsbApi.InitAndStart () [0x00008] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at LibUsbDotNet.LudnMonoLibUsb.MonoUsbDevice.get_MonoUsbDeviceList () [0x00010] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at LibUsbDotNet.Main.LegacyUsbRegistry.get_DeviceList () [0x0000d] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at LibUsbDotNet.UsbDevice.get_AllLibUsbDevices () [0x00099] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at LibUsbDotNet.UsbDevice.get_AllDevices () [0x00042] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at LibUsbDotNet.UsbDevice.OpenUsbDevice (System.Predicate`1[T] findDevicePredicate) [0x00000] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at LibUsbDotNet.UsbDevice.OpenUsbDevice (LibUsbDotNet.Main.UsbDeviceFinder usbDeviceFinder) [0x00000] in <860e43ad45e14d59bf62e8efe5c0922a>:0
at DenshaDeGoInput.LibUsb.CheckConnectedControllers () [0x00045] in <4f74c32d51924588b7d9d2424373ca7e>:0
I need to investigate further...
That looks like something has regressed in Mono. Having said that, the version of libusb we're pulling in is three years old, and might be bugged.
First obvious point of call is probably to try bumping libusb to the latest prerelease version from Nuget & seeing if that helps. Will try and run off a build tomorrow or Wednesday with that in and see if it helps. As it's a generic error enumerating USB stuff, I might be able to reproduce too without one of these :)
@leezer3 The exception can be recreated simply by enabling the plugin, no need to have anything connected. It's an enumeration error when first checking if there's anything connected.
The required symlink for libusb is missing, which is what causes the error: https://github.com/LibUsbDotNet/LibUsbDotNet#linux-users
Fixing that will probably make things work. (I get the suspicion that this has always been required on Ubuntu, but you may have overlooked it on upgrade)
I ran these commands and it was recognized!
However, the lever does not move as I expected it have to move many times, and the movement is sluggish.
Have you tried in game?
We did a bunch of work to make the form work better (to do with a looping input thread as opposed to using the WinForms) and in-game was always better. This may have regressed :/
Yes, I played. The response speed is very slow, and can not set the correctly lever position. To set, I have to move a lot of, so I need luck for set.