https://bugs.winehq.org/show_bug.cgi?id=52422
Bug ID: 52422 Summary: USB CH Pro Pedals do not show up as a joystick device in 7.0 Product: Wine Version: 7.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: hid Assignee: wine-bugs@winehq.org Reporter: twhitehead@gmail.com Distribution: ---
Created attachment 71679 --> https://bugs.winehq.org/attachment.cgi?id=71679 Full trace.log file
Using the just released wine 7.0, I no longer see my Pro Pedals as a joystick device (e.g., in the control panel). I expect this is related to all the joystick input device stack work that occurred in this release.
I know that it is enumerating/processing my /dev/input/event* devices, as, if I manually make them all read/writable (instead of the system default which is just the Pro Pedals one), then my Wacom tablet shows up as a joystick device in the control panel.
I am totally guessing, but maybe there is an issue properly categorizing the device? I know in the past, in other projects, it has been misclassified due to not having any buttons.
Anyway, I looked through the code, but couldn't really follow it other than noting that it does look at the udev classification. Here is what my udev is reporting
tyson@tux ~> udevadm info /dev/input/event14 ... E: ID_INPUT=1 E: ID_INPUT_ACCELEROMETER=0 E: ID_INPUT_JOYSTICK=1 E: ID_VENDOR=CH_PRODUCTS E: ID_VENDOR_ENC=CH\x20PRODUCTS E: ID_VENDOR_ID=068e E: ID_MODEL=CH_PRO_PEDALS_USB E: ID_MODEL_ENC=CH\x20PRO\x20PEDALS\x20USB\x20 E: ID_MODEL_ID=00f2 E: ID_REVISION=0000 E: ID_SERIAL=CH_PRODUCTS_CH_PRO_PEDALS_USB
Here you can see systemd has granted my account full read/write access to the device due to its classification
tyson@tux ~> getfacl /dev/input/event14 ... user:tyson:rw- group::rw- mask::rw- ...
And here is a partial dump of starting the control panel (full trace is attached) showing it is successfully opening the device and making various ioctl calls to enumerate its capabilities
tyson@tux ~> strace -ff -s 4096 -P /dev/input/event14 -E WINEDEBUG=+dinput,+hid,+plugplay wine control 2>&1 | tee trace.log ... 009c:trace:hid:bus_main_thread L"SDL" main loop starting 009c:trace:hid:sdl_bus_init args 0xd8f6b4 [pid 1861507] fstatat64(AT_FDCWD, "/dev/input/event14", {st_mode=S_IFCHR|0660, st_rdev=makedev(0xd, 0x4e), ...}, 0) = 0 [pid 1861507] openat(AT_FDCWD, "/dev/input/event14", O_RDONLY) = 40 [pid 1861507] ioctl(40, EVIOCGBIT(0, 4), [EV_SYN EV_ABS]) = 4 [pid 1861507] ioctl(40, EVIOCGBIT(EV_KEY, 96), []) = 96 [pid 1861507] ioctl(40, EVIOCGBIT(EV_REL, 4), []) = 4 [pid 1861507] ioctl(40, EVIOCGBIT(EV_ABS, 8), [ABS_X ABS_Y ABS_Z]) = 8 [pid 1861507] close(40) = 0 [pid 1861507] fstatat64(AT_FDCWD, "/dev/input/event14", {st_mode=S_IFCHR|0660, st_rdev=makedev(0xd, 0x4e), ...}, 0) = 0 [pid 1861507] openat(AT_FDCWD, "/dev/input/event14", O_RDWR) = 39 [pid 1861507] ioctl(39, EVIOCGBIT(EV_FF, 128), []) = 16 [pid 1861507] close(39) = 0 009c:trace:hid:bus_main_thread L"SDL" main loop started ...
Here is a dump of the HID info
root@tux /h/tyson# usbhid-dump -m 068e 003:059:000:DESCRIPTOR 1642627470.833610 05 01 09 04 A1 01 05 01 09 01 A1 00 09 30 09 31 09 32 15 00 26 FF 00 75 08 95 03 81 02 C0 C0
root@tux /h/tyson# usbhid-dump -m 068e | grep -v : | xxd -r -p | hidrd-convert -o spec Usage Page (Desktop), ; Generic desktop controls (01h) Usage (Joystick), ; Joystick (04h, application collection) Collection (Application), Usage Page (Desktop), ; Generic desktop controls (01h) Usage (Pointer), ; Pointer (01h, physical collection) Collection (Physical), Usage (X), ; X (30h, dynamic value) Usage (Y), ; Y (31h, dynamic value) Usage (Z), ; Z (32h, dynamic value) Logical Minimum (0), Logical Maximum (255), Report Size (8), Report Count (3), Input (Variable), End Collection, End Collection
I am happy to provide any other details that I can/run any test you want. Just let me know.
Thanks! -Tyson