Make issue when building for new kernel
I'm getting the following issue when trying to build the module for a kernel upgrade.
DKMS (dkms-3.2.1) make.log for hid-xpadneo-v0.9-226/ga16acb0 for kernel 6.15.9-arch1-1 (x86_64)
Mon 04 Aug 2025 15:25:22 AEST
Building module(s)
# command: make -j16 KERNELRELEASE=6.15.9-arch1-1 -C '/usr/lib/modules/6.15.9-arch1-1/build' M='/var/lib/dkms/hid-xpadneo/v0.9-226-ga16acb0/build/src' VERSION='v0.9-226-ga16acb0' modules
make: Entering directory '/usr/lib/modules/6.15.9-arch1-1/build'
Makefile:199: *** specified external module directory "/var/lib/dkms/hid-xpadneo/v0.9-226-ga16acb0/build/src" does not exist. Stop.
make: Leaving directory '/usr/lib/modules/6.15.9-arch1-1/build'
# exit code: 2
# elapsed time: 00:00:00
----------------------------------------------------------------
The directory it wants does indeed not exist on my machine, but installing after a restart (i.e sudo modprobe uhid; ./install.sh) works totally fine.
Not sure how I would go about fixing this properly and submitting a pull request for said fix, so any help is greatly appreciated. Thanks!
You probably need to install the required kernel headers.
Reinstalling the prerequisites leads to the same error
sudo pacman -S dkms linux-headers bluez bluez-utils
warning: dkms-3.2.1-1 is up to date -- reinstalling
warning: linux-headers-6.15.9.arch1-1 is up to date -- reinstalling
warning: bluez-5.83-1 is up to date -- reinstalling
warning: bluez-utils-5.83-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (4) bluez-5.83-1 bluez-utils-5.83-1 dkms-3.2.1-1 linux-headers-6.15.9.arch1-1
Total Installed Size: 244.86 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n]
//install proceeds
:: Running post-transaction hooks...
(1/7) Reloading system manager configuration...
(2/7) Reloading user manager configuration...
(3/7) Restarting marked services...
(4/7) Arming ConditionNeedsUpdate...
(5/7) Updating module dependencies...
(6/7) Install DKMS modules
==> dkms install --no-depmod hid-xpadneo-v0.9-226/ga16acb0 -k 6.15.9-arch1-1
Deprecated feature: CLEAN (/var/lib/dkms/hid-xpadneo-v0.9-226/ga16acb0/source/dkms.conf)
Error! Bad return status for module build on kernel: 6.15.9-arch1-1 (x86_64)
Consult /var/lib/dkms/hid-xpadneo-v0.9-226/ga16acb0/build/make.log for more information.
==> WARNING: `dkms install --no-depmod hid-xpadneo-v0.9-226/ga16acb0 -k 6.15.9-arch1-1' exited 10
(7/7) Reloading system bus configuration...
make.log is identical (aside from time stamps of course)
Consult /var/lib/dkms/hid-xpadneo-v0.9-226/ga16acb0/build/make.log for more information.
Please post this... It looks like a different error.
You got it
DKMS (dkms-3.2.1) make.log for hid-xpadneo-v0.9-226/ga16acb0 for kernel 6.15.9-arch1-1 (x86_64)
Tue 05 Aug 2025 11:25:53 AEST
Building module(s)
# command: make -j16 KERNELRELEASE=6.15.9-arch1-1 -C '/usr/lib/modules/6.15.9-arch1-1/build' M='/var/lib/dkms/hid-xpadneo/v0.9-226-ga16acb0/build/src' VERSION='v0.9-226-ga16acb0' modules
make: Entering directory '/usr/lib/modules/6.15.9-arch1-1/build'
Makefile:199: *** specified external module directory "/var/lib/dkms/hid-xpadneo/v0.9-226-ga16acb0/build/src" does not exist. Stop.
make: Leaving directory '/usr/lib/modules/6.15.9-arch1-1/build'
# exit code: 2
# elapsed time: 00:00:00
----------------------------------------------------------------
Okay, maybe /var/lib/dkms/hid-xpadneo/v0.9-226-ga16acb0/build/src contains a stale symlink? Could you try re-installing xpadneo?
If this fixes it, that problem shouldn't happen in the first place. I'm pretty sure dkms should manage such a symlink.
Reinstalling via sudo ./install.sh does work as expected:
sudo ./install.sh
* deploying DKMS package
Deprecated feature: CLEAN (/usr/src/hid-xpadneo-v0.9-226-ga16acb0/dkms.conf)
Creating symlink /var/lib/dkms/hid-xpadneo/v0.9-226-ga16acb0/source -> /usr/src/hid-xpadneo-v0.9-226-ga16acb0
* building module
Deprecated feature: CLEAN (/var/lib/dkms/hid-xpadneo/v0.9-226-ga16acb0/source/dkms.conf)
Sign command: /usr/lib/modules/6.15.9-arch1-1/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Building module(s)... done.
Signing module /var/lib/dkms/hid-xpadneo/v0.9-226-ga16acb0/build/src/hid-xpadneo.ko
* installing module
Deprecated feature: CLEAN (/var/lib/dkms/hid-xpadneo/v0.9-226-ga16acb0/source/dkms.conf)
Installing /usr/lib/modules/6.15.9-arch1-1/updates/dkms/hid-xpadneo.ko.zst
Running the post_install script:
Not disabling ERTM, kernel version doesn't require it...
Installing modalias database...
Installing udev rules...
Reloading udev...
Running depmod... done.
But reinstalling kernel headers still produces the same error:
sudo pacman -S dkms linux-headers bluez bluez-utils
warning: dkms-3.2.1-1 is up to date -- reinstalling
warning: linux-headers-6.15.9.arch1-1 is up to date -- reinstalling
warning: bluez-5.83-1 is up to date -- reinstalling
warning: bluez-utils-5.83-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (4) bluez-5.83-1 bluez-utils-5.83-1 dkms-3.2.1-1 linux-headers-6.15.9.arch1-1
Total Installed Size: 244.86 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n]
(4/4) checking keys in keyring [###################################################################] 100%
(4/4) checking package integrity [###################################################################] 100%
(4/4) loading package files [###################################################################] 100%
(4/4) checking for file conflicts [###################################################################] 100%
(4/4) checking available disk space [###################################################################] 100%
:: Running pre-transaction hooks...
(1/1) Remove upgraded DKMS modules
==> dkms remove --no-depmod hid-xpadneo/v0.9-226-ga16acb0 -k 6.15.9-arch1-1
:: Processing package changes...
(1/4) reinstalling dkms [###################################################################] 100%
(2/4) reinstalling linux-headers [###################################################################] 100%
(3/4) reinstalling bluez [###################################################################] 100%
(4/4) reinstalling bluez-utils [###################################################################] 100%
:: Running post-transaction hooks...
(1/7) Reloading system manager configuration...
(2/7) Reloading user manager configuration...
(3/7) Restarting marked services...
(4/7) Arming ConditionNeedsUpdate...
(5/7) Updating module dependencies...
(6/7) Install DKMS modules
==> dkms install --no-depmod hid-xpadneo-v0.9-226/ga16acb0 -k 6.15.9-arch1-1
Deprecated feature: CLEAN (/var/lib/dkms/hid-xpadneo-v0.9-226/ga16acb0/source/dkms.conf)
Error! Bad return status for module build on kernel: 6.15.9-arch1-1 (x86_64)
Consult /var/lib/dkms/hid-xpadneo-v0.9-226/ga16acb0/build/make.log for more information.
==> WARNING: `dkms install --no-depmod hid-xpadneo-v0.9-226/ga16acb0 -k 6.15.9-arch1-1' exited 10
(7/7) Reloading system bus configuration...
/var/lib/dkms/hid-xpadneo-v0.9-226/ga16acb0/build/make.log for posterity:
DKMS (dkms-3.2.1) make.log for hid-xpadneo-v0.9-226/ga16acb0 for kernel 6.15.9-arch1-1 (x86_64)
Tue 05 Aug 2025 11:39:16 AEST
Building module(s)
# command: make -j16 KERNELRELEASE=6.15.9-arch1-1 -C '/usr/lib/modules/6.15.9-arch1-1/build' M='/var/lib/dkms/hid-xpadneo/v0.9-226-ga16acb0/build/src' VERSION='v0.9-226-ga16acb0' modules
make: Entering directory '/usr/lib/modules/6.15.9-arch1-1/build'
Makefile:199: *** specified external module directory "/var/lib/dkms/hid-xpadneo/v0.9-226-ga16acb0/build/src" does not exist. Stop.
make: Leaving directory '/usr/lib/modules/6.15.9-arch1-1/build'
# exit code: 2
# elapsed time: 00:00:00
----------------------------------------------------------------
Okay thanks. So the Arch trigger for reinstalling DKMS modules is different to what we do. I think this is enough context to try and reproduce this issue. Thank you very much.
Do let me know if you need more information from me at any point
@Wheelz108 Did you just roll the kernel back for a workaround for this?
My workaround right now is manually reinstalling with the dkms module install script after a restart. The driver does work with new kernels, I just need to manually reinstall it rather than having it done as part of the upgrade process.
Kernel: 6.15.10 OS: Fedora 42 Repo: shdwchn10/xpadneo
I can confirm on reboot, the system crashed on login screen (screen froze, fans making noise). I didn't bother rolling back kernel to see if it works better with an older kernel. Just reverted to previous stable Btrfs snapshot, taken prior to ingesting xpadneo and dependencies.