ubuntu14.04 install graphic driver failed

detailed information:
notebook, two graphics: intel + NVIDIA970m
system: ubuntu14.04.5
kernel: 4.8

cannot install graphic driver successfully

what I have tried:
1 simply install by apt-get, but failed. After I installed, and run prime-detector, it returns None. And I cannot use prime-select to change the driver

2 install by cuda.run, failed. The reason is that cannot install graphic driver.

3 install by nvidia.run, failed.
The log is following:
nvidia-installer log file ‘/var/log/nvidia-installer.log’
creation time: Thu Oct 19 23:36:00 2017
installer version: 384.90

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.
→ License accepted.
→ Installing NVIDIA driver version 384.90.
→ 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: Yes)
→ Installing both new and classic TLS OpenGL libraries.
→ Installing both new and classic TLS 32bit OpenGL libraries.
→ Install NVIDIA’s 32-bit compatibility libraries? (Answer: Yes)
→ Will install GLVND GLX client libraries.
→ Will install GLVND EGL client libraries.
→ Skipping GLX non-GLVND file: “libGL.so.384.90”
→ Skipping GLX non-GLVND file: “libGL.so.1”
→ Skipping GLX non-GLVND file: “libGL.so”
→ Skipping EGL non-GLVND file: “libEGL.so.384.90”
→ Skipping EGL non-GLVND file: “libEGL.so”
→ Skipping EGL non-GLVND file: “libEGL.so.1”
→ Skipping GLX non-GLVND file: “./32/libGL.so.384.90”
→ Skipping GLX non-GLVND file: “libGL.so.1”
→ Skipping GLX non-GLVND file: “libGL.so”
→ Skipping EGL non-GLVND file: “./32/libEGL.so.384.90”
→ Skipping EGL non-GLVND file: “libEGL.so”
→ Skipping EGL non-GLVND file: “libEGL.so.1”
Looking for install checker script at ./libglvnd_install_checker/check-libglvnd-install.sh
executing: ‘/bin/sh ./libglvnd_install_checker/check-libglvnd-install.sh’…
Checking for libglvnd installation.
Checking libGLdispatch…
Can’t load library libGLdispatch.so.0: libGLdispatch.so.0: cannot open shared object file: No such file or directory
Will install libglvnd libraries.
Will install libEGL vendor library config file to /usr/share/glvnd/egl_vendor.d
→ Searching for conflicting files:
→ done.
→ Installing ‘NVIDIA Accelerated Graphics Driver for Linux-x86_64’ (384.90):
executing: ‘/sbin/ldconfig’…
→ done.
→ Driver file installation is complete.
→ Installing DKMS kernel module:
ERROR: Failed to run /usr/sbin/dkms build -m nvidia -v 384.90 -k 4.8.17-040817-generic:
Kernel preparation unnecessary for this kernel. Skipping…

Building module:
cleaning build area…
‘make’ -j8 NV_EXCLUDE_BUILD_MODULES=‘’ KERNEL_UNAME=4.8.17-040817-generic modules…(bad exit status: 2)
ERROR (dkms apport): binary package for nvidia: 384.90 not found
Error! Bad return status for module build on kernel: 4.8.17-040817-generic (x86_64)
Consult /var/lib/dkms/nvidia/384.90/build/make.log for more information.
→ error.
ERROR: Failed to install the kernel module through DKMS. No kernel module was installed; please try installing again without DKMS, or check the DKMS logs for more information.
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 find most of the solution in blog, but cannot have one for my situation. This is very urgent for me. I have tried to solve it for nearly one week.

Hope you can solve this problem.

Thanks very much!

It’s an Optimus laptop and you’re using Ubuntu so you should not use the .run installer at all. Please use the package from repos or the graphics ppa. Otherwise you would overwrite important system files and will not be able to switch between iGPU and dGPU.
The packages you need should be
ubuntu drivers-common
nvidia-prime
nvidia-384 (or nvidia-current)

hello, I have tried your suggestions. However, I cannot switch the GPU after I install the nvidia driver. It seems that the NVIDIA driver cannot be detected by the driver that I installed.

This is the error information when input ‘nvidia-setting’

liang@liang:~$ nvidia-settings

ERROR: Error querying enabled displays on GPU 0 (Missing Extension).

ERROR: Error querying connected displays on GPU 0 (Missing Extension).

** Message: PRIME: No offloading required. Abort
** Message: PRIME: is it supported? no

