NVIDIA Driver install for Dell Optiplex 7070 MT Geforce RTX 1650
文章目录
0.Documents
1.NVIDIA CUDA INSTALLATION GUIDE FOR LINUX
1 Pre-Pre Installation(For Dell Optiplex 7070 MT Geforce RTX 1650)
2. Pre-Installation
Before install the CUDA Toolkit and NVIDIA Driver on the computer, Some actions must be taken first.
2.1 Verify You Have a CUDA-Capable GPU
$ lspci | grep -i nvidia
02:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940MX] (rev a2)
2.2 Verify You Have a Supported Version of Linux
$ uname -m && cat /etc/*release
x86_64
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
2.3 Verify the System Has gcc Installed
$ gcc --version
2.4 Verify the System has the Correct Kernel Headers and Development Packages Installed(Ubuntu)
$ sudo apt-get install linux-headers-$(uname -r)
2.5 Choose an Installation Method
In this method, i suggest to download the runfile.
3. Installation(run file
method)
I strongly recommend to install the NVIDIA dirver in this way ,because in this way ,every step and every part of the driver installed or not installed is under your control.
3.1 Pre-Installation
Execute Step2 Pre-Installation
.
3.2 Uninstall previously installations
all the possible nvidia driver previosly installed in th computer, otherwise it may conflict with current nvidia driver
-
- uninstall a Toolkit runfile installation:
$ sudo /usr/local/cuda-10.0/bin/uninstall_cuda_10.0.pl
-
- uninstall a Driver runfile installation:
$ sudo /usr/bin/nvidia-uninstall
-
- uninstall a RPM/Deb installation:
$ sudo apt-get --purge remove <package_name> # Ubuntu
if this command execute failure, use the following one:
$ sudo apt-get --purge remove "*cublas*" "cuda*"
-
To remove CUDA Toolkit: $ sudo apt-get --purge remove "*cublas*" "cuda*" To remove NVIDIA Drivers: $ sudo apt-get --purge remove "*nvidia*"
3.2 disable Nouveau
driver
create /etc/modprobe.d/blacklist-nouveau.conf
file。
$ sudo gedit /etc/modprobe.d/blacklist-nouveau.conf
add the following content in it:
blacklist nouveau
options nouveau modeset=0
generate kernel initramfs
again!
$ sudo update-initramfs -u
restart and execute the following command:
$ lsmod | grep nouveau
if the screen output nothing , means the above command line execute successfully!
3.3 change boot mode
restart the computer and enter BIOS,disable Security boot manually.
3.4 disable X-Window service
X-window is a graphics system, our purpose is to ensure the computer disable all the driver about graphic.
After exit from BIOS mode, Ctrl-Alt+F3
to enter text mode and login in.
stop x-window service:
$ sudo service lightdm stop
if it appears
unit lightdm.service not loaded
,that means your computer does not haveLight
installed :$ sudo apt install lightdm
after this, it will pop up an interface ,choose
LightDm
,after this:$ sudo service lightdm stop
the screen gui can be start used:
$ sudo service lightdm start
3.5 Install the runfile driver
1.install nvidia driver
Go to the driver file location.
$ chumod +777 NVIDIA-Linux-x86_64-410.66.run
$ sudo ./NVIDIA-Linux-x86_64-410.66.run --no-x-check --no-nouveau-check --no-opengl-files
choose no
when it comes with nvidia-xconfig
2. Install cuda
$ sudo ./cuda_9.0.176_384.81_linux.run --no-opengl-libs
choose no
when it comes with install nvidia accelerated graphics driver
4.cudnn
Download cudnn and execute the following command line:
sudo cp cuda/include/cudnn.h /usr/local/cuda-10.2/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda-10.2/lib64
sudo chmod a+r /usr/local/cuda-10.2/include/cudnn.h /usr/local/cuda-10.2/lib64/libcudnn*
5. CUDA CUDNN version
# CUDA 版本
cat /usr/local/cuda/version.txt
# cuDNN 版本
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
$ 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.
ERROR (dkms apport): binary package for nvidia: 410.48 not found
Error! Bad return status for module build on kernel: 5.3.0-62-generic (x86_64)
Consult /var/lib/dkms/nvidia/410.48/build/make.log for more information.