I have a problem with DKMS building bad modules (insmod reports "Invalid module format"). If i run DKMS manually to build and install the modules it works fine, but when done automatically in conjunction with the Software Updater the modules don't build correctly.
I'm assuming DKMS builds with incorrect headers when the kernel is being updated? Any idea how I can investigate this further?
Not sure why but there seems to be multiple dkms.conf for each module:
find / -name dkms.conf
/etc/modprobe.d/dkms.conf /usr/src/bcmwl-184.108.40.206+bdcom/dkms.conf /usr/src/8812au-4.2.2/dkms.conf /var/lib/dkms/bcmwl/220.127.116.11+bdcom/build/dkms.conf /var/lib/dkms/8812au/4.2.2/build/dkms.conf
# modprobe information used for DKMS modules # # This is a stub file, should be edited when needed, # used by default by DKMS.
PACKAGE_NAME=8812au PACKAGE_VERSION=1.0 MAKE="'make'" BUILT_MODULE_NAME=8812au BUILT_MODULE_LOCATION="./" DEST_MODULE_LOCATION="/kernel/updates/dkms" AUTOINSTALL="YES"
There's no difference between the two 8812au dkms.conf files:
diff /usr/src/8812au-4.2.2/dkms.conf /var/lib/dkms/8812au/4.2.2/build/dkms.conf
elementary OS Freya \n \l
New kernel update, same thing happened.
I recorded my interactions so you can see everything seems fine. Video is a bit slow so i suggest using the links in description to jump to the interesting bits.
Before update: https://asciinema.org/a/7huqhlw0kp1iv10n4741y8rq6?t=6
After update: https://asciinema.org/a/2h2zf8j8fbgvup7rkc531sgxx?t=5
As you can see above DKMS compiles and installs the kernel module correctly, but it fails to load on the new kernel version. Simply running dkms uninstall/remove/build/install manually fixes the problem.
I'm not sure why when run automatically it doesnt work. Could it be that I need to run make clean beforehand or something silly like that?
Any help greatly appreciated.