CUDA 9.1 setup and NVIDIA 390 driver not found on Ubuntu 16.04

Hello all,

I have Ubuntu 16.04 and kernel 4.15.4-041504-generic

I am trying to setup my development environment for CAFFE and I am following the instructions from here:
http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#runfile-installation

I am trying to install from the run file because it is recommended on the CAFFE website:
http://caffe.berkeleyvision.org/install_apt.html

Is the following sentence from the installation guide of Caffe still correct?
“The NVIDIA package tends to follow more recent library and driver versions”

I am installing the CUDA 9.1 and the NVidia driver separately.

For CUDA, I installed using the instructions and followed the post-installation with no problems.

After the CUDA installation finishes, for the Nvidia driver, I did this:

sudo apt-get purge nvidia*
sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update

Then I pressed crtl+alt+F2 to enter TTY

sudo service lightdm stop
sudo apt-get install nvidia-390

I reboot after seeing the console says the installation for nvidia-390 passed all the test and was successful.

I believe I installed and setup the CUDA 9.1 correctly because I get the following

jkuo@jkuo-ThinkPad:~/NVIDIA_CUDA-9.1_Samples/bin/x86_64/linux/release$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:07:56_CDT_2017
Cuda compilation tools, release 9.1, V9.1.85

And I was able to make(compile) in the NVIDIA_CUDA-9.1_Samples folder

However, I believe the NVidia-390 driver failed because when I run the deviceQuery from sample I get:

./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 35
-> CUDA driver version is insufficient for CUDA runtime version
Result = FAIL

Then I checked:

lspci | grep -i nvidia
02:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev ff)

dpkg -l | grep nvidia
ii  nvidia-390                                 390.25-0ubuntu0~gpu16.04.1                   amd64        NVIDIA binary driver - version 390.25
ii  nvidia-opencl-icd-390                      390.25-0ubuntu0~gpu16.04.1                   amd64        NVIDIA OpenCL ICD
ii  nvidia-prime                               0.8.2                                        amd64        Tools to enable NVIDIA's Prime
ii  nvidia-settings                            390.25-0ubuntu0~gpu16.04.1                   amd64        Tool for configuring the NVIDIA graphics drive

I also tried to reinstall the nvidia-390 driver multiple times with purge, tty, then install, but I still can’t seem to have my system configure to use the graphic card
I don’t know what is a good way of checking it, so i evaluate by this:

lspci -vnn | grep VGA -A 12
00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:591b] (rev 04) (prog-if 00 [VGA controller])
	Subsystem: Lenovo Device [17aa:5066]
	Flags: bus master, fast devsel, latency 0, IRQ 138
	Memory at d0000000 (64-bit, non-prefetchable) 
	Memory at c0000000 (64-bit, prefetchable) 
	I/O ports at e000 
	[virtual] Expansion ROM at 000c0000 [disabled] 
	Capabilities: <access denied>
	Kernel driver in use: i915
	Kernel modules: i915

00:08.0 System peripheral [0880]: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model [8086:1911]
	Subsystem: Lenovo Skylake Gaussian Mixture Model [17aa:5066]

and lsmod | grep nvidia gives me nothing
People seem to have nvidia-smi, but i don’t have it for some reason. Is this something that needs to be installed externally?

Please give me detailed instructions of what you need and what I should do as I am new to Linux, CUDA and driver installations.

Thanks in advance.

Best,
JC

In my experience, this:

sudo add-apt-repository ppa:graphics-drivers

does not give you a driver that is suitable for CUDA usage. That ppa repository is not maintained by NVIDIA.

There are plenty of writeups on these forums about how to install CUDA correctly.

I seem to be having a related problem here as well. I am using Cuda 9.0 with Nvidia-387 on Ubuntu 16.04
but get the same error:

cudnnGetVersion() : 7005 , CUDNN_VERSION from cudnn.h : 7005 (7.0.5)
Cuda failurer version : GCC 5.4.0
Error: CUDA driver version is insufficient for CUDA runtime version

When running nvidia-smi command I get:

nvidia-smi: command not found

The binaries exist however in /usr/lib/nvidia-387/bin. After adding this to the PATH and also changing the variable LD_LIBRARY_PATH I can run nvidia-smi but get different problem:

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

@txbob

I think my CUDA is installed correctly because I can compile the CUDA samples and run the executables after.

The problem I am having is with installing the nvidia driver.
Since you said the ppa is not maintained by the official, I have removed it and download a .run file for nvidia-390 from http://www.nvidia.com/Download/index.aspx?lang=en-us
and looked at this instruction http://us.download.nvidia.com/XFree86/Linux-x86_64/390.42/README/installdriver.html#StartingTheInst6624e

I used ctrl+alt+F2 and disabled lightdm.

I ran the run file and the installation failed because my gcc version is 5.4 and the driver requires with gcc v7.5. Is there a way around this?

So i went back the old route and tried the PPA method again.
after installation, I tried lsmod | grep nvidia, it still returns nothing (I assume this is how you check if the driver is running)

then I did this:

jkuo@jkuo-ThinkPad:~$ sudo prime-select nvidia
Info: the current GL alternatives in use are: ['mesa', 'nvidia-390']
Info: the current EGL alternatives in use are: ['mesa-egl', 'nvidia-390']
Info: selecting nvidia-390 for the nvidia profile
update-alternatives: using /usr/lib/nvidia-390/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-390/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in manual mode

and then I can finally see something when tabbing nvidia-

jkuo@jkuo-ThinkPad:~$ nvidia-
nvidia-bug-report.sh     nvidia-debugdump         nvidia-settings          
nvidia-cuda-mps-control  nvidia-detector          nvidia-smi               
nvidia-cuda-mps-server   nvidia-persistenced      nvidia-xconfig

I want to verify again if the driver is running, so:

jkuo@jkuo-ThinkPad:~$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

Can you tell me from the information provided, is the driver installed? It is not running I think
And how do I run the driver as default?

It is not true that the driver requires gcc v7.5

ok, so i can’t get the error that shows the gcc version again.
So I did a clean install of Ubuntu 16.04
uname -r give me my kernel version: 4.13.0-36-generic

before installation I followed the blacklist nouveau instructions and did a

lsmod | grep nouveau

to confirm that nothing shows up, then i reboot

at log-in i used ctrl+alt+F2 and sudo service lightdm stop
Then I sudo sh the run file, the installation did not work and below is my installation log:

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Tue Mar 13 21:45:09 2018
installer version: 390.42

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

nvidia-installer command line:
    ./nvidia-installer

Unable to load: nvidia-installer ncurses v6 user interface

Using: nvidia-installer ncurses user interface
-> Detected 8 CPUs online; setting concurrency level to 8.
-> Installing NVIDIA driver version 390.42.
-> Running distribution scripts
   executing: '/usr/lib/nvidia/pre-install'...
-> done.
-> The distribution-provided pre-install script failed!  Are you sure you want to continue? (Answer: Continue installation)
-> Performing CC sanity check with CC="/usr/bin/cc".
-> Kernel source path: '/lib/modules/4.13.0-36-generic/build'
-> Kernel output path: '/lib/modules/4.13.0-36-generic/build'
-> Performing Compiler check.
-> Performing Dom0 check.
-> Performing Xen check.
-> Performing PREEMPT_RT check.
-> Performing vgpu_kvm check.
-> Cleaning kernel module build directory.
   executing: 'cd ./kernel; /usr/bin/make -k -j8 clean NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/4.13.0-36-generic/build" SYSOUT="/lib/modules/4.13.0-36-generic/build"'...
   rm -f -r conftest
   make[1]: Entering directory '/usr/src/linux-headers-4.13.0-36-generic'
   make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-36-generic'
