RPCS3 / rpcs3

PlayStation 3 emulator and debugger
https://rpcs3.net/
GNU General Public License v2.0
15.65k stars 1.92k forks source link

"sys_usbd: Transfer Error: 4" for GIMX simulated Logitech G27 device #15565

Closed ikt32 closed 6 months ago

ikt32 commented 6 months ago

Quick summary

An attempt to play Gran Turismo 6 (BCES01893) with a simulated G27 was made. When the game is started, sysusb_d throws a transfer error (4). Subsequently, no wheel inputs seem to be received by the game.

Details

I'm trying to use my Fanatec wheel setup in RPCS3, and intended to achieve this through the GIMX software, which ties together multiple discrete inputs into one device - a G27 in my case. I've set up the hardware and GIMX software, successfully configured and calibrated the inputs and axes, and verified functionality through the Logitech software and Windows software, before installing the Zadig driver as laid out by the Wiki.

The device PID looks fine (C29B) and the RPCS3 log also seems to recognize the device:

·S 0:16:49.812158 sys_usbd: Found device: lgFF_c283_c29b ·S 0:17:52.377040 {PPU[0x1000000] Thread (main_thread) [libusbd: 0x01ac6e2c]} sys_usbd: USB device(VID=0x046d, PID=0xc29b) matches up with LDD , assigned as handled_device=0x1

And the pad configuration does show a reserved input:

20240507214357734_rpcs3

When the game actually starts, after the PPU stuff compiled, the following error/warning can be seen in the log:

·E 0:17:52.451885 {Usb Manager Thread} sys_usbd: Transfer Error: 4 ·W 0:17:52.452778 {Usb Manager Thread} sys_usbd: USB transfer failed, detach the device 1

In the GIMX software, it can be seen that a few bytes have been received, indicating some communication happening:

20240507214935269_gimx

The content (2 bytes, 0x03 and 0x00) seem to be consistent over various runs.

If I'm reading the error right, it could be a LIBUSB_TRANSFER_STALL. Not sure if it's something in my setup that could cause this, or something in RPCS3 is not working quite right. There are similar setups that seem to work fine, so maybe it's worth taking a look at.

Attach a log file

RPCS3.c29b.log

Attach capture files for visual issues

No response

System configuration

Windows 10 (19045.4355) Fanatec CSL DD, Fanatec CS Steering Wheel RS, Fanatec CSL Pedals, SHH NEWT Shifter - all feeding into GIMX GIMX adapter built with CP2102 USB-Serial adapter and Pro Micro - appearing as Logitech G27 and working fine before attempting Zadig driver and RPCS3

Other details

Improved adapter config (shorter/better cables, even increase CP2102 baud rate from 500K to 2M), but still same transfer error.

Sadly no real G27 (or PS3) to test with, so I can't exclude my setup from causing the issue...

GIMX-G27 does work fine on other (Windows) clients, so I'm inclined to believe the fake G27 works as a normal G27 should.

ikt32 commented 6 months ago

I've made another log with Log: {sys_usbd: Trace}, which hopefully contains something useful.

RPCS3.log

RipleyTom commented 6 months ago

It sends a GET_STATUS Interface request to the device( see https://www.beyondlogic.org/usbnutshell/usb6.shtml for details about the usb requests) and the device replies that this request is not supported.

The usb passthrough works with real G27 it has been tested(see https://github.com/RPCS3/rpcs3/issues/14969 for example but I remember someone posting a video of it working on our discord too). So I'm pretty sure this is your simulated G27 that is not working properly.

Florin9doi commented 6 months ago

0xA1/01 is a class request which means HID GET_REPORT: RequestType:0xa1, Request:0x01, wValue:0x0300, wIndex:0x0000, wLength:0x0091

@ikt32 can you try on a build older than May 1, probably should't disconnect the virtual device for LIBUSB_TRANSFER_STALL errors: https://github.com/RPCS3/rpcs3/blob/c02aae417ab02039bc126886967cdb50e0a00175/rpcs3/Emu/Cell/lv2/sys_usbd.cpp#L592

ikt32 commented 6 months ago

Ooh! Thanks for the tip, I had no idea the change was made this recently. The wheel works great on the May 1st build:

RPCS3.log

It looks like #15540 changed the situation.