On 13/05/17 05:21 PM, Sudhir Anand wrote:
On Saturday, 13 May 2017 22:03:39 BST Sudhir Anand wrote:
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.
Just as a followup, there appear to be two versions of Nvidia installers. The 378 installer is for GeForce 400 chipset onwards. I am running 300 series chipset and require 340 installer. The website for patches appears specifically for 340 installer.
Regards.
Sudhir Anand. N�����r��y隊Z)z{.���r�+�맲��r��z�^�ˬz��N�(�֜��^� ޭ隊Z)z{.���r�+��0�����Ǩrg==
I have patched the driver using the following command: # sh NVIDIA-Linux-x86_64-340.102.run --apply-patch kernel.11.patch Roman -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org