In this article you will learn how to install Nvidia driver on Debian 10 Buster from the standard Debian repository. In case that from some reason the installation of the Nvidia driver from the standard Debian repository failed or you simply with to have more up to date Nvidia driver installed this tutorial will also explain on how to install the official Nvidia driver directly downloaded from the Nvidia.com website.
To install Nvidia driver on other Linux distributions, follow our Nvidia Linux Driver guide.
In this tutorial you will learn:
- How to detect your nvidia card model number
- How to install Nvidia driver from a standard Debian repository
- How to install Nvidia driver from the official Nvidia package
- How to disable nouveau driver
- How to install Nvidia driver prerequisites
Software Requirements and Conventions Used
Category | Requirements, Conventions or Software Version Used |
---|---|
System | Debian 10 Buster GNU/Linux |
Software | N/A |
Other | Privileged access to your Linux system as root or via the sudo command. |
Conventions |
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command$ – requires given linux commands to be executed as a regular non-privileged user |
How to install NVIDIA driver using Debian repository step by step instructions
- Enable the
non-free
andcontrib
repository.As an administrative user open the
/etc/apt/sources.list
and add thenon-free
repository. For example change the repository definition:FROM: deb http://ftp.au.debian.org/debian/ buster main TO: deb-src http://ftp.au.debian.org/debian/ buster main non-free contrib
Once ready update the repository index files using the below command:
# apt update
- Install
nvidia-detect
utility by execution of the below command:# apt -y install nvidia-detect
- Detect your Nvidia card model and suggested Nvidia driver. To do so execute the above installed
nvidia-detect
command. For example:# nvidia-detect Detected NVIDIA GPUs: 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] [10de:1c03] (rev a1) Checking card: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] (rev a1) Your card is supported by the default drivers and legacy driver series 390. It is recommended to install the nvidia-driver package.
- As suggested install the recommended driver by the previous step:
# apt install nvidia-driver
- All done. Reboot your Debian 10 Buster Linux box:
# systemctl reboot
How to install NVIDIA driver by using the official nvidia.com package step by step instructions
- Enable the
non-free
repository.As an administrative user open the
/etc/apt/sources.list
and add thenon-free
andcontrib
repository. For example change the repository definition:FROM: deb http://ftp.au.debian.org/debian/ buster main TO: deb-src http://ftp.au.debian.org/debian/ buster main non-free contrib
Once ready update the repository index files using the below command:
# apt update
- Install
nvidia-detect
utility by execution of the below command:# apt -y install nvidia-detect
- Detect your Nvidia card model and suggested Nvidia driver. To do so execute the above installed
nvidia-detect
command. For example:# nvidia-detect Detected NVIDIA GPUs: 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] [10de:1c03] (rev a1) Checking card: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] (rev a1) Your card is supported by the default drivers and legacy driver series 390. It is recommended to install the nvidia-driver package.
take a note of the suggester driver number. In this case the suggested Nvidia driver number is
390
. - Download the recommended Nvidia source package from the official Nvidia.com website. Search for a package name to match the driver number as recommended by the previous step. Save the downloaded file into your home directory:
$ ls NVIDIA-Linux-x86_64-390.116.run NVIDIA-Linux-x86_64-390.116.run
- Install Nvidia driver compilation prerequisites:
# apt -y install linux-headers-$(uname -r) build-essential libglvnd-dev pkg-config
- Next, disable the default
nouveau
driver:# echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf
- Reboot to multi-user runlevel. This will disable the GUI user after reboot:
# systemctl set-default multi-user.target # systemctl reboot
- Login as root user via terminal or TTY and install the Nvidia driver by executing the bellow command:
NOTE
Depending on the driver version you have downloaded the bellow command may be different. Amend the below command to fit the driver file name downloaded previously.# bash NVIDIA-Linux-x86_64-390.116.run
During the installation you may be asked the following set of questions:
The CC version check failed: The kernel was built with gcc version 8.2.0 (Debian 8.2.0-14), but the current compiler version is cc (Debian 8.3.0-2) 8.3.0. 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. Ignore CC version check Abort installation Install NVIDIA's 32-bit compatibility libraries? Yes No An incomplete installation of libglvnd was found. Do you want to install a full copy of libglvnd? This will overwrite any existing libglvnd libraries. Don't install libglvnd files Install and overwrite existing filesort installation. Abort installation. Would you like to run the nvidia-xconfig utility to automatically update your X configuration file so that the NVIDIA X driver will be used when you restart X? Any pre-existing X configuration file will be backed up. Yes No
- Enable the system to boot into GUI:
# systemctl set-default graphical.target
- All done. Reboot your Debian 10 Buster Linux box:
# systemctl reboot