Gamepad XInput not working in wine

Post your terminal/konsole in- and output as text (no pictures) from:

inxi -Faz

❯ inxi -Faz
System:    Kernel: 5.14.14-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=03ae8764-9655-49fc-b610-9ccf6206853d rw
[email protected] quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
systemd.unified_cgroup_hierarchy=1 loglevel=3
Desktop: KDE Plasma 5.23.2 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux
base: Arch Linux
Machine:   Type: Laptop System: LENOVO product: 81LK v: IdeaPad L340-15IRH Gaming serial: <filter> Chassis: type: 10
v: IdeaPad L340-15IRH Gaming serial: <filter>
Mobo: LENOVO model: LNVNB161216 v: SDK0Q55722 WIN serial: <filter> UEFI: LENOVO v: BGCN24WW date: 08/19/2019
Battery:   ID-1: BAT0 charge: 36.7 Wh (100.0%) condition: 36.7/45.0 Wh (81.5%) volts: 12.8 min: 11.5 model: Celxpert L18C3PF1
type: Li-poly serial: <filter> status: Full cycles: 254
CPU:       Info: 6-Core model: Intel Core i7-9750H bits: 64 type: MT MCP arch: Kaby Lake note: check family: 6
model-id: 9E (158) stepping: A (10) microcode: EA cache: L2: 12 MiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 62399
Speed: 2422 MHz min/max: 800/4500 MHz Core speeds (MHz): 1: 2422 2: 4156 3: 4200 4: 4087 5: 3992 6: 4204 7: 3513
8: 4179 9: 4200 10: 4201 11: 3931 12: 4195
Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
Type: mds mitigation: Clear CPU buffers; SMT vulnerable
Type: meltdown mitigation: PTI
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling
Type: srbds mitigation: Microcode
Type: tsx_async_abort status: Not affected
Graphics:  Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] vendor: Lenovo driver: i915 v: kernel bus-ID: 00:02.0
chip-ID: 8086:3e9b class-ID: 0300
Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] vendor: Lenovo driver: nvidia v: 470.74
alternate: nouveau,nvidia_drm bus-ID: 01:00.0 chip-ID: 10de:1f91 class-ID: 0300
Device-3: Lite-On Integrated Camera type: USB driver: uvcvideo bus-ID: 1-8:2 chip-ID: 04ca:7070 class-ID: 0e02
Display: x11 server: X.Org 1.20.13 compositor: kwin_x11 driver: loaded: modesetting,nvidia display-ID: :0
screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") s-diag: 582mm (22.9")
Monitor-1: eDP-1 res: 1920x1080 hz: 60 dpi: 142 size: 344x193mm (13.5x7.6") diag: 394mm (15.5")
OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 21.2.4 direct render: Yes
Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: Lenovo driver: snd_hda_intel v: kernel
alternate: snd_soc_skl,snd_sof_pci_intel_cnl bus-ID: 00:1f.3 chip-ID: 8086:a348 class-ID: 0403
Device-2: NVIDIA vendor: Lenovo driver: snd_hda_intel v: kernel bus-ID: 01:00.1 chip-ID: 10de:10fa class-ID: 0403
Sound Server-1: ALSA v: k5.14.14-zen1-1-zen running: yes
Sound Server-2: JACK v: 1.9.19 running: no
Sound Server-3: PulseAudio v: 15.0 running: yes
Sound Server-4: PipeWire v: 0.3.39 running: yes
Network:   Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel bus-ID: 00:14.3 chip-ID: 8086:a370
class-ID: 0280
IF: wlp0s20f3 state: up mac: <filter>
Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Lenovo driver: r8169 v: kernel port: 3000
bus-ID: 07:00.0 chip-ID: 10ec:8168 class-ID: 0200
IF: enp7s0 state: down mac: <filter>
IF-ID-1: anbox0 state: down mac: <filter>
Bluetooth: Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB driver: btusb v: 0.8 bus-ID: 1-14:3
chip-ID: 8087:0aaa class-ID: e001
Report: bt-adapter ID: hci0 rfk-id: 2 state: up address: <filter>
Drives:    Local Storage: total: 1.03 TiB used: 310.53 GiB (29.6%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: SK Hynix model: HFM128GDHTNG-8310A size: 119.24 GiB block-size:
physical: 512 B logical: 512 B speed: 15.8 Gb/s lanes: 2 type: SSD serial: <filter> rev: 80060C00 temp: 40.9 C
scheme: GPT
ID-2: /dev/sda maj-min: 8:0 vendor: Western Digital model: WD10SPZX-24Z10 size: 931.51 GiB block-size:
physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter> rev: 1A05 scheme: GPT
Partition: ID-1: / raw-size: 118.99 GiB size: 118.99 GiB (100.00%) used: 45.36 GiB (38.1%) fs: btrfs dev: /dev/nvme0n1p2
maj-min: 259:2
ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%) used: 562 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1
maj-min: 259:1
ID-3: /home raw-size: 931.51 GiB size: 931.51 GiB (100.00%) used: 265.17 GiB (28.5%) fs: btrfs dev: /dev/sda1
maj-min: 8:1
ID-4: /var/log raw-size: 118.99 GiB size: 118.99 GiB (100.00%) used: 45.36 GiB (38.1%) fs: btrfs
dev: /dev/nvme0n1p2 maj-min: 259:2
ID-5: /var/tmp raw-size: 118.99 GiB size: 118.99 GiB (100.00%) used: 45.36 GiB (38.1%) fs: btrfs
dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:      Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 7.64 GiB used: 3.67 GiB (48.0%) priority: 100 dev: /dev/zram0
Sensors:   System Temperatures: cpu: 55.0 C mobo: N/A
Fan Speeds (RPM): N/A
Info:      Processes: 393 Uptime: 1h 48m wakeups: 1 Memory: 7.64 GiB used: 4.85 GiB (63.5%) Init: systemd v: 249
tool: systemctl Compilers: gcc: 11.1.0 clang: 12.0.1 Packages: pacman: 2066 lib: 556 Shell: Zsh v: 5.8
running-in: yakuake inxi: 3.3.08

Hello everyone,

I have bought a redgear pro series gamepad. It has both XInput and Dinput stype input. I am having issues in getting it to work in games that I am running on wine (using Lutris). I am having this issue in multiple games that I tried.

I notice that when I run the game with gamepad connected in XInput mode, this is the output of wine (I have censored the game name and path.) :-

 002c:fixme:winediag:LdrInitializeThunk wine-staging 6.20 is a testing version containing experimental patches.
002c:fixme:winediag:LdrInitializeThunk Please mention your exact version when filing bug reports on winehq.org.
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

007c:err:ole:start_rpcss Failed to start RpcSs service
003c:err:service:process_send_command receiving command result timed out
003c:fixme:service:scmdatabase_autostart_services Auto-start service L"wineusb" failed to start: 1053
007c:err:ole:start_rpcss Failed to start RpcSs service
003c:err:service:process_send_command receiving command result timed out
003c:fixme:service:scmdatabase_autostart_services Auto-start service L"winebus" failed to start: 1053
0124:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 00000001812C5B48, 43) stub
0124:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 0000000140012360, 43) stub
Mono path[0] = '<path-to-game>/<game-name>/<game-name>_Data/Managed'
Mono config path = '<path-to-game>/<game-name>/<game-name>_Data/Mono/etc'
0124:fixme:imm:ImmReleaseContext (0000000000010064, 00000000001BC440): stub
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

0124:fixme:wbemprox:client_security_SetBlanket 00000002419C2D40, 00000000001C4170, 10, 0, (null), 3, 3, 0000000000000000, 0x00000000
0124:fixme:wbemprox:client_security_Release 00000002419C2D40
0124:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
01f4:fixme:ver:GetCurrentPackageId (000000000869FE10 0000000000000000): stub
01f4:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Audio",000000000869FDB8): stub
0124:fixme:service:I_ScRegisterDeviceNotification Notification filters are not yet implemented.
0124:fixme:service:I_ScRegisterDeviceNotification Notification filters are not yet implemented.
0124:fixme:service:I_ScRegisterDeviceNotification Notification filters are not yet implemented.
0124:fixme:win:RegisterTouchWindow (0000000000010064 00000000): stub
0124:fixme:wbemprox:client_security_SetBlanket 00000002419C2D40, 0000000009D55330, 10, 0, (null), 3, 3, 0000000000000000, 0x00000000
0124:fixme:wbemprox:client_security_Release 00000002419C2D40
0124:fixme:wbemprox:wbem_services_CreateInstanceEnum unsupported flags 0x00000030
0124:fixme:wbemprox:wbem_services_CreateInstanceEnum unsupported flags 0x00000030
0124:fixme:wbemprox:wbem_services_CreateInstanceEnum unsupported flags 0x00000030
0110:fixme:imm:ImeSetActiveContext (0x25ea30, 0): stub
0110:fixme:imm:ImmReleaseContext (0000000000030046, 000000000025EA30): stub
019c:fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
019c:fixme:toolhelp:Heap32ListFirst : stub
^C023c:fixme:console:default_ctrl_handler Terminating process 20 on event 0