-> Building kernel modules
   executing: 'cd ./kernel; /usr/bin/make -k -j8  NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/4.13.0-36-generic/build" SYSOUT="/lib/modules/4.13.0-36-generic/build"'...
   make[1]: Entering directory '/usr/src/linux-headers-4.13.0-36-generic'
     SYMLINK /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-kernel.o
     SYMLINK /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-modeset/nv-modeset-kernel.o
    CONFTEST: INIT_WORK
    CONFTEST: remap_pfn_range
    CONFTEST: hash__remap_4k_pfn
    CONFTEST: follow_pfn
    CONFTEST: vmap
    CONFTEST: set_pages_uc
    CONFTEST: set_memory_uc
    CONFTEST: set_memory_array_uc
    CONFTEST: change_page_attr
    CONFTEST: pci_get_class
    CONFTEST: pci_choose_state
    CONFTEST: vm_insert_page
    CONFTEST: acpi_device_id
    CONFTEST: acquire_console_sem
    CONFTEST: console_lock
    CONFTEST: kmem_cache_create
    CONFTEST: on_each_cpu
    CONFTEST: smp_call_function
    CONFTEST: acpi_evaluate_integer
    CONFTEST: ioremap_cache
    CONFTEST: ioremap_wc
    CONFTEST: acpi_walk_namespace
    CONFTEST: pci_domain_nr
    CONFTEST: pci_dma_mapping_error
    CONFTEST: sg_alloc_table
    CONFTEST: sg_init_table
    CONFTEST: pci_get_domain_bus_and_slot
    CONFTEST: get_num_physpages
    CONFTEST: efi_enabled
    CONFTEST: proc_create_data
    CONFTEST: pde_data
    CONFTEST: proc_remove
    CONFTEST: pm_vt_switch_required
    CONFTEST: xen_ioemu_inject_msi
    CONFTEST: phys_to_dma
    CONFTEST: get_dma_ops
    CONFTEST: write_cr4
    CONFTEST: of_find_node_by_phandle
    CONFTEST: of_get_property
    CONFTEST: of_node_to_nid
    CONFTEST: pnv_pci_get_npu_dev
    CONFTEST: for_each_online_node
    CONFTEST: node_end_pfn
    CONFTEST: pci_bus_address
    CONFTEST: pci_stop_and_remove_bus_device
    CONFTEST: pci_remove_bus_device
    CONFTEST: request_threaded_irq
    CONFTEST: register_cpu_notifier
    CONFTEST: cpuhp_setup_state
    CONFTEST: dma_map_resource
    CONFTEST: backlight_device_register
    CONFTEST: register_acpi_notifier
    CONFTEST: timer_setup
    CONFTEST: remap_page_range
    CONFTEST: address_space_init_once
    CONFTEST: kbasename
    CONFTEST: fatal_signal_pending
    CONFTEST: list_cut_position
    CONFTEST: vzalloc
    CONFTEST: wait_on_bit_lock_argument_count
    CONFTEST: bitmap_clear
    CONFTEST: usleep_range
    CONFTEST: radix_tree_empty
    CONFTEST: radix_tree_replace_slot
    CONFTEST: drm_dev_unref
    CONFTEST: drm_reinit_primary_mode_group
    CONFTEST: drm_atomic_set_mode_for_crtc
    CONFTEST: drm_atomic_clean_old_fb
    CONFTEST: get_user_pages_remote
    CONFTEST: get_user_pages
    CONFTEST: drm_gem_object_lookup
    CONFTEST: drm_atomic_state_free
    CONFTEST: drm_driver_has_gem_prime_res_obj
    CONFTEST: drm_atomic_helper_disable_all
    CONFTEST: drm_atomic_helper_set_config
    CONFTEST: drm_atomic_helper_connector_dpms
    CONFTEST: is_export_symbol_gpl_of_node_to_nid
    CONFTEST: i2c_adapter
    CONFTEST: pm_message_t
    CONFTEST: irq_handler_t
    CONFTEST: acpi_device_ops
    CONFTEST: acpi_op_remove
    CONFTEST: outer_flush_all
    CONFTEST: proc_dir_entry
    CONFTEST: scatterlist
    CONFTEST: sg_table
    CONFTEST: file_operations
    CONFTEST: vm_operations_struct
    CONFTEST: atomic_long_type
    CONFTEST: pci_save_state
    CONFTEST: file_inode
    CONFTEST: task_struct
    CONFTEST: kuid_t
    CONFTEST: dma_ops
    CONFTEST: dma_map_ops
    CONFTEST: noncoherent_swiotlb_dma_ops
    CONFTEST: vm_fault_present
    CONFTEST: vm_fault_has_address
    CONFTEST: kernel_write
    CONFTEST: strnstr
    CONFTEST: iterate_dir
    CONFTEST: kstrtoull
    CONFTEST: backlight_properties_type
    CONFTEST: fault_flags
    CONFTEST: atomic64_type
    CONFTEST: address_space
    CONFTEST: backing_dev_info
    CONFTEST: mm_context_t
    CONFTEST: vm_ops_fault_removed_vma_arg
    CONFTEST: pnv_npu2_init_context
    CONFTEST: drm_bus_present
    CONFTEST: drm_bus_has_bus_type
    CONFTEST: drm_bus_has_get_irq
    CONFTEST: drm_bus_has_get_name
    CONFTEST: drm_driver_has_legacy_dev_list
    CONFTEST: drm_driver_has_set_busid
    CONFTEST: drm_crtc_state_has_connectors_changed
    CONFTEST: drm_init_function_args
    CONFTEST: drm_mode_connector_list_update_has_merge_type_bits_arg
    CONFTEST: drm_helper_mode_fill_fb_struct
    CONFTEST: drm_master_drop_has_from_release_arg
    CONFTEST: drm_driver_unload_has_int_return_type
    CONFTEST: kref_has_refcount_of_type_refcount_t
    CONFTEST: drm_atomic_helper_crtc_destroy_state_has_crtc_arg
    CONFTEST: drm_crtc_helper_funcs_has_atomic_enable
    CONFTEST: dom0_kernel_present
    CONFTEST: nvidia_vgpu_kvm_build
    CONFTEST: nvidia_grid_build
    CONFTEST: drm_available
    CONFTEST: drm_atomic_available
    CONFTEST: drm_atomic_modeset_nonblocking_commit_available
    CONFTEST: is_export_symbol_gpl_refcount_inc
    CONFTEST: is_export_symbol_gpl_refcount_dec_and_test
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-frontend.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-instance.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-gpu-numa.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-acpi.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-chrdev.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-cray.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-dma.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-gvi.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-i2c.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-mempool.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-mmap.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-p2p.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-pat.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-procfs.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-usermap.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-vm.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-vtophys.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-interface.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-mlock.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-pci.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-registry.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-usermap.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-modeset-interface.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-pci-table.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-kthread-q.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-kthread-q-selftest.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-memdbg.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-ibmnpu.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-report-err.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nvlink_linux.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv_uvm_interface.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm_utils.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm_common.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm_linux.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/nvstatus.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/nvCpuUuid.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_tools.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_global.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_gpu.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_gpu_isr.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_procfs.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_va_space.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_gpu_semaphore.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_mem.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_rm_mem.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_channel.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_lock.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_hal.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_range_tree.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_range_allocator.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_va_range.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_va_block.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_range_group.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_gpu_replayable_faults.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_gpu_non_replayable_faults.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_gpu_access_counters.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_perf_events.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_perf_module.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_mmu.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pte_batch.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_tlb_batch.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_push.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pushbuffer.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_thread_context.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_tracker.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_kepler.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_kepler_ce.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_kepler_host.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_kepler_mmu.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_maxwell.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_maxwell_host.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pascal.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pascal_ce.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pascal_host.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pascal_mmu.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pascal_fault_buffer.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_volta_host.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_volta_mmu.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_volta.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_volta_fault_buffer.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_volta_access_counter_buffer.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_policy.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_perf_utils.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_kvmalloc.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pmm_sysmem.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pmm_gpu.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_migrate.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_map_external.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_user_channel.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_hmm.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_perf_heuristics.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_perf_thrashing.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_perf_prefetch.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_test_rng.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_range_tree_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_range_allocator_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_gpu_semaphore_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_mem_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_rm_mem_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_page_tree_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_tracker_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_push_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_channel_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_ce_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_lock_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_perf_utils_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_kvmalloc_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pmm_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pmm_sysmem_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_perf_events_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_perf_module_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_get_rm_ptes_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_fault_buffer_flush_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_mmu_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_peer_identity_mappings_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_va_block_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_range_group_tree_test.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-modeset/nvidia-modeset-linux.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-drv.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-utils.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-crtc.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-encoder.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-connector.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-gem.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-fb.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-modeset.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-prime-fence.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-linux.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-helper.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nv-pci-table.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-gem-nvkms-memory.o
     CC [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-gem-user-memory.o
   ld -r -o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-interface.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-frontend.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-instance.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-gpu-numa.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-acpi.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-chrdev.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-cray.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-dma.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-gvi.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-i2c.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-mempool.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-mmap.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-p2p.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-pat.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-procfs.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-usermap.o /tmp/selfgz1701/NVIDIA
   -Linux-x86_64-390.42/kernel/nvidia/nv-vm.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-vtophys.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-interface.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-mlock.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-pci.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-registry.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-usermap.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-modeset-interface.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-pci-table.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-kthread-q.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-kthread-q-selftest.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-memdbg.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-ibmnpu.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-report-err.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kerne
   l/nvidia/nv_uvm_interface.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nvlink_linux.o
   ld -r -o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-modeset/nv-modeset-interface.o /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-modeset/nvidia-modeset-linux.o
     LD [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia.o
     LD [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm.o
     LD [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-modeset.o
     LD [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm.o
     Building modules, stage 2.
     MODPOST 4 modules
     CC      /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm.mod.o
     CC      /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-modeset.mod.o
     CC      /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm.mod.o
     CC      /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia.mod.o
     LD [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm.ko
     LD [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-modeset.ko
     LD [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm.ko
     LD [M]  /tmp/selfgz1701/NVIDIA-Linux-x86_64-390.42/kernel/nvidia.ko
   make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-36-generic'
-> done.
-> Kernel module compilation complete.
ERROR: Unable to load the kernel module 'nvidia.ko'.  This happens most frequently when this kernel module was built against the wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the target kernel, or if a driver such as rivafb, nvidiafb, or nouveau is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA graphics device(s), or no NVIDIA GPU installed in this system is supported by this NVIDIA Linux graphics driver release.

Please see the log entries 'Kernel module load error' and 'Kernel messages' at the end of the file '/var/log/nvidia-installer.log' for more information.
-> Kernel module load error: No such device
-> Kernel messages:
[    6.716296] Bluetooth: RFCOMM socket layer initialized
[    6.716299] Bluetooth: RFCOMM ver 1.11
[    7.789399] r8169 0000:05:00.0 enp5s0: link up
[    7.789405] IPv6: ADDRCONF(NETDEV_CHANGE): enp5s0: link becomes ready
[  143.274944] VFIO - User Level meta-driver version: 0.3
[  143.280509] ipmi message handler version 39.2
[  143.281346] ipmi device interface
[  143.285219] nvidia: loading out-of-tree module taints kernel.
[  143.285224] nvidia: module license 'NVIDIA' taints kernel.
[  143.285224] Disabling lock debugging due to kernel taint
[  143.288753] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[  143.295890] nvidia-nvlink: Nvlink Core is being initialized, major device number 239
[  143.296070] pci_raw_set_power_state: 14 callbacks suppressed
[  143.296071] nvidia 0000:02:00.0: Refused to change power state, currently in D3
[  143.296156] NVRM: This is a 64-bit BAR mapped above 4GB by the system
               NVRM: BIOS or the Linux kernel, but the PCI bridge
               NVRM: immediately upstream of this GPU does not define
               NVRM: a matching prefetchable memory window.
[  143.296157] NVRM: This may be due to a known Linux kernel bug.  Please
               NVRM: see the README section on 64-bit BARs for additional
               NVRM: information.
[  143.296160] nvidia: probe of 0000:02:00.0 failed with error -1
[  143.296172] NVRM: The NVIDIA probe routine failed for 1 device(s).
[  143.296172] NVRM: None of the NVIDIA graphics adapters were initialized!
[  143.296243] nvidia-nvlink: Unregistered the Nvlink Core, major device number 239
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.

If your system has a BIOS option that mentions something similar to Enable/Disable 4G(B) decoding, switch it, reboot and retry to see if the NVIDIA driver loads then. It could also be fixed with a BIOS upgrade if available from your PC manufacturer or perhaps even trying a different kernel version.

Hello vacaloca,

I checked my BIOS options and I do not see anything close to Enable/Disable 4GB decoding.

I tried it with a higher kernel version 4.15.x, but it still did not work.

any other thoughts?

@txbob
So what does this error mean? Do i need a specific Ubuntu version or kernel version?
This time I got the gcc version error:

-> Performing CC sanity check with CC="/usr/bin/cc".
-> Kernel source path: '/lib/modules/4.15.8-041508-generic/build'
-> Kernel output path: '/lib/modules/4.15.8-041508-generic/build'
-> The CC version check failed:

The kernel was built with gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3.2), but the current compiler version is cc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609.

This may lead to subtle problems; if you are not certain whether the mismatched compiler will be compatible with your kernel, you may wish to abort installation, set the CC environment variable to the name of the compiler used to compile your kernel, and restart installation. (Answer: Ignore CC version check)
WARNING: Ignoring CC version mismatch:

The kernel was built with gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3.2), but the current compiler version is cc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609.

Thanks,
JC

The full log:

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Wed Mar 14 16:28:29 2018
installer version: 390.42

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

nvidia-installer command line:
    ./nvidia-installer

Unable to load: nvidia-installer ncurses v6 user interface

Using: nvidia-installer ncurses user interface
-> Detected 8 CPUs online; setting concurrency level to 8.
-> Installing NVIDIA driver version 390.42.
-> Running distribution scripts
   executing: '/usr/lib/nvidia/pre-install'...
-> done.
-> The distribution-provided pre-install script failed!  Are you sure you want to continue? (Answer: Continue installation)
-> Would you like to register the kernel module sources with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later. (Answer: No)
-> Performing CC sanity check with CC="/usr/bin/cc".
-> Kernel source path: '/lib/modules/4.15.8-041508-generic/build'
-> Kernel output path: '/lib/modules/4.15.8-041508-generic/build'
-> The CC version check failed:

The kernel was built with gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3.2), but the current compiler version is cc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609.

This may lead to subtle problems; if you are not certain whether the mismatched compiler will be compatible with your kernel, you may wish to abort installation, set the CC environment variable to the name of the compiler used to compile your kernel, and restart installation. (Answer: Ignore CC version check)
WARNING: Ignoring CC version mismatch:

The kernel was built with gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3.2), but the current compiler version is cc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609.
-> Performing Compiler check.
-> Performing Dom0 check.
-> Performing Xen check.
-> Performing PREEMPT_RT check.
-> Performing vgpu_kvm check.
-> Cleaning kernel module build directory.
   executing: 'cd ./kernel; /usr/bin/make -k -j8 clean NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/4.15.8-041508-generic/build" SYSOUT="/lib/modules/4.15.8-041508-generic/build"'...
   rm -f -r conftest
   make[1]: Entering directory '/usr/src/linux-headers-4.15.8-041508-generic'
   make[1]: Leaving directory '/usr/src/linux-headers-4.15.8-041508-generic'
-> Building kernel modules
   executing: 'cd ./kernel; /usr/bin/make -k -j8  NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/4.15.8-041508-generic/build" SYSOUT="/lib/modules/4.15.8-041508-generic/build"'...
   make[1]: Entering directory '/usr/src/linux-headers-4.15.8-041508-generic'
   Makefile:941: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
     SYMLINK /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-kernel.o
     SYMLINK /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-modeset/nv-modeset-kernel.o
    CONFTEST: INIT_WORK
    CONFTEST: remap_pfn_range
    CONFTEST: hash__remap_4k_pfn
    CONFTEST: follow_pfn
    CONFTEST: vmap
    CONFTEST: set_pages_uc
    CONFTEST: set_memory_uc
    CONFTEST: set_memory_array_uc
    CONFTEST: change_page_attr
    CONFTEST: pci_get_class
    CONFTEST: vm_insert_page
    CONFTEST: pci_choose_state
    CONFTEST: acpi_device_id
    CONFTEST: acquire_console_sem
    CONFTEST: console_lock
    CONFTEST: kmem_cache_create
    CONFTEST: on_each_cpu
    CONFTEST: smp_call_function
    CONFTEST: acpi_evaluate_integer
    CONFTEST: ioremap_cache
    CONFTEST: ioremap_wc
    CONFTEST: acpi_walk_namespace
    CONFTEST: pci_domain_nr
    CONFTEST: pci_dma_mapping_error
    CONFTEST: sg_alloc_table
    CONFTEST: sg_init_table
    CONFTEST: pci_get_domain_bus_and_slot
    CONFTEST: get_num_physpages
    CONFTEST: efi_enabled
    CONFTEST: proc_create_data
    CONFTEST: pde_data
    CONFTEST: proc_remove
    CONFTEST: pm_vt_switch_required
    CONFTEST: xen_ioemu_inject_msi
    CONFTEST: phys_to_dma
    CONFTEST: get_dma_ops
    CONFTEST: write_cr4
    CONFTEST: of_get_property
    CONFTEST: of_find_node_by_phandle
    CONFTEST: of_node_to_nid
    CONFTEST: pnv_pci_get_npu_dev
    CONFTEST: for_each_online_node
    CONFTEST: node_end_pfn
    CONFTEST: pci_bus_address
    CONFTEST: pci_stop_and_remove_bus_device
    CONFTEST: pci_remove_bus_device
    CONFTEST: request_threaded_irq
    CONFTEST: register_cpu_notifier
    CONFTEST: cpuhp_setup_state
    CONFTEST: dma_map_resource
    CONFTEST: backlight_device_register
    CONFTEST: register_acpi_notifier
    CONFTEST: timer_setup
    CONFTEST: remap_page_range
    CONFTEST: address_space_init_once
    CONFTEST: kbasename
    CONFTEST: fatal_signal_pending
    CONFTEST: list_cut_position
    CONFTEST: vzalloc
    CONFTEST: wait_on_bit_lock_argument_count
    CONFTEST: bitmap_clear
    CONFTEST: usleep_range
    CONFTEST: radix_tree_replace_slot
    CONFTEST: radix_tree_empty
    CONFTEST: drm_dev_unref
    CONFTEST: drm_reinit_primary_mode_group
    CONFTEST: drm_atomic_clean_old_fb
    CONFTEST: drm_atomic_set_mode_for_crtc
    CONFTEST: get_user_pages_remote
    CONFTEST: get_user_pages
    CONFTEST: drm_gem_object_lookup
    CONFTEST: drm_atomic_state_free
    CONFTEST: drm_driver_has_gem_prime_res_obj
    CONFTEST: drm_atomic_helper_disable_all
    CONFTEST: drm_atomic_helper_set_config
    CONFTEST: drm_atomic_helper_connector_dpms
    CONFTEST: is_export_symbol_gpl_of_node_to_nid
    CONFTEST: i2c_adapter
    CONFTEST: pm_message_t
    CONFTEST: irq_handler_t
    CONFTEST: acpi_device_ops
    CONFTEST: acpi_op_remove
    CONFTEST: outer_flush_all
    CONFTEST: proc_dir_entry
    CONFTEST: scatterlist
    CONFTEST: sg_table
    CONFTEST: file_operations
    CONFTEST: vm_operations_struct
    CONFTEST: atomic_long_type
    CONFTEST: pci_save_state
    CONFTEST: file_inode
    CONFTEST: task_struct
    CONFTEST: kuid_t
    CONFTEST: dma_ops
    CONFTEST: dma_map_ops
    CONFTEST: noncoherent_swiotlb_dma_ops
    CONFTEST: vm_fault_present
    CONFTEST: vm_fault_has_address
    CONFTEST: kernel_write
    CONFTEST: strnstr
    CONFTEST: iterate_dir
    CONFTEST: kstrtoull
    CONFTEST: backlight_properties_type
    CONFTEST: fault_flags
    CONFTEST: atomic64_type
    CONFTEST: address_space
    CONFTEST: backing_dev_info
    CONFTEST: mm_context_t
    CONFTEST: vm_ops_fault_removed_vma_arg
    CONFTEST: pnv_npu2_init_context
    CONFTEST: drm_bus_present
    CONFTEST: drm_bus_has_bus_type
    CONFTEST: drm_bus_has_get_irq
    CONFTEST: drm_bus_has_get_name
    CONFTEST: drm_driver_has_legacy_dev_list
    CONFTEST: drm_driver_has_set_busid
    CONFTEST: drm_crtc_state_has_connectors_changed
    CONFTEST: drm_init_function_args
    CONFTEST: drm_mode_connector_list_update_has_merge_type_bits_arg
    CONFTEST: drm_helper_mode_fill_fb_struct
    CONFTEST: drm_master_drop_has_from_release_arg
    CONFTEST: drm_driver_unload_has_int_return_type
    CONFTEST: kref_has_refcount_of_type_refcount_t
    CONFTEST: drm_atomic_helper_crtc_destroy_state_has_crtc_arg
    CONFTEST: drm_crtc_helper_funcs_has_atomic_enable
    CONFTEST: dom0_kernel_present
    CONFTEST: nvidia_vgpu_kvm_build
    CONFTEST: nvidia_grid_build
    CONFTEST: drm_available
    CONFTEST: drm_atomic_available
    CONFTEST: drm_atomic_modeset_nonblocking_commit_available
    CONFTEST: is_export_symbol_gpl_refcount_inc
    CONFTEST: is_export_symbol_gpl_refcount_dec_and_test
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-frontend.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-instance.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-gpu-numa.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-acpi.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-dma.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-cray.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-chrdev.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-gvi.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-i2c.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-mempool.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-mmap.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-p2p.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-pat.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-procfs.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-usermap.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-vm.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-vtophys.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-interface.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-mlock.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-pci.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-registry.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-usermap.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-modeset-interface.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-pci-table.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-kthread-q.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-kthread-q-selftest.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-memdbg.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-ibmnpu.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-report-err.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv_uvm_interface.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nvlink_linux.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm_utils.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm_common.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm_linux.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/nvstatus.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/nvCpuUuid.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_tools.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_global.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_gpu.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_gpu_isr.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_procfs.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_va_space.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_gpu_semaphore.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_mem.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_rm_mem.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_channel.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_lock.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_hal.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_range_tree.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_range_allocator.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_va_range.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_va_block.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_range_group.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_gpu_replayable_faults.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_gpu_non_replayable_faults.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_gpu_access_counters.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_perf_events.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_perf_module.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_mmu.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pte_batch.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_tlb_batch.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_push.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pushbuffer.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_thread_context.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_tracker.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_kepler.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_kepler_ce.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_kepler_host.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_kepler_mmu.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_maxwell.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_maxwell_host.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pascal.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pascal_ce.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pascal_host.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pascal_mmu.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pascal_fault_buffer.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_volta_host.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_volta_mmu.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_volta.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_volta_fault_buffer.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_volta_access_counter_buffer.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_policy.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_perf_utils.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_kvmalloc.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pmm_sysmem.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pmm_gpu.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_migrate.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_map_external.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_user_channel.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_hmm.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_perf_heuristics.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_perf_thrashing.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_perf_prefetch.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_test_rng.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_range_tree_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_range_allocator_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_gpu_semaphore_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_mem_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_rm_mem_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_page_tree_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_tracker_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_push_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_channel_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_ce_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_lock_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_perf_utils_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_kvmalloc_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pmm_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_pmm_sysmem_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_perf_events_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_perf_module_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_get_rm_ptes_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_fault_buffer_flush_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_mmu_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_peer_identity_mappings_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_va_block_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm/uvm8_range_group_tree_test.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-modeset/nvidia-modeset-linux.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-drv.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-utils.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-crtc.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-encoder.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-connector.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-gem.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-fb.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-modeset.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-prime-fence.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-linux.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-helper.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nv-pci-table.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-gem-nvkms-memory.o
     CC [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm/nvidia-drm-gem-user-memory.o
   ld -r -o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-interface.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-frontend.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-instance.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-gpu-numa.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-acpi.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-chrdev.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-cray.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-dma.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-gvi.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-i2c.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-mempool.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-mmap.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-p2p.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-pat.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-39
   0.42/kernel/nvidia/nv-procfs.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-usermap.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-vm.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-vtophys.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-interface.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-mlock.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-pci.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-registry.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/os-usermap.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-modeset-interface.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-pci-table.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-kthread-q.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-kthread-q-selftest.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-memdbg.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-ibmnpu.
   o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv-report-err.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nv_uvm_interface.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia/nvlink_linux.o
   ld -r -o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-modeset/nv-modeset-interface.o /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-modeset/nvidia-modeset-linux.o
     LD [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia.o
     LD [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-modeset.o
     LD [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm.o
     LD [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm.o
     Building modules, stage 2.
     MODPOST 4 modules
     CC      /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm.mod.o
     CC      /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-modeset.mod.o
     CC      /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm.mod.o
     CC      /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia.mod.o
     LD [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-modeset.ko
     LD [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-uvm.ko
     LD [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia.ko
     LD [M]  /tmp/selfgz3173/NVIDIA-Linux-x86_64-390.42/kernel/nvidia-drm.ko
   make[1]: Leaving directory '/usr/src/linux-headers-4.15.8-041508-generic'
-> done.
-> Kernel module compilation complete.
ERROR: Unable to load the kernel module 'nvidia.ko'.  This happens most frequently when this kernel module was built against the wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the target kernel, or if a driver such as rivafb, nvidiafb, or nouveau is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA graphics device(s), or no NVIDIA GPU installed in this system is supported by this NVIDIA Linux graphics driver release.

Please see the log entries 'Kernel module load error' and 'Kernel messages' at the end of the file '/var/log/nvidia-installer.log' for more information.
-> Kernel module load error: No such device
-> Kernel messages:
[  141.590401] wlp4s0: send auth to a0:2b:b8:44:3b:60 (try 1/3)
[  141.595527] wlp4s0: authenticated
[  141.596018] wlp4s0: associate with a0:2b:b8:44:3b:60 (try 1/3)
[  141.599867] wlp4s0: RX AssocResp from a0:2b:b8:44:3b:60 (capab=0x8011 status=0 aid=7)
[  141.658277] wlp4s0: associated
[  143.986018] IPv6: ADDRCONF(NETDEV_CHANGE): wlp4s0: link becomes ready
[ 1240.407351] do_trap: 23 callbacks suppressed
[ 1240.407352] traps: chromium-browse[2461] trap int3 ip:55f7df0bd933 sp:7ffe37c5b940 error:0 in chromium-browser[55f7dcafc000+730e000]
[ 1574.390044] VFIO - User Level meta-driver version: 0.3
[ 1574.395967] ipmi message handler version 39.2
[ 1574.396952] ipmi device interface
[ 1574.400788] nvidia: module license 'NVIDIA' taints kernel.
[ 1574.400789] Disabling lock debugging due to kernel taint
[ 1574.410969] nvidia-nvlink: Nvlink Core is being initialized, major device number 239
[ 1574.411140] NVRM: This is a 64-bit BAR mapped above 4GB by the system
               NVRM: BIOS or the Linux kernel, but the PCI bridge
               NVRM: immediately upstream of this GPU does not define
               NVRM: a matching prefetchable memory window.
[ 1574.411140] NVRM: This may be due to a known Linux kernel bug.  Please
               NVRM: see the README section on 64-bit BARs for additional
               NVRM: information.
[ 1574.411143] nvidia: probe of 0000:02:00.0 failed with error -1
[ 1574.411152] NVRM: The NVIDIA probe routine failed for 1 device(s).
[ 1574.411153] NVRM: None of the NVIDIA graphics adapters were initialized!
[ 1574.411225] nvidia-nvlink: Unregistered the Nvlink Core, major device number 239
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.

Is this a laptop system?

Yes, I have a lenovo E570 with 1050 Ti mobile

When you purchased the laptop from Lenovo, what operating system was installed?

Windows 10

So lets start out with the proviso that there’s really no guarantee that your laptop can be made to work correctly with linux the way you might want. Modern laptops with optimus graphics are specifically designed to work with windows, and it often requires substantial effort and trial and error to get GPU accelerated graphics and/or CUDA running under linux. Any support provided by NVIDIA (i.e. me) is on a best-efforts basis, and I may not be able to answer all your questions. You might need to try things and discover that they don’t work, and then you may need to try something else. Lenovo may very well have designed some characteristics that don’t play well with our linux GPU driver. So if you ask me “what does this error mean?” I may not know the answer. And I won’t necessarily be able to get you an answer for any/every question you may. That is not how this support forum works, and in general, NVIDIA does not provide end-user support that way. This is a community-based, best efforts forum. Furthermore, I don’t have your laptop and I don’t know in detail what BIOS settings your laptop may have, or what changes need to be made, or how to tell you to make those changes.

If this were my system, the first thing I would try would be to do a clean load of Ubuntu 16.04, and make sure the kernel version is 4.10 or earlier. So this means maybe you don’t use 16.04.05, or maybe you don’t immediately do sudo apt-get upgrade after you install the OS.

With that baseline, I would simply try a network deb install of CUDA 9.1, and see what happens. Don’t use a runfile installer, and don’t use the local deb installer.

Be sure to get the network deb installer from http://www.nvidia.com/getcuda

Be sure to read the linux install guide, in its entirety, before starting the install:

http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html

In case it’s not clear, I’m suggesting you don’t separately install a driver. The network deb method should pick up an acceptable R390 driver. The condensed instructions are just what is reported on the download page:

sudo dpkg -i cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda

Hello txbob,

I apologize if I sounded demanding, that was definitely not my intention.
I understand how forum works and I appreciate any help. I just posted any questions I have, so if anyone knows anything they can comment.

I will give the 4.10 method a try later.

Thanks.