Ubuntu 18.04 -- installing NVIDIA driver 

Ubuntu 18.04.6 clean install

(1) minimal install 

shell

$ sudo apt update

$ sudo apt upgrade

$ sudo apt install openssh-server

$ sudo apt install git

$ sudo init 6

## (2)


shell

$ lspci | grep -i nvidia 

$ lsmod | grep nouveau

$ sudo nano /etc/modprobe.d/blacklist-nouveau.conf

---

blacklist nouveau

options nouveau modeset=0 

---

$ sudo update-initramfs -u 

rtl*fw files are missing.
Download them and locate them.


$ sudo mv \$HOME/Downloads/rtl81* /lib/firmware/rtl_nic/

Rerun the following command. 

$ sudo update-initramfs -u 

$ sudo init 6


## (3)

https://www.nvidia.com/content/DriverDownload-March2009/confirmation.php?url=/XFree86/Linux-x86_64/470.94/NVIDIA-Linux-x86_64-470.94.run&lang=us&type=TITAN
Download 470.94 driver run file.
NVIDIA-Linux-x86_64-470.94.run

Locate it at $HOME/Downloads/

## (4) 

$ sudo systemctl set-default multi-user.target 

$ sudo reboot 

Ctrl + Alt + F1

$ sudo service gdm stop

$ runlevel

N 5


$  cd {\$HOME}/Downloads/

$ sudo sh NVIDIA*.run

[ Say no to something like X configuration.]
[ This is different from the choice in 
https://www.if-not-true-then-false.com/2021/debian-ubuntu-linux-mint-nvidia-guide/ ]

$ sudo systemctl set-default graphical.target 

$ sudo reboot

$ nvidia-smi

Mon Dec 20 02:06:49 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.94       Driver Version: 470.94       CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   43C    P0     9W /  N/A |     10MiB /  3910MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1064      G   /usr/lib/xorg/Xorg                  4MiB |
|    0   N/A  N/A      1606      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+


$ cat /proc/driver/nvidia/version 
NVRM version: NVIDIA UNIX x86_64 Kernel Module  470.94  Mon Dec  6 22:42:02 UTC 2021
GCC version:  gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) 


Reference
- Install NVIDIA [495.46 / 470.94 / 390.144 / 340.108] Drivers on Debian / Ubuntu / Linux Mint / LMDE
  https://www.if-not-true-then-false.com/2021/debian-ubuntu-linux-mint-nvidia-guide/

https://qiita.com/ozota/items/28b7e1fbf5015f907638