You are not logged in.

#1 2024-04-02 23:54:42

qwemaze
Member
Registered: 2018-10-01
Posts: 13

XInput gamepad not recognised, how to recompile xpad driver?

I've got Gamesir Cyclone T4 controller.

It is capable of working in DInput or XInput modes.

When I connect under Linux it only works in DInput, when I connect it under Windows it is able to switch to XInput.
If I then reboot into Linux, the gamepad stays in XInput mode.

lsusb in DInput: 3537:1006 GameSir GameSir-Cyclone
lsusb in XInput: 3537:1014 Microsoft Xbox 360 for Windows Controller

I've found out there's a list of supported devices at https://github.com/torvalds/linux/blob/ … pad.c#L129
While it does have 3537 it does not have 1006 nor 1014.

I want to try and recompile the xpad driver to see if adding these identifiers helps, but have no idea how to, and am struggling to find any info online.

Offline

#2 2024-04-03 00:04:10

qwemaze
Member
Registered: 2018-10-01
Posts: 13

Re: XInput gamepad not recognised, how to recompile xpad driver?

Offline

#3 2024-04-03 00:10:50

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,447

Re: XInput gamepad not recognised, how to recompile xpad driver?

Will be ignored kernel dev doesn't happen on github.

As for compiling the driver with this change read https://wiki.archlinux.org/title/Compile_kernel_module

Offline

#4 2024-04-03 18:08:40

qwemaze
Member
Registered: 2018-10-01
Posts: 13

Re: XInput gamepad not recognised, how to recompile xpad driver?

So I've got to "Module compilation" part `make M=drivers/input/joystick`, but it fails with:
```
  MODPOST drivers/input/joystick/Module.symvers
WARNING: Module.symvers is missing.
         Modules may not have dependencies or modversions.
         You may get many unresolved symbol errors.
         You can set KBUILD_MODPOST_WARN=1 to turn errors into warning
         if you want to proceed at your own risk.
ERROR: modpost: "gameport_stop_polling" [drivers/input/joystick/a3d.ko] undefined!
ERROR: modpost: "gameport_start_polling" [drivers/input/joystick/a3d.ko] undefined!
ERROR: modpost: "input_event" [drivers/input/joystick/a3d.ko] undefined!
ERROR: modpost: "gameport_unregister_driver" [drivers/input/joystick/a3d.ko] undefined!
ERROR: modpost: "kmalloc_caches" [drivers/input/joystick/a3d.ko] undefined!
ERROR: modpost: "kmalloc_trace" [drivers/input/joystick/a3d.ko] undefined!
ERROR: modpost: "input_allocate_device" [drivers/input/joystick/a3d.ko] undefined!
ERROR: modpost: "gameport_open" [drivers/input/joystick/a3d.ko] undefined!
ERROR: modpost: "snprintf" [drivers/input/joystick/a3d.ko] undefined!
ERROR: modpost: "strnlen" [drivers/input/joystick/a3d.ko] undefined!
WARNING: modpost: suppressed 829 unresolved symbol warnings because there were too many)
make[2]: *** [scripts/Makefile.modpost:145: drivers/input/joystick/Module.symvers] Error 1
make[1]: *** [/home/me/my/linux/src/linux-6.8.2/Makefile:1873: modpost] Error 2
make: *** [Makefile:240: __sub-make] Error 2
```

Tried to `make modules`, and it fails with similar errors, currently compiling the whole kernel

Last edited by qwemaze (2024-04-03 18:11:09)

Offline

#5 2024-04-03 22:36:30

qwemaze
Member
Registered: 2018-10-01
Posts: 13

Re: XInput gamepad not recognised, how to recompile xpad driver?

Adding it's id to xpad.c didn't help

Offline

#6 2024-05-31 02:25:55

mxpleRIN
Member
Registered: 2024-05-31
Posts: 1

Re: XInput gamepad not recognised, how to recompile xpad driver?

Stumbled across this while trying to compile the joystick module, found a fix:
Copy /usr/lib/modules/x.x.x-arch1-1/build/Module.symvers to your root directory. The undefined symbols should be resolved then smile

Offline

Board footer

Powered by FluxBB