DKMS won't install on kernel 6.18
Version: Commit a16acb0
OS: Arch Linux
Kernel: 6.18.0
error during dkms installation:
==> dkms install --no-depmod hid-xpadneo/v0.9.r226.ga16acb0 -k 6.18.0-273-linux-tkg
Error! Bad return status for module build on kernel: 6.18.0-273-linux-tkg (x86_64)
Consult /var/lib/dkms/hid-xpadneo/v0.9.r226.ga16acb0/build/make.log for more information.
==> WARNING: `dkms install --no-depmod hid-xpadneo/v0.9.r226.ga16acb0 -k 6.18.0-273-linux-tkg' exited 10
@kakra
I encountered the same build failure on Kernel 6.18 (CachyOS).
The issue is caused by the removal of the deprecated ida_simple_get API in Linux 6.18.
I verified that patching src/hid-xpadneo.c to use the modern ida_alloc API fixes the build and the controller works correctly.
Fix:
-
Replace
ida_simple_get(&xpadneo_device_id_allocator, 0, 0, GFP_KERNEL)with:ida_alloc(&xpadneo_device_id_allocator, GFP_KERNEL) -
Replace
ida_simple_remove(&xpadneo_device_id_allocator, xdata->id)with:ida_free(&xpadneo_device_id_allocator, xdata->id)
This fix is already queued for v0.10. v0.9 will not support kernel 6.17+.
yeah just wanted to +1 one this, fails build on the current Gentoo ~amd64 and 9999 packages
live version
/usr/lib/llvm/20/bin/x86_64-pc-linux-gnu-clang-20 -Wp,-MMD,./.xpadneo.o.d -nostdinc -I/usr/src/linux-6.18.0-cachyos/arch/x86/include -I/usr/src/linux-6.18.0-cachyos/arch/x86/include/generated -I/usr/src/linux-6.18.0-cachyos/include -I/usr/src/linux-6.18.0-cachyos/include -I/usr/src/linux-6.18.0-cachyos/arch/x86/include/uapi -I/usr/src/linux-6.18.0-cachyos/arch/x86/include/generated/uapi -I/usr/src/linux-6.18.0-cachyos/include/uapi -I/usr/src/linux-6.18.0-cachyos/include/generated/uapi -include /usr/src/linux-6.18.0-cachyos/include/linux/compiler-version.h -include /usr/src/linux-6.18.0-cachyos/include/linux/kconfig.h -include /usr/src/linux-6.18.0-cachyos/include/linux/compiler_types.h -D__KERNEL__ --target=x86_64-linux-gnu -fintegrated-as -Werror=ignored-optimization-argument -Werror=option-ignored -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-sse4a -fcf-protection=branch -fno-jump-tables -m64 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mstack-alignment=8 -mskip-rax-setup -march=x86-64-v4 -mno-red-zone -mcmodel=kernel -mstack-protector-guard-reg=gs -mstack-protector-guard-symbol=__ref_stack_chk_guard -Wno-sign-compare -fno-asynchronous-unwind-tables -mretpoline-external-thunk -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O3 -fstack-protector-strong -ftrivial-auto-var-init=zero -fno-stack-clash-protection -pg -mfentry -DCC_USING_NOP_MCOUNT -DCC_USING_FENTRY -fno-lto -flto=thin -fsplit-lto-unit -fvisibility=hidden -falign-functions=16 -fstrict-flex-arrays=3 -fno-strict-overflow -fno-stack-check -fno-builtin-wcslen -Wall -Wextra -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wmissing-declarations -Wmissing-prototypes -Wframe-larger-than=2048 -Wno-gnu -Wno-format-overflow-non-kprintf -Wno-format-truncation-non-kprintf -Wno-pointer-sign -Wcast-function-type -Wimplicit-fallthrough -Werror=date-time -Wenum-conversion -Wunused -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-format-overflow -Wno-override-init -Wno-pointer-to-enum-cast -Wno-tautological-constant-out-of-range-compare -Wno-unaligned-access -Wno-enum-compare-conditional -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-enum-enum-conversion -Wno-sign-compare -Wno-unused-parameter -DVERSION=v0.9-226-ga16acb0 -DMODULE -DKBUILD_BASENAME='"xpadneo"' -DKBUILD_MODNAME='"hid_xpadneo"' -D__KBUILD_MODNAME=kmod_hid_xpadneo -c -o xpadneo.o xpadneo.c
xpadneo.c:1226:14: error: call to undeclared function 'ida_simple_get'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1226 | xdata->id = ida_simple_get(&xpadneo_device_id_allocator, 0, 0, GFP_KERNEL);
| ^
xpadneo.c:1331:3: error: call to undeclared function 'ida_simple_remove'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1331 | ida_simple_remove(&xpadneo_device_id_allocator, xdata->id);
First of all thanks for the great work you have done so far! Same issue here with Cachy OS after upgrade to 6.18. When do you think ill the fix be released?
I will first rebase my kernel patches to 6.18 to boot my system with 6.18, then I'll fix the master branch. Due to current situation, I will release v0.10 early without some of the work I was planning to do.
As a side note, from my past years experience, it's probably wise to wait for 6.18.1 or 6.18.2 anyways.
I will first rebase my kernel patches to 6.18 to boot my system with 6.18, then I'll fix the master branch. Due to current situation, I will release v0.10 early without some of the work I was planning to do.
As a side note, from my past years experience, it's probably wise to wait for 6.18.1 or 6.18.2 anyways.
Take your time and we appreciate all your hard work! Wired controls until then, not a life changing event.
I also have exactly the same issue also on cachyos as they pushed 6.18 out today/yesterday. It seams your well aware of it though :) thank you for all your effort.
I had this issue too. Thanks @kakra - I checked out your fork and it now works! Thanks.
For any that are following along and want a fix sooner (arch):
# remove xpadneo
sudo pacman -Rns xpadneo
# install deps
sudo pacman -S dkms linux-headers git
# checkout git
git clone https://github.com/atar-axis/xpadneo.git
cd xpadneo
git remote add kakra https://github.com/kakra/xpadneo.git
git fetch kakra
git checkout -b queue-for-0.10 kakra/queue/for-0.10
sudo ./install.sh
I also have exactly the same issue also on cachyos as they pushed 6.18 out today/yesterday. It seams your well aware of it though :) thank you for all your effort.
Yes, that's why we have ootb double kernel on Cachy with 6.12 LTS waiting for those who can't stand cable gaming. I gotta say the power of Linux is the community and ease of communication. We are well informed and can do the needful (game with a controller) more efficient than you know who. Thanks for the amazing xpadneo driver.