I see these as the problematic lines (because the name USB in it):-

007c:err:ole:start_rpcss Failed to start RpcSs service
003c:fixme:service:scmdatabase_autostart_services Auto-start service L"wineusb" failed to start: 1053

By the way, this is the output when I connect my gamepad in Dinput mode. In this mode, the game recognizes the gamepad and works

002c:fixme:winediag:LdrInitializeThunk wine-staging 6.20 is a testing version containing experimental patches.
002c:fixme:winediag:LdrInitializeThunk Please mention your exact version when filing bug reports on winehq.org.
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

0108:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 00000001812C5B48, 43) stub
0108:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 0000000140012360, 43) stub
Mono path[0] = '<path-to-game>/<game-name>/<game-name>_Data/Managed'
Mono config path = '<path-to-game>/<game-name>/<game-name>_Data/Mono/etc'
0108:fixme:imm:ImmReleaseContext (0000000000010064, 00000000001BC460): stub
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

0108:fixme:wbemprox:client_security_SetBlanket 00000002419C2D40, 00000000001C4190, 10, 0, (null), 3, 3, 0000000000000000, 0x00000000
0108:fixme:wbemprox:client_security_Release 00000002419C2D40
0108:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
01d8:fixme:ver:GetCurrentPackageId (000000000869FE10 0000000000000000): stub
01d8:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Audio",000000000869FDB8): stub
01e8:fixme:service:I_ScRegisterDeviceNotification Notification filters are not yet implemented.
0108:fixme:service:I_ScRegisterDeviceNotification Notification filters are not yet implemented.
0108:fixme:service:I_ScRegisterDeviceNotification Notification filters are not yet implemented.
0108:fixme:service:I_ScRegisterDeviceNotification Notification filters are not yet implemented.
0108:fixme:win:RegisterTouchWindow (0000000000010064 00000000): stub
0108:fixme:wbemprox:client_security_SetBlanket 00000002419C2D40, 000000000A0A1790, 10, 0, (null), 3, 3, 0000000000000000, 0x00000000
0108:fixme:wbemprox:client_security_Release 00000002419C2D40
0108:fixme:wbemprox:wbem_services_CreateInstanceEnum unsupported flags 0x00000030
0108:fixme:wbemprox:wbem_services_CreateInstanceEnum unsupported flags 0x00000030
0108:fixme:wbemprox:wbem_services_CreateInstanceEnum unsupported flags 0x00000030
0088:fixme:imm:ImeSetActiveContext (0x25ea80, 0): stub
0088:fixme:imm:ImmReleaseContext (0000000000010020, 000000000025EA80): stub
017c:fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
017c:fixme:toolhelp:Heap32ListFirst : stub

I also notice this that if I switch rapidly from Dinput mode to Xinput mode and start the game, the gamepad works. I think maybe some process is using the gamepad and does not allow wine to mount it.

So I tried running watch lsof /dev/input/js0 while running the game, but it comes empty.

Please help me resolve the issue. Thank you very much in advance.

Steps taken to resolve:-

  1. Checked that the controller works in Xinput mode by using jstest.
  2. Created a new wineprefix. Still the same issue.
  3. Enabled winusb in winecfg with native, builtin setting. No difference.

Does it work in older versions of WINE? There were xinput changes in 6.20 which have caused some bugs/regressions, e.g. WineHQ Bugzilla – Bug 51922 – Xinput Joystick backend broke Force Feedback in Starlancer

1 Like

Thank you for replying.

Sorry for giving some wrong information. I created a new wineprefix, but did not point to it.

It works with newly created wineprefix in the same wine version.

Sorry for not checking correctly. Will close this.

1 Like