version magic '5.2.10-yocto-standard SMP mod_unload ' should be '5.2.10-yocto-standard SMP preempt mod_unload '

Hi all, the following is in relation to this page, https://forums.balena.io/t/nvidia-drivers-on-intel-nuc/2903
So, I have intel hp omen and trying to run an example docker file suggested in the above link. I am running 2.50.1 rev1 the latest os version and the yocto version of 5.2.10. I am having difficulty getting nvidia drivers inserted. They are giving me ERROR: insmod could not load module nvidia: Invalid module format. so, I tried to load the modules using insmod and when I look at the dmesg , I am getting nvidia: version magic '5.2.10-yocto-standard SMP mod_unload ’ should be '5.2.10-yocto-standard SMP preempt mod_unload ’ error. I modified the kernel headers to download according to the resin os version. What is the difference between SMP mod_unload and SMP preempt mod_unload. And how do i get past this? Please help. Thanks !

Hi @lorugant , I am not sure about the difference between SMP preempt mod_unload and SMP mod_unload but I will ask some of the linux gurus. However what I would first try is switching to using the Generic x86_64 (NEW) device type for the OS. That device type is basically the same as the Intel NUC OS image but has many many more kernel drivers already pre-installed in it, so may already have the nvidia ones prebuilt, so its worth a shot.

Thank you for responding. I am using the balenalib/genericx86-64-ext-ubuntu-bionic as my base image. And for kernel headers, I am using https://files.resin.io/images/intel-nuc/2.50.1%2Brev1.prod/kernel_modules_headers.tar.gz and following the instructions in the dockerfile specified in the link I originally posted.

Sorry, I mean the OS image that you have flashed onto the device, not the one from the Dockerfile.

So according to my linux guru friend the “preempt” string is part of the module’s version magic. It basically means the kernel they have built the module against is not the same that the one running on the device trying to load the module. See https://elixir.bootlin.com/linux/latest/source/include/linux/vermagic.h#L14 .

So essentially one kernel is configured with CONFIG_PREEMPT and the other one is not. What I would suggest is to create a Generic x86_64 app on the dashboard, download the Generic x86_64 device type from that app and reflash your device with that OS. Then re push this project to that application and I believe it should work correctly.

@shaunmulligan Thank you! It makes sense. I will test it now and will update you on this.

ok very close. Now I am getting different errors such as the following

04.06.20 07:08:52 (-0400) gpu insmod: ERROR: could not insert module /dkms/nvidia.ko: No such device
04.06.20 07:08:52 (-0400) gpu insmod: ERROR: could not insert module /dkms/nvidia-uvm.ko: Unknown symbol in module
04.06.20 07:08:52 (-0400) gpu insmod: ERROR: could not insert module /dkms/nvidia-modeset.ko: Unknown symbol in module
04.06.20 07:08:52 (-0400) gpu insmod: ERROR: could not insert module /dkms/nvidia-drm.ko: Unknown symbol in module

But, I see that they are in that same path.

@shaunmulligan thank you for your help. I was having conflict with nouveau and thats why nvidia was was not getting called. I was able to disable and my application is working now. Thank you so much!