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
https://bugs.winehq.org/show_bug.cgi?id=52422
--- Comment #1 from Tyson Whitehead twhitehead@gmail.com --- Created attachment 71680 --> https://bugs.winehq.org/attachment.cgi?id=71680 Build log file
https://bugs.winehq.org/show_bug.cgi?id=52422
--- Comment #2 from Tyson Whitehead twhitehead@gmail.com --- Was just noticing in the directions that we are suppose to include this info
tyson@tux ~> uname -ar Linux tux 5.16.0 #1-NixOS SMP PREEMPT Sun Jan 9 22:55:34 UTC 2022 x86_64 GNU/Linux
tyson@tux ~> cat /etc/os-release NAME=NixOS ID=nixos VERSION="21.11 (Porcupine)" VERSION_CODENAME=porcupine VERSION_ID="21.11" BUILD_ID="21.11.335288.3ddd960a3b5" PRETTY_NAME="NixOS 21.11 (Porcupine)" LOGO="nix-snowflake" HOME_URL="https://nixos.org/" DOCUMENTATION_URL="https://nixos.org/learn.html" SUPPORT_URL="https://nixos.org/community.html" BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
as you can see in the build log, I am building the 32 bit variant of wine.
https://bugs.winehq.org/show_bug.cgi?id=52422
--- Comment #3 from Tyson Whitehead twhitehead@gmail.com --- Created attachment 71694 --> https://bugs.winehq.org/attachment.cgi?id=71694 Trace with SDL disabled (and Pro Pedals show up!)
Was reading through some wine bug reports and discovered the SDL layer could be disabled with
[System\CurrentControlSet\Services\winebus] "Enable SDL"=dword:00000000
Did this and the USB CH Pro Pedals show up as they should. I've attached another trace of running control and opening the Game Controllers setup thing.
tyson@tux ~> strace -ff -s 4096 -P /dev/input/event11 -E WINEDEBUG=+dinput,+hid,+plugplay wine control 2>&1 | tee trace-nosdl.log ... 009c:warn:hid:udev_add_device Unable to open udev device "/dev/hidraw11": Permission denied [pid 87393] openat(AT_FDCWD, "/dev/input/event11", O_RDWR|O_LARGEFILE) = 42 009c:trace:hid:udev_add_device udev "/dev/input/event11" syspath /sys/devices/pci0000:00/0000:00:14.0/usb2/2-14/2-14:1.0/0003:068E:00F2.000C/input/input14/event11 009c:trace:hid:get_device_subsystem_info hid uevent "DRIVER=hid-generic" 009c:trace:hid:get_device_subsystem_info hid uevent "HID_ID=0003:0000068E:000000F2" 009c:trace:hid:get_device_subsystem_info hid uevent "HID_NAME=CH PRODUCTS CH PRO PEDALS USB " 009c:trace:hid:get_device_subsystem_info hid uevent "HID_PHYS=usb-0000:00:14.0-14/input0" 009c:trace:hid:get_device_subsystem_info hid uevent "HID_UNIQ=" 009c:trace:hid:get_device_subsystem_info hid uevent "MODALIAS=hid:b0003g0001v0000068Ep000000F" 009c:trace:hid:get_device_subsystem_info input uevent "PRODUCT=3/68e/f2/100" 009c:trace:hid:get_device_subsystem_info input uevent "NAME="CH PRODUCTS CH PRO PEDALS USB "" 009c:trace:hid:get_device_subsystem_info input uevent "PHYS="usb-0000:00:14.0-14/input0"" 009c:trace:hid:get_device_subsystem_info input uevent "UNIQ=""" 009c:trace:hid:get_device_subsystem_info input uevent "PROP=0" 009c:trace:hid:get_device_subsystem_info input uevent "EV=9" 009c:trace:hid:get_device_subsystem_info input uevent "ABS=7" 009c:trace:hid:get_device_subsystem_info input uevent "MODALIAS=input:b0003v068Ep00F2e0100-e0,3,kra0,1,2,mlsf" 009c:trace:hid:get_device_subsystem_info usb uevent "DEVTYPE=usb_interface" 009c:trace:hid:get_device_subsystem_info usb uevent "DRIVER=usbhid" 009c:trace:hid:get_device_subsystem_info usb uevent "PRODUCT=68e/f2/0" 009c:trace:hid:get_device_subsystem_info usb uevent "TYPE=0/0/0" 009c:trace:hid:get_device_subsystem_info usb uevent "INTERFACE=3/0/0" 009c:trace:hid:get_device_subsystem_info usb uevent "MODALIAS=usb:v068Ep00F2d0000dc00dsc00dp00ic03isc00ip00in0" [pid 87393] ioctl(42, EVIOCGID, {bustype=3, vendor=1678, product=242, version=256}) = 0 [pid 87393] ioctl(42, EVIOCGUNIQ(260), "\0") = 1 [pid 87393] ioctl(42, EVIOCGBIT(EV_ABS, 8), [ABS_X ABS_Y ABS_Z]) = 8 [pid 87393] ioctl(42, EVIOCGBIT(EV_KEY, 96), []) = 96 009c:trace:hid:udev_add_device dev 0x7d207640, node "/dev/input/event11", desc {vid 068e, pid 00f2, version 0100, input 0, uid 00000000, is_gamepad 0}. 009c:trace:hid:udev_add_device udev "/dev/input/js0" syspath /sys/devices/pci0000:00/0000:00:14.0/usb2/2-14/2-14:1.0/0003:068E:00F2.000C/input/input14/js0 009c:trace:hid:udev_add_device duplicate device found, not adding the new one ... 0114:trace:dinput:hid_joystick_enum_device found device L"\\?\hid#vid_068e&pid_00f2&mi_00#256&0000&0&0#{4d1e55b2-f16f-11cf-88cb-001111000030}", usage 0001:0005, product {00f2068e-0000-0000-0000-504944564944}, instance {9e573ede-7734-11d2-8d4a-23903fb6bdf7}, name L"CH PRODUCTS CH PRO PEDALS USB " ...
Thanks! -Tyson
https://bugs.winehq.org/show_bug.cgi?id=52422
Rémi Bernon rbernon@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon@codeweavers.com
--- Comment #4 from Rémi Bernon rbernon@codeweavers.com --- Nice, that's exactly what I was about to suggest! This looks like an issue in SDL then, could be worth reporting it there as some native games may be using it directly.
https://bugs.winehq.org/show_bug.cgi?id=52422
--- Comment #5 from Tyson Whitehead twhitehead@gmail.com --- Thanks. I dug into SDL further and it seems NixOS has compiled the SDL library without udev support. When I rebuild it with SDL support and build wine against that, then the Pro Pedals are show up properly in wine with SDL too. So not at all a wine issue.
What I believe happened was that the newer wine is compiled with a newer SDL. The newer SDL switched to using event devices by default instead of js ones, and the event logic is incorrectly figuring the event device isn't a joystick unless it has to the udev classification.
Sorry for the noise, and thanks for the feedback!
https://bugs.winehq.org/show_bug.cgi?id=52422
Tyson Whitehead twhitehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |NOTOURBUG
--- Comment #6 from Tyson Whitehead twhitehead@gmail.com --- Update the bug status accordingly. :)