What is the correct way to install the proprietary drivers for the Nvidia RTX 2060 Max Q?
There are several ways but -none- are the correct way. All are correct and it is just that some are less typing, some are more informative, some have less or more different drivers. In general the drivers are the same software if their version number are the same.
Start by disabling secure boot. Secure boot hinders addressing BIOS.
The way to install nVidia drivers is to remove all traces of older installs.
sudo apt autoremove nvidia* --purge
sudo /usr/bin/nvidia-uninstall
sudo /usr/local/cuda-X.Y/bin/cuda-uninstall
1st one removes all previous versions if installed through apt. The 2nd one removes all traces of previous installs if installed using a run file. The 3rd removes all traces when installed through the CUDA toolkit. Pick one of the three.
Update and upgrade:
sudo apt update
sudo apt upgrade
Then check what your card is with
lspci | grep -e VGA
Check the nvidia site for support for your card.
Possible ways for installing in order of preference.
Use the new tool (this is likely not in a lot of FAQs at the moment but it is currently really the easiest method for every possible situation: desktop, server, from grub rescue):
ubuntu-drivers devices
It will list a bunch of driver. Pick a suitable one. Often the driver closest (up or down a version) is best.This will pick the one the system believes is best:
sudo ubuntu-drivers autoinstall
And this would install a specific one you pick:
sudo apt install nvidia-driver-530
sudo apt install nvidia-driver-525
sudo apt install nvidia-headless-525
3 examples. The third one is if you want to run headless (so w/o a display). Reboot afterwards.
Alternative:
Desktop method: Select the “Additional Drivers” application. Pick one, and reboot.
Alternative 2:
Using a PPA
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:graphics-drivers/ppa -y
sudo apt update
Then use the ubuntu-drivers devices
command from the 1st option and it will include all the drivers from the PPA.
Alternative 3:
CUDA install. It is not the most friendly install.
Dependencies:
sudo apt install dirmngr ca-certificates software-properties-common apt-transport-https dkms curl -y
Find the correct key at CUDA repos This does 22.04 (sticking to LTS :) ):
curl -fSsL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub | sudo gpg --dearmor | sudo tee /usr/share/keyrings/nvidia-drivers.gpg > /dev/null 2>&1
Add the repo:
echo 'deb [signed-by=/usr/share/keyrings/nvidia-drivers.gpg] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /' | sudo tee /etc/apt/sources.list.d/nvidia-drivers.list
Update
sudo apt update
and this will list all added drivers.
apt search nvidia-driver-*
Use apt to install (this is also the same as mentioned before (1 example):
sudo apt install nvidia-driver-525
The second part of the question is, should I? Will I benefit from installing the proprietary drivers, or it is fine keep the nouveau drivers?
Sort of. Yes the nVidia drivers are quicker but you will not notice it if all you do is use the desktop, play around the web, watch video (the generic stuff will all do).
There are some tools where a graphics driver shine with a good driver. Blender but that is not for most of us. Games are but Ubuntu (/Linux) is still not really a gaming operating system. Yes, I play Demon's Souls on my Ubuntu but even the PS3 emulators are not 100%. Steam, Proton and the likes (but no I do not include wine in that though PoL is getting better and better) are very good attempts to gain traction but it will take some time before game content creators use Linux as the start and not Windows.
I disabled secure boot (UEFI/BIOS) and now the 2nd display gets detected. Afterwards, I only had to recalibrate the colours.
Why all of this happened?
Drivers address your hardware. Secure boot is a windows tools that locks your system out from addressing hardware unless it has a key that is accepted.
This is Linus' official stance on it.