Steps to setup my laptop with Nvidia GeForce RTX 3070 Ti using the Nvidia 510 driver and 12th Gen Intel CPU. Note this is not the only way to do it, just a way that worked for me:
- Ensure
nomodeset
is not in the kernel boot parameters (/etc/default/grub
, inGRUB_CMDLINE_LINUX_DEFAULT
).nomodeset
resulted in my machine freezing / not accepting input. - Ensure that you do not run
nvidia-xconfig
/ create anxorg.conf
. I noticed troubles with my display, such as a black box around the mouse and freezing at login time, when I usednvidia-xconfig
for this OS/driver version. - Install the Nvidia driver from Software & Updates. I went with the server version, which is
510.47.03-0ubuntu0.20.04.1
. Optionally,sudo apt-mark hold nvidia-driver-510
(ornvidia-driver-510-server
) if you'd rather not get automatic updates. Optionally, check if any older Nvidia packages are lingering withapt list --installed | grep nvidia | grep -v 510
and remove unwanted packages from the previous version (e.g. 470). - Blacklist nouveau by writing a file in
/etc/modprobe.d/blacklist-nvidia-nouveau.conf
with the following contents:
blacklist nouveau
options nouveau modeset=0
- Shutdown the machine.
- If you have integrated graphics/iGPU (if you have something besides your Nvidia card in
lspci | grep VGA
you may have an iGPU): Go into the BIOS, and disable hybrid graphics. Otherwise, I ran into issues where xorg would sometimes decide there was no display, and it simplified having the Nvidia driver be the chosen GPU. I'm sure there are other workarounds. - Turn the machine back on.
Kernel Version: 5.13.0-30-generic