I am currently reinstalling my Ubuntu 16.04. So I have a fresh install of Ubuntu. Here is what I have executed since:
sudo apt update && sudo apt upgrade
nb_line=`lspci | grep -i nvidia`
if [ ${nb_line} -eq 0 ]; then
echo "ERROR: no NVidia device"
exit 1
fi
gcc --version 2> /dev/null
if [ $? -ne 0 ]; then
echo "No gcc installed"
exit 2
fi
# install third party libraries and kernel
sudo apt install g++ freeglut3-dev build-essential libx11-dev libxmu-dev \
libxi-dev libglu1-mesa libglu1-mesa-dev linux-headers-$(uname -r) dkms
# download the installer files
website='https://developer.nvidia.com/'
# uri='compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run'
uri='compute/cuda/9.1/Prod/local_installers/cuda_9.1.85_387.26_linux'
wget "${website}${uri}" -O cuda.run
chmod u+x cuda.run
# blacklist nouveau module
echo "blacklist nouveau
options nouveau modeset=0" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf
sudo update-initramfs -u
# reboot in text mode
sudo systemctl set-default multi-user.target
sudo reboot
# install
sudo ./cuda.run --verbose --silent --driver --toolkit --samples --no-opengl-libs > logs
echo 'export PATH=/usr/local/cuda/bin:${PATH}' >> ~/.bashrc
echo '/usr/local/cuda/lib64' | sudo tee -a /etc/ld.so.conf.d/cuda.conf
sudo ldconfig
# reboot in graphical mode
sudo systemctl set-default graphical.target
sudo reboot
Here the kernel is 4.13.0-26-generic.
On the reboot after the installation, the NVidia drivers are not loaded (there is no /proc/driver/nvidia).
But the script was successfull as says the logs:
Installing the NVIDIA display driver...
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 387.26....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Welcome to the NVIDIA Software Installer for Unix/Linux
Detected 4 CPUs online; setting concurrency level to 4.
License accepted by command line option.
Installing NVIDIA driver version 387.26.
Running distribution scripts
Executing /usr/lib/nvidia/pre-install: [##############################] 100%
WARNING: Unable to find a suitable destination to install 32-bit
compatibility libraries. Your system may not be set up for 32-bit
compatibility. 32-bit compatibility files will not be installed;
if you wish to install them, re-run the installation and set a
valid directory with the --compat32-libdir option.
The distribution-provided pre-install script failed! Are you sure you want
to continue? (Answer: Continue installation)
For some distributions, Nouveau can be disabled by adding a file in the
modprobe configuration directory. Would you like nvidia-installer to
attempt to create this modprobe file for you? (Answer: Yes)
One or more modprobe configuration files to disable Nouveau have been
written. For some distributions, this may be sufficient to disable
Nouveau; other distributions may require modification of the initial
ramdisk. Please reboot your system and attempt NVIDIA driver installation
again. Note if you later wish to reenable Nouveau, you will need to delete
these files: /etc/modprobe.d/nvidia-installer-disable-nouveau.conf
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 classic TLS 32bit OpenGL libraries.
Searching for conflicting files:
Searching: [##############################] 100%
Installing 'NVIDIA Accelerated Graphics Driver for Linux-x86_64' (387.26):
Installing: [ ]
Driver file installation is complete.
Installing DKMS kernel module:
Adding to DKMS: [## ] 5%
ERROR: Failed to run `/usr/sbin/dkms build -m nvidia -v 387.26 -k
4.13.0-26-generic`:
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area....
'make' -j4 NV_EXCLUDE_BUILD_MODULES=''
KERNEL_UNAME=4.13.0-26-generic modules.......(bad exit status: 2)
ERROR (dkms apport): binary package for nvidia: 387.26 not found
Error! Bad return status for module build on kernel:
4.13.0-26-generic (x86_64)
Consult /var/lib/dkms/nvidia/387.26/build/make.log for more
information.
Adding to DKMS: [##############################] 100%
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.
Installing the CUDA Toolkit in /usr/local/cuda-9.1 ...
Verifying archive integrity... All good.
Uncompressing NVIDIA CUDA.......
Logging to /tmp/cuda-installer-4719
Creating symbolic link /usr/local/cuda -> /usr/local/cuda-9.1
========================================
Please make sure that
- PATH includes /usr/local/cuda-9.1/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-9.1/lib64, or, add /usr/local/cuda-9.1/lib64 to /etc/ld.so.conf and run ldconfig as root
Please read the release notes in /usr/local/cuda-9.1/doc/
To uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-9.1/bin
Installation Complete
Verifying archive integrity... All good.
Uncompressing NVIDIA CUDA Samples..
Logging to /tmp/cuda-installer-4827
========================================
Configuring samples Makefile...
========================================
Please make sure that
- PATH includes /usr/local/cuda-9.1/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-9.1/lib64, or, add /usr/local/cuda-9.1/lib64 to /etc/ld.so.conf and run ldconfig as root
To uninstall the NVIDIA CUDA Samples, run the uninstall script in /usr/local/cuda-9.1/samples
Installation Complete
'uninstall_cuda_9.1.pl' -> '/usr/local/cuda-9.1/bin/uninstall_cuda_9.1.pl'
Installing the CUDA Samples in /home/paul ...
Copying samples to /home/paul/NVIDIA_CUDA-9.1_Samples now...
Finished copying samples.
===========
= Summary =
===========
Driver: Installed
Toolkit: Installed in /usr/local/cuda-9.1
Samples: Installed in /home/paul
Please make sure that
- PATH includes /usr/local/cuda-9.1/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-9.1/lib64, or, add /usr/local/cuda-9.1/lib64 to /etc/ld.so.conf and run ldconfig as root
To uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-9.1/bin
To uninstall the NVIDIA Driver, run nvidia-uninstall
Please see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-9.1/doc/pdf for detailed information on setting up CUDA.
Logfile is /tmp/cuda_install_1166.log
But we can see that there is a few errors:
ERROR: Failed to run `/usr/sbin/dkms build -m nvidia -v 387.26 -k
ERROR (dkms apport): binary package for nvidia: 387.26 not found
Error! Bad return status for module build on kernel:
ERROR: Failed to install the kernel module through DKMS. No kernel module
ERROR: Installation has failed. Please see the file
or wait for further updates (new drivers) to be posted in the r390 branch.
If you choose to use the 390.12 beta driver, then install it first/separately, and when you install the CUDA 9.1 toolkit using the runfile installer, select “no” when prompted to install the driver, or use the command line switches to deselect driver installation.
My sense is that 390.12 fixes the issue, based on what I’ve read. I have not personally confirmed that.
Sorry, I’m generally not allowed to make forward-looking comments. This isn’t a forum that NVIDIA generally uses to disclose future information that has not already been disclosed elsewhere.
If you look at the general frequency at which NVIDIA posts drivers, you’ll get some idea for the likely timeframe of a “next” r390 driver posting. I can’t give you specific dates or date range estimates.
I think I’m running into the same type of problem. So no deb based installation works with kernel 4.13? Since they always seem to automatically download 387 driver.
I get “unable to locate package nvidia-390” when I try to install that driver using “sudo apt-get install nvidia-390”.
What’s the proper way to install the 390 driver?
Could not find ‘nvidia-390*’!!!
$ sudo apt-get install nvidia-390*
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package nvidia-390*
E: Couldn’t find any package by glob ‘nvidia-390*’
E: Couldn’t find any package by regex ‘nvidia-390*’
$ sudo apt-get install cuda-drivers
[sudo] password for ai:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
bbswitch-dkms dkms lib32gcc1 libc6-i386 libcuda1-387 libjansson4 libvdpau1 libxnvctrl0 mesa-vdpau-drivers nvidia-387 nvidia-387-dev nvidia-modprobe
nvidia-opencl-icd-387 nvidia-prime nvidia-settings screen-resolution-extra vdpau-driver-all xserver-xorg-legacy
Suggested packages:
bumblebee libvdpau-va-gl1 nvidia-vdpau-driver nvidia-legacy-340xx-vdpau-driver
The following NEW packages will be installed:
bbswitch-dkms cuda-drivers dkms lib32gcc1 libc6-i386 libcuda1-387 libjansson4 libvdpau1 libxnvctrl0 mesa-vdpau-drivers nvidia-387 nvidia-387-dev
nvidia-modprobe nvidia-opencl-icd-387 nvidia-prime nvidia-settings screen-resolution-extra vdpau-driver-all xserver-xorg-legacy
0 upgraded, 19 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/86.5 MB of archives.
After this operation, 407 MB of additional disk space will be used.
@txbob:
Is there any info on the status on ppc64le R390 drivers? I can’t seem to find the 390 and 387 is failing install for me on:
4.14.14-300.fc27.ppc64le
Thanks Everyone. After a lot of struggle this thread helped me install CUDA 9.1 successfully on Ubuntu 16.04 :). I have a PNY GE-FORCE 730 graphics card.
I’m summarizing all of steps that I followed to get this working: