https://bugs.winehq.org/show_bug.cgi?id=52047
Bug ID: 52047 Summary: not all joysticks show up in wine Product: Wine Version: 6.21 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: joy.cpl Assignee: wine-bugs@winehq.org Reporter: erlofgrey@gmail.com Distribution: ---
Created attachment 71058 --> https://bugs.winehq.org/attachment.cgi?id=71058 part of dmesg, terminal output, 2 screenshots
in wine 6.21 i see only 2 joysticks in joy.cpl instead of 3, i checked wine 6.18 and there i see all 3 and additionally (js) and (event) versions in the list.
i checked additionally wine-ge between 6.18 and 6.21, last working was 6.19 there and broken with 6.20.
https://bugs.winehq.org/show_bug.cgi?id=52047
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |o.dierick@piezo-forte.be
--- Comment #1 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Hello,
Legacy js support has been removed starting from Wine 6.20, so you'll only see those controller that showed with (event) on older version. There is no more need of the (js) or (event) indicator to distinguish between js and event devices now that js has been removed.
Looking at the screenshots, the missing device is "EDTracker EDTracker Pro" so I did a quick web search about that device.
In the discussion on that website [1], it seems that you have to manually add udev rules to set the right permissions for the evdev interface to be seen in userspace programs.
Use 'evtest' to check if the controller is detected as a /dev/input/eventX device: If it doesn't show up in the list when you run the command as a user, run 'evtest' as root. If the device show in the list when you run as root, then it's a permission problem and a udev rule should fix it (Check the linked discussion for examples of udev rules). If it doesn't show up at all then there is a deeper issue with the device OS/driver integration.
Please notify us of the result of 'evtest'. That command is part of the 'joystick' package under Debian.
[1] https://github.com/uglyDwarf/linuxtrack/issues/106#issuecomment-304253771
Regards.
https://bugs.winehq.org/show_bug.cgi?id=52047
--- Comment #2 from erlofgrey@gmail.com --- hi,
thanks for the reply.
added my user to input group which gave me now rights to access the event style device on the host at least, unfortunately that is not enough yet being able to access it inside (fedora) toolbox. might be missing some udev rules then, might take some time until i figure out how to set that.
don't quite understand why /dev/input/event5 and /dev/input/event7 works and is accessible out of the box but /dev/input/event6 doesn't.
does that mean "legacy" js support won't come back and this change was intentional then?
br, Martin
https://bugs.winehq.org/show_bug.cgi?id=52047
Rémi Bernon rbernon@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon@codeweavers.com
--- Comment #3 from Rémi Bernon rbernon@codeweavers.com --- Hi,
I don't think adding yourself to the input user group is a good idea. It will let you access directly to /dev/input/eventX devices which are normally only meant to be accessed directly by privileged users.
This is for instance the case for mouse and keyboard devices, and it may then cause some trouble, as Wine will get direct access to these devices where they should normally be handled through the X server.
I have seen some cases for instance, where a laptop touchpad could then be considered as a joystick device and take precedence over genuine joystick devices.
Normally udev has some rules and heuristics to decide which device is a joystick and which is not, and only expose joysticks to unprivileged the users. This is probably what needs to be done, although I don't know how exactly.
Regarding the /dev/js backend, it's been removed but we can consider adding it back to winebus.sys if it's helping some cases.
https://bugs.winehq.org/show_bug.cgi?id=52047
--- Comment #4 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- (In reply to erlofgrey from comment #2)
might be missing some udev rules then, might take some time until i figure out how to set that.
Hello,
Adding a udev rule is done like this: - Create a file in the directory where udev picks up custom rules (must be done as root). Example: $ sudo nano /etc/udev/rules.d/50-edtracker.rules - Write the rule line in the file (the id numbers match your dmesg log): KERNEL=="event*", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0aea", MODE:="666" - Save and reboot;
I'm not familiar with fedora toolbox but there is some explanation on how to share the udev rules between toolbox and host there:
[1] https://github.com/containers/toolbox/issues/468
The permission issue is not related to Wine but any program who use the input event interface, as you can read there:
[2] https://developer.x-plane.com/2012/09/linux-joystick-permissions/
don't quite understand why /dev/input/event5 and /dev/input/event7 works and is accessible out of the box but /dev/input/event6 doesn't.
It depends on the driver of the device. I think they consider it a pointing device, like a touchpad, rather than a controller. Or it's a bug in the driver, I don't know.
does that mean "legacy" js support won't come back and this change was intentional then?
The js interface has been declared obsolete and will eventually be removed from the Linux kernel itself.
(In reply to Rémi Bernon from comment #3)
Regarding the /dev/js backend, it's been removed but we can consider adding it back to winebus.sys if it's helping some cases.
It would give me more time to work on a solution to the off-center calibration problem.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=52047
erlofgrey@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |WORKSFORME
--- Comment #5 from erlofgrey@gmail.com --- Hi,
great, works already!
martin@toolbox ~]$ evtest No device specified, trying to scan all of /dev/input/event* Not running as root, no devices may be available. Available devices: /dev/input/event5: CH PRODUCTS CH PRO THROTTLE USB /dev/input/event6: EDTracker EDTracker Pro /dev/input/event7: Thustmaster Joystick - HOTAS Warthog
removed my user from input group again, toolbox picked the event device up automatically after setting the udev rule on the host.
many thanks and best regards, Martin
https://bugs.winehq.org/show_bug.cgi?id=52047
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Ken Sharp imwellcushtymelike@gmail.com --- Closing bugs marked workforme in 2021.