Skip to content

Instantly share code, notes, and snippets.

@anodyne-canvas
Last active July 14, 2023 20:07
Show Gist options
  • Save anodyne-canvas/6252e331cb23a0ca977a47ed283e171e to your computer and use it in GitHub Desktop.
Save anodyne-canvas/6252e331cb23a0ca977a47ed283e171e to your computer and use it in GitHub Desktop.
Setting up Nvidia Driver 510 on Ubuntu 20.04.4 LTS

Setting up Nvidia Driver 510 on Ubuntu 20.04.4 LTS

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:

Steps

  1. Ensure nomodeset is not in the kernel boot parameters (/etc/default/grub, in GRUB_CMDLINE_LINUX_DEFAULT). nomodeset resulted in my machine freezing / not accepting input.
  2. Ensure that you do not run nvidia-xconfig / create an xorg.conf. I noticed troubles with my display, such as a black box around the mouse and freezing at login time, when I used nvidia-xconfig for this OS/driver version.
  3. 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 (or nvidia-driver-510-server) if you'd rather not get automatic updates. Optionally, check if any older Nvidia packages are lingering with apt list --installed | grep nvidia | grep -v 510 and remove unwanted packages from the previous version (e.g. 470).
  4. Blacklist nouveau by writing a file in /etc/modprobe.d/blacklist-nvidia-nouveau.conf with the following contents:
blacklist nouveau
options nouveau modeset=0
  1. Shutdown the machine.
  2. 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.
  3. Turn the machine back on.

Details

Kernel Version: 5.13.0-30-generic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment