atar-axis / xpadneo

Advanced Linux Driver for Xbox One Wireless Controller (shipped with Xbox One S)
https://atar-axis.github.io/xpadneo/
GNU General Public License v3.0
1.87k stars 110 forks source link

unable to load kernel module #413

Closed MNS26 closed 1 year ago

MNS26 commented 1 year ago

Version of xpadneo

Latest version on github

Controller Model

Connection mode

Installed Software

Protocol Information

Please help us identify at which layer the problem can be found if you want to report mapping errors or if the controller fails to be detected:

Please describe how it is failing below in the next sections.

Severity / Impact

Describe the Bug

upon loading the kernel module it gives a "Unknown symbol in module" error

Steps to Reproduce

make -C /lib/modules/6.2.7-200.fc37.x86_64/build/ LD=ld.bfd M="/mnt/data/Containers/dev/xpadneo/hid-xpadneo/src" VERSION="" modules
sudo insmod src/hid-xpadneo.ko

Expected Behavior

No errors when loading

Screenshots / GIFs / Videos

image image image

System Information

# uname -a
Linux dev.fedora 6.2.7-200.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Mar 17 16:16:00 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
# xxd -c20 -g1 /sys/module/hid_xpadneo/drivers/hid:xpadneo/0005:045E:*/report_descriptor | tee >(cksum)

image

Controller and Bluetooth Information

Additional Context

I tweaked the build method because it runs in a container and it cant access /lib/src/linux i used the make same build command (other than directory) to build a different kernel module that does work

kakra commented 1 year ago

Does the container have different kernel headers?

Otherwise I'd suggest using the Makefile provided in the hid-xpadneo directory and tweaking the KERNEL_SOURCE_DIRECTORY variable. Your script is missing building the version file, tho that probably doesn't fix the issue.

Also, insmod won't auto-load module dependencies, so maybe another module is missing?

As far as I can see, we have no explicit module dependencies but your kernel may be missing some input related stuff. Does dmesg show which symbol is unknown?

MNS26 commented 1 year ago

no it has the same kernel. I used to use insmod directly on my laptop in the passed. dmesg doesnt show anything sadly

MNS26 commented 1 year ago

oh... just had another look. i fucked up the automated signing of it... oops just fixed it and now it loads