The fix is to change the MAKE line in dkms.conf, as it works correctly when it is
MAKE[0]="'make' all KVER=${kernelver}"
When it uses MAKE="'make' all" it compiles against the old kernel and you see things like
modinfo 8812au | egrep 'file|ver' filename: /lib/modules/4.4.0-112-generic/updates/dkms/8812au.ko version: v4.3.8_12175.20140902 description: Realtek Wireless Lan Driver srcversion: 5E9D12706FAF7E2BB4F284E vermagic: 4.4.0-109-generic SMP mod_unload modversions
The vermagic kernel version doesn't match the kernel in the file name
The fix is to change the MAKE line in dkms.conf, as it works correctly when it is
MAKE[0]="'make' all KVER=${kernelver}"
When it uses MAKE="'make' all" it compiles against the old kernel and you see things like
modinfo 8812au | egrep 'file|ver' 4.4.0-112- generic/ updates/ dkms/8812au. ko 12175.20140902 BB4F284E
filename: /lib/modules/
version: v4.3.8_
description: Realtek Wireless Lan Driver
srcversion: 5E9D12706FAF7E2
vermagic: 4.4.0-109-generic SMP mod_unload modversions
The vermagic kernel version doesn't match the kernel in the file name