On Saturday, 13 May 2017 23:17:36 BST Patrick Shanahan wrote:
* Sudhir Anand
[05-13-17 17:06]: On Sat, 2017-05-13 at 16:17 -0400, Patrick Shanahan wrote:
* Sudhir Anand
[05-13-17 15:38]: I cannot compile Nvidia driver using Kernel 4.10 with Tumbleweed. Any ideas how to successfully install the driver?
difficult to give any meaninful answer w/o some indication of why it fails, but: sh ./NVIDIA-Linux-x86_64-381.09.run -aqs --install-libglvnd
The installer log gives the following message:
/home/sudhir/Downloads/nvidia/extract/n102/kernel/nv-drm.c: At top level: /home/sudhir/Downloads/nvidia/extract/n102/kernel/nv-drm.c:120:15: error: initialization from incompatible pointer type [- Werror=incompatible-pointer-types] .unload = nv_drm_unload, ^~~~~~~~~~~~~ /home/sudhir/Downloads/nvidia/extract/n102/kernel/nv-drm.c:120:15: note: (near initialization for ‘nv_drm_driver.unload’) cc1: some warnings being treated as errors make[3]: *** [/usr/src/linux-4.10.13-1/scripts/Makefile.build:296: /home/sudhir/Downloads/nvidia/extract/n102/kernel/nv-drm.o] Error 1 make[2]: *** [/usr/src/linux-4.10.13-1/Makefile:1500: _module_/home/sudhir/Downloads/nvidia/extract/n102/kernel] Error 2 make[2]: Leaving directory '/usr/src/linux-4.10.13-1- obj/x86_64/default' make[1]: *** [Makefile:150: sub-make] Error 2 make[1]: Leaving directory '/usr/src/linux-4.10.13-1' NVIDIA: left KBUILD. nvidia.ko failed to build! make: *** [Makefile:185: nvidia.ko] Error 1 -> Error. ERROR: Unable to build the NVIDIA kernel module. ERROR: Installation has failed. Please see the file '/var/log/nvidia- installer.log' for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.
I do not understand this message.
I have been struggling to get the driver to install. Just in the last couple of minutes I have succeeded.
The steps were: Download nvidia 340.102 from nvidia's site
Apply patch from https://pkgs.rpmfusion.org/cgit/nonfree/nvidia-340xx-k mod.git/tree/4.10.0_kernel.patch
The patch from https://pkgs.rpmfusion.org/cgit/nonfree/nvidia-340xx-kmo d.git/tree/4.9.0_kernel.patch has to be applied but does not work. I am not an expert but the line numbers do not match with source file.
I had to manually amend file kernel/nv-drm.c from line 117.
Lines 117-124 should be as follows:
static struct drm_driver nv_drm_driver = { .driver_features = DRIVER_GEM | DRIVER_PRIME | DRIVER_LEGACY, .load = nv_drm_load, .unload = nv_drm_unload, .fops = &nv_drm_fops, #if defined(NV_DRM_PCI_SET_BUSID_PRESENT) .set_busid = drm_pci_set_busid, #endif
After applying 4.10.0 patch and amending file nv-drm.c, the driver compiled and installed correctly.
I hope this helps others having a similar problem. The rpmfusion site above has a patch for kernel 4.11. Presumably have to apply all three patches.
Regards. N?????r??y隊Z)z{.???r?+?맲??r??z?^?ˬz??N?(?֜??^? ޭ隊Z)z{.???r?+??0???????Ǩ
the install suggested you read /var/log/nvidia-installer.log
did you
especially look for ERR or ERROR(s)
340.102 is probably not for 4.11, have you tried a newer package? 381.09 works w/o a patch, ie: is build for 4.11 kernel. As mentioned earlier, I cannot use 381.09 as it does not support Nvidia's 300 series of chip sets. 381.09 is for 400 onward.
By the way, the extract above is from nvidia-installer log. The last line is shown when the installer fails :). Sudhir -- Sudhir Anand