ERROR: nvidia-settings could not find the registry key file. This file should
have been installed along with this driver at
/usr/share/nvidia/nvidia-application-profiles-key-documentation. The
application profiles will continue to work, but values cannot be
prepopulated or validated, and will not be listed in the help text.
Please see the README for possible values and descriptions.

nvidia-settings can only be run when the nvidia gpu is already enabled.
Switching on ubuntu is done with
prime-select nvidia
and a reboot.
please post the output of
cat /var/log/gpu-manager.log
and
dpkg-query -l ‘nvidia*’

Please also run as root nvidia-bug-report.sh
if not found
/usr/lib/nvidia-XXX/bin/nvidia-bug-report.sh with XXX being the driver version (e.g.384)
and attach the tar.gz file it creates to your post.

Hi,

Please someone help, i have the same issue.

####Output of cat /var/log/gpu-manager.log

log_file: /var/log/gpu-manager.log
last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
can’t access /run/u-d-c-fglrx-was-loaded file
Looking for fglrx modules in /lib/modules/3.13.0-24-generic/updates/dkms
Looking for nvidia modules in /lib/modules/3.13.0-24-generic/updates/dkms
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is fglrx loaded? no
Was fglrx unloaded? no
Is fglrx blacklisted? no
Is intel loaded? yes
Is radeon loaded? no
Is radeon blacklisted? no
Is amdgpu loaded? no
Is amdgpu blacklisted? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is fglrx kernel module available? no
Is nvidia kernel module available? no
Detected LTS < 14.04.5. Forcing Intel/SNA
Vendor/Device Id: 8086:a16
BusID “PCI:0@0:2:0”
Is boot vga? yes
Error: can’t access /sys/bus/pci/devices/0000:00:02.0/driver
The device is not bound to any driver. Skipping…
Vendor/Device Id: 10de:1140
BusID “PCI:9@0:0:0”
Is boot vga? no
Skipping “/dev/dri/card0”, driven by “nvidia-drm”
Skipping “/dev/dri/card0”, driven by “nvidia-drm”
Skipping “/dev/dri/card0”, driven by “nvidia-drm”
Skipping “/dev/dri/card0”, driven by “nvidia-drm”
Does it require offloading? no
last cards number = 1
Has amd? no
Has intel? no
Has nvidia? yes
How many cards? 1
Has the system changed? No
main_arch_path x86_64-linux-gnu, other_arch_path i386-linux-gnu
Current alternative: /usr/lib/nvidia-390/ld.so.conf
Current core alternative: (null)
Current egl alternative: /usr/lib/nvidia-390/ld.so.conf
Is nvidia enabled? yes
Is nvidia egl enabled? yes
Is fglrx enabled? no
Is mesa enabled? no
Is mesa egl enabled? no
Is pxpress enabled? no
Is prime enabled? no
Is prime egl enabled? no
Is nvidia available? yes
Is nvidia egl available? no
Is fglrx available? no
Is fglrx-core available? no
Is mesa available? yes
Is mesa egl available? yes
Is pxpress available? no
Is prime available? yes
Is prime egl available? no
Single card detected
No change - nothing to do

#####dpkg-query -l ‘nvidia*’
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
++±====================================-=======================-=======================-=============================================================================
ii nvidia-390 390.25-0ubuntu0~gpu14.0 amd64 NVIDIA binary driver - version 390.25
un nvidia-common (no description available)
un nvidia-driver-binary (no description available)
un nvidia-libopencl1-390 (no description available)
un nvidia-libopencl1-dev (no description available)
un nvidia-opencl-icd (no description available)
ii nvidia-opencl-icd-390 390.25-0ubuntu0~gpu14.0 amd64 NVIDIA OpenCL ICD
un nvidia-persistenced (no description available)
ii nvidia-prime 0.6.2.1linuxmint1 amd64 Tools to enable NVIDIA’s Prime
ii nvidia-settings 390.25-0ubuntu0~gpu14.0 amd64 Tool for configuring the NVIDIA graphics driver
un nvidia-settings-binary (no description available)
un nvidia-smi (no description available)

Hi, i couldnot attach the bug report.

So please view it from this link.

Thanks,
Renil

You have set the kernel parameter ‘nomodeset’, remove that, it’s preventing the iGPU from working. Furthermore, you should upgrade your Ubuntu HWE, that’s rather old.

It worked. I think the problem was with old ubuntu HWE.

Thanks a lot for the answer.