Mailinglist Archive: opensuse-factory (520 mails)

< Previous Next >
Re: [opensuse-factory] Tumbeweed - Nvidia 340.102 Driver Compile Fails
On Sat, 2017-05-13 at 16:17 -0400, Patrick Shanahan wrote:
* Sudhir Anand <sudhir.anand.1@xxxxxxxxxxx> [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 ./ -aqs --install-libglvnd
The installer log gives the following message:

  /home/sudhir/Downloads/nvidia/extract/n102/kernel/nv-drm.c: At top
error: initialization from incompatible pointer type [-
        .unload = nv_drm_unload,
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/
/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-
   make[1]: *** [Makefile:150: sub-make] Error 2
   make[1]: Leaving directory '/usr/src/linux-4.10.13-1'
   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

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

The patch from
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,
    .set_busid = drm_pci_set_busid,

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

N�����r��y隊Z)z{.���r�+�맲��r��z�^�ˬz��N�(�֜��^� ޭ隊Z)z{.���r�+��0�������Ǩ�
< Previous Next >