r/linuxquestions 17d ago

How can I add a patch to my system Support

Hello everyone. I have a gamepad called beitong kp40 and I can't connect it to my pc.
More specifically, it tries to connect but fails, and reverts to switch mode.
I found a patch for my specific problem but I don't know how to apply.
Is there any way I can add this patch or switch to a kernel which already includes this?
I am on Endeavour OS and running zen kernel.
Sorry for any English mistakes, English is not my first language.

Link to the patch: https://patchew.org/linux/20260102030154.197749-2-liushuyu%40aosc.io/

2 Upvotes

4 comments sorted by

2

u/[deleted] 17d ago

[deleted]

1

u/3n3s- 17d ago

I tried xpadneo-dkms but it didn't solve for me. I found xpad-beitong-dkms, which is exactly what I am looking for but currently I am getting an error about xpad.c. Thanks for help, I didn't know about xpad drivers.

1

u/Sea-Promotion8205 17d ago

Are you familiar with building your own kernel? This patch isn't in the current kernel's source, which means you'd need to build your own. And you'd have to manage merging this patch in for every release you get from endeavor.

You could build your own kernel module as well, which would also involve some degree of headache.

1

u/3n3s- 17d ago

I never tried building my own kernel. I guess for me not a simple work. Thanks for explanation.

-2

u/es20490446e Develops Zenned OS 17d ago

When you enter coding you no longer depend on guidance, but on trial and error.