Installing NVIDIA Drivers - Debian 10

Help with projects and applications, client configuration, system software tweaks.
The pinboard for cheat sheets.
Post Reply
Skillz
Site Admin
Reactions:
Posts: 1854
Joined: Sun Sep 15, 2019 3:03 pm

Installing NVIDIA Drivers - Debian 10

Post by Skillz »

sudo apt update

sudo nano /etc/apt/sources.list

Change to:

Code: Select all

deb http://deb.debian.org/debian/ buster main contrib non-free
deb-src http://deb.debian.org/debian/ buster main contrib non-free

deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security buster/updates main contrib non-free

deb http://deb.debian.org/debian/ buster-updates main contrib non-free
deb-src http://deb.debian.org/debian/ buster-updates main contrib non-free
Basically add contrib and non-free at the end of all the lines.

sudo apt update
sudo apt install nvidia-detect

nvidia-detect

This will detect the NVIDIA GPU and tell you what drivers work with it. In most cases, the latest versions will work. For older GPUs, sometimes they have a cut off. Note what it says. It will either give a driver major version such as 495 or tell you all drivers work with it. If all drivers work with it, then you can install the nvidia drivers from the command line, but I recommend installing the latest drivers anyway because the command line is old and probably wouldn't work anyway. So go to NVIDIA and download the latest drivers. (Or the latest major version nvidia-detect told you)

https://www.nvidia.com/en-us/drivers/unix/

Once downloaded, you'll need to uninstall the default drivers if they exist. If you have any sort of GUI desktop, this is necessary. If you only have the CLI installed and no GUI desktop then you can skip this.

Create a file:
nano /etc/modprobe.d/blacklist-nouveau.conf

Put in the file:

Code: Select all

blacklist nouveau
options nouveau modeset=0
Save the file.

sudo update-initramfs -u
systemctl set-default multi-user.target
systemctl reboot (or sudo reboot)

Once the system comes back online, navigate to where you stored that nvidia driver. It'll be NVIDIA*.run and type this

sudo bash [DRIVER NAME].run

Follow the on-screen prompts. It might complain about some stuff, if it does, skip it if it lets you. If it asks about the NVIDIA 32-bit libraries, install them. If it asks you about configuring X for you, tell it yes.

(if it complains about some gcc package not being installed run this)
apt -y install linux-headers-$(uname -r) build-essential libglvnd-dev pkg-config

Then reboot the system when it is done

systemctl reboot (or sudo reboot)

Nvidia drivers should be installed. You can check by looking at the BOINC log if BOINC is already installed or typing
nvidia-smi
crashtech
TAAT Member
Reactions:
Posts: 1544
Joined: Sun Sep 15, 2019 4:45 pm
Location: Idaho, USA

Re: Installing NVIDIA Drivers - Debian 10

Post by crashtech »

I don't have any AMD GPUs to put on Linux atm, but if I did, I'd be looking to do it in Mint. Maybe these directions would work, since Debian begat Ubuntu begat Mint...
Skillz
Site Admin
Reactions:
Posts: 1854
Joined: Sun Sep 15, 2019 3:03 pm

Re: Installing NVIDIA Drivers - Debian 10

Post by Skillz »

I haven't tried installed AMD drivers on Linux yet, so I do not know. Well, I take that back. I tried with a 280X, but I couldn't get the system to boot with the card installed. So will have to figure out something else (Card might be broken for all I know)
Skillz
Site Admin
Reactions:
Posts: 1854
Joined: Sun Sep 15, 2019 3:03 pm

Re: Installing NVIDIA Drivers - Debian 10

Post by Skillz »

Installing the NVIDIA drivers via the *.RUN file will not allow you to install any GPU device utilities such as NVTOP. It will complain about something being left over from the previous install, then if you try to remove/uninstall it it will just uninstall the drivers completely and you'll be without drivers.

Going to test installing the drivers via the *.RUN file and then installing nvtop from source (or using kiska's binary file)
Post Reply