Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

debian install nvidia driver

######Youtube-tutorial####
https://www.youtube.com/watch?v=Nd3p-MB_0rM

# Install proprietary NVIDIA driver on Debian 10
## Shoutout
Go follow these legends, they helped making this guide what it is today

[ichirodev](https://github.com/ichirodev)

[HangedScratcher](https://github.com/HangedScratcher)

## The prep
edit your **/etc/apt/sources.list** file by appending "contrib non-free" at the end of the lines beginning with deb.
```
deb  http://deb.debian.org/debian stretch main contrib non-free
deb-src  http://deb.debian.org/debian stretch main

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

deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src http://security.debian.org/ stretch/updates main
```
Then run 
```
sudo apt update
```
## The steps (part 1)
Set root password
```
sudo -i
passwd
```
It will ask you to type a new sudo password.

Use root account
```
su
```
OR
```
sudo -i
```
First install nvidia-detect
```
sudo apt -y install nvidia-detect
```
Next use nvidia-detect to find your gpu
```
nvidia-detect
```
First install these packages and build linux depemdecies.
```
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get update 
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get -f install
sudo dpkg --configure -a
sudo apt install firmware-linux build-essential gcc-multilib linux-headers-amd64 dracut
sudo apt build-dep linux
```

**NOTE: If it says that it will remove initramfs-tools its fine let it remove it**

Download driver from https://www.nvidia.com/object/unix.html
Those who need the legacy driver look for Latest Legacy GPU version.

Disable Nouveau and other drivers that might have conflicts with the installation.
```
sudo echo 'blacklist amd76x_edac' >> /etc/modprobe.d/blacklist.conf
sudo echo 'blacklist vga16fb' >> /etc/modprobe.d/blacklist.conf
sudo echo 'blacklist rivafb' >> /etc/modprobe.d/blacklist.conf
sudo echo 'blacklist rivatv' >> /etc/modprobe.d/blacklist.conf
sudo echo 'blacklist nvidiafb' >> /etc/modprobe.d/blacklist.conf
sudo echo 'blacklist nouveau' >> /etc/modprobe.d/blacklist.conf

sudo dracut -v /boot/initramfs-$(uname -r).img $(uname -r)
```
Next disable display manager. To find out witch you are using type
```
sudo cat /etc/X11/default-display-manager
```
if using lightdm
```
sudo systemctl stop lightdm
```
if using gdm3
```
sudo systemctl stop gdm3
```
If you see a black screen just press **CTRL+ALT+F1** and type
```
sudo apt install initramfs-tools
sudo systemctl set-default multi-user.target
```

**NOTE: If it says that it will remove dracut its fine let it remove it**

Use this command next
```
sudo update-initramfs -u
```
if it fails run these commands
```
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get update 
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get -f install
sudo dpkg --configure -a
sudo update-initramfs -u
```
Next reboot
```
sudo systemctl reboot
```
## The steps (part 2)
Log in as root with the password we have set up earlier.

Next go to Downloads forlder
```
cd Downloads
```
Run this commands
```
sudo apt install linux-headers`uname -r` 
```
Now, add some libraries to your system 
```
sudo apt install build-essential
sudo apt install libglvnd-dev pkg-config
```
* This fixes Error: Unable to determine the path to install libglvnd

Lastly run the installer
```
sudo bash NVIDIA-....run
```
I would recommend to enable 32-bit support if prompted.

Next select Install and overwrite existing filesort installation.

It should ask you to generate X-org configuration. Accept that too.

If not, run nvidia-xconfig after the installer finishes.

Reenable GUI
```
sudo systemctl set-default graphical.target
``` 
Then reboot.
```
sudo reboot
```
And that's it. You should have succesfully installed the proprietary NVIDIA driver.
Comment

PREVIOUS NEXT
Code Example
Shell :: batch escape character 
Shell :: zsh: permission denied: ./manage.py for django projects 
Shell :: undo most recent commit 
Shell :: zsh: permission denied 
Shell :: how to remove all files in a directory matching a regex pattern shell 
Shell :: ssh powershell 
Shell :: configure static ip address linux 
Shell :: bash true if grep has output 
Shell :: linux command to update nodejs 
Shell :: git create a new repository 
Shell :: open current dir cmd 
Shell :: flutter cmdline-tools component is missing 
Shell :: sh script options 
Shell :: how to find and kill a running process on a port in mac 
Shell :: read from .env file bash 
Shell :: git bash terminal weird characters 
Shell :: find file linux 
Shell :: copy file to ubuntu server 
Shell :: kube log 
Shell :: pushing existing project to github 
Shell :: bash calculate sum 
Shell :: arch linux c# install 
Shell :: ssh upload file to server 
Shell :: move all files from one directory to another 
Shell :: cant-push-to-github-because-of-large-file-which-i-already-deleted 
Shell :: print value mongodb shell 
Shell :: sudo rmdir recursive 
Shell :: mac terminal curl 
Shell :: how to make NTFS read only file system writable in linux 
Shell :: git clone to existing folder 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =