AricStewart (talk | contribs) |
RemiBernon (talk | contribs) |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 5: | Line 5: | ||
==HID (Human Interface Devices) in WINE== | ==HID (Human Interface Devices) in WINE== | ||
HID support has been added to Wine. It is now used as a backend for every game controller device and all the relevant APIs to access them from the Windows side. It is implemented over the host's libSDL or evdev, although pass-through of host HID devices is also possible when they are accessible through hidraw. | |||
==Relevant Debug Channels== | ==Relevant Debug Channels== | ||
* <code>+hid</code>: | * <code>+hid</code>: Traces all HID stack events | ||
* <code>+ | * <code>+rawinput</code>: Traces for the RawInput frontend | ||
* <code>+ | * <code>+dinput</code>: Traces for the DInput frontend | ||
* <code>+xinput</code>: Traces for the XInput frontend | |||
* <code>+input</code>: Traces for the Windows.Gaming.input frontend | |||
== | ==Pass-through of specific HID devices== | ||
Some devices, such as the Sony DualShock and Sony DualSense are using a proprietary protocol that is the only way to access features such as LED control or advanced haptics. This protocol is supported by several Windows applications, and the only way to make it accessible to them is to setup the HID stack in pass-through mode directly to the host HID device, through hidraw. | |||
On Linux, by default, no hidraw devices are not accessible to normal users. You will need to either add rw permission to the <code>/dev/hidraw<X></code> device that you want to have accessible in Wine, or better, add a new udev rule to automatically allow access on matching devices when they are added. | |||
Several distributions already provide packages that contain the necessary udev rules for these devices. Most of them are related to Steam, and on Debian the package is named <code>steam-devices</code>. Installing this package (you don't even need to install Steam) should be enough to have the udev rules installed and no manual setup will then be necessary. For manual configuration, the relevant udev rules to copy can be found in that package sources [https://github.com/ValveSoftware/steam-devices/blob/master/60-steam-input.rules]. | |||
==Tools to use with device testing== | ==Tools to use with device testing== | ||
* hid_test.exe: | * hid_test.exe: Wine tests written around direct HID access, in the wine tree dlls/hid/tests. | ||
* hclient.exe: This is distributed by Microsoft in the DDK (and various free download sites if you are so inclined). This tool will enumerate devices and allow for all various levels of control and exploration. | * hclient.exe: This is distributed by Microsoft in the DDK (and various free download sites if you are so inclined). This tool will enumerate devices and allow for all various levels of control and exploration. | ||
* hid.exe: (https://www.codeweavers.com/xfer/aric/HID/) A quick sample application for testing HID joysticks and gamepads with source. | * hid.exe: (https://www.codeweavers.com/xfer/aric/HID/ access-key: sLcm7EZ7) A quick sample application for testing HID joysticks and gamepads with source. | ||
* HID descriptor parser: (http://eleccelerator.com/usbdescreqparser/) a web page to parse descriptor byte strings. Useful for debugging devices. | * HID descriptor parser: (http://eleccelerator.com/usbdescreqparser/) a web page to parse descriptor byte strings. Useful for debugging devices. | ||
Line 49: | Line 49: | ||
| style="width:100px; align=center" | ---- | | style="width:100px; align=center" | ---- | ||
| style="width:400px; align=center" | Not Working | | style="width:400px; align=center" | Not Working | ||
|} | |||
{| border="1" | |||
| style="width:400px; align=center" | MY-POWER / CSL (low budget ps3 controller) | |||
| style="width:100px; align=center" | Linux | |||
| style="width:400px; align=center" | Working | |||
|} | |||
{| border="1" | |||
| style="width:400px; align=center" | Playstation 4 Controller (DS4) | |||
| style="width:100px; align=center" | OS/X | |||
| style="width:400px; align=center" | Working | |||
|} | |} | ||
</div> | </div> |
Latest revision as of 11:00, 25 February 2024
Maintained by Aric Stewart
If you find incorrect information here please contact me.
HID (Human Interface Devices) in WINE
HID support has been added to Wine. It is now used as a backend for every game controller device and all the relevant APIs to access them from the Windows side. It is implemented over the host's libSDL or evdev, although pass-through of host HID devices is also possible when they are accessible through hidraw.
Relevant Debug Channels
+hid
: Traces all HID stack events+rawinput
: Traces for the RawInput frontend+dinput
: Traces for the DInput frontend+xinput
: Traces for the XInput frontend+input
: Traces for the Windows.Gaming.input frontend
Pass-through of specific HID devices
Some devices, such as the Sony DualShock and Sony DualSense are using a proprietary protocol that is the only way to access features such as LED control or advanced haptics. This protocol is supported by several Windows applications, and the only way to make it accessible to them is to setup the HID stack in pass-through mode directly to the host HID device, through hidraw.
On Linux, by default, no hidraw devices are not accessible to normal users. You will need to either add rw permission to the /dev/hidraw<X>
device that you want to have accessible in Wine, or better, add a new udev rule to automatically allow access on matching devices when they are added.
Several distributions already provide packages that contain the necessary udev rules for these devices. Most of them are related to Steam, and on Debian the package is named steam-devices
. Installing this package (you don't even need to install Steam) should be enough to have the udev rules installed and no manual setup will then be necessary. For manual configuration, the relevant udev rules to copy can be found in that package sources [1].
Tools to use with device testing
- hid_test.exe: Wine tests written around direct HID access, in the wine tree dlls/hid/tests.
- hclient.exe: This is distributed by Microsoft in the DDK (and various free download sites if you are so inclined). This tool will enumerate devices and allow for all various levels of control and exploration.
- hid.exe: (https://www.codeweavers.com/xfer/aric/HID/ access-key: sLcm7EZ7) A quick sample application for testing HID joysticks and gamepads with source.
- HID descriptor parser: (http://eleccelerator.com/usbdescreqparser/) a web page to parse descriptor byte strings. Useful for debugging devices.
Devices that have been tested
Device | Platform(s) | Status |
Logitech Rumblepad 2 | Linux / OS/X | Working |
Xbox360 Controller | OS/X | Working (with 3rd party drivers installed) |
Steam Controller | ---- | Not Working |
MY-POWER / CSL (low budget ps3 controller) | Linux | Working |
Playstation 4 Controller (DS4) | OS/X | Working |