[HOW TO] Install the latest Nvidia driver on Zorin OS 16.x/17.x & Pop! OS 21.04/24.04

Install the latest Nvidia driver on Zorin OS 16/17 & Pop! OS 21.04/24.04: People with legacy cards (+/- 10 years old) needs legacy drivers (390.xxx.x) and also needs to downgrade the kernel to 5.15.xx. For legacy drivers i would advice to use the drivers released by your distro.

  1. Download the official Nvidia Driver and place it in the home folder

Optional: you can rename the NVIDIA-Linux-x86_64-565.57.01.run driver to 1.run. I personally use 1.run because i don't want to write the whole nvidia name into the terminal. In the tutorial below i use the original name from nvidia, it's up to you what you want to use.

  1. The file needs permission to be executed, you can do this by 2 ways. The first one is by terminal, the second one by right clicking on the file (NVIDIA-Linux-x86_64-565.57.01.run) and change the permission of the file.

For option one: Open the terminal and write:

chmod +x ./NVIDIA-Linux-x86_64-565.57.01.run

For option two: See the picture below (enable execute below)
IMG_7823

  1. Install the build essential package, those are needed for the nvidia driver.
    Write in the terminal:

sudo apt install build-essential libglvnd-dev pkg-config

  1. Blacklist the Nouveau Nvidia driver otherwise the nvidia driver does not work proper. Write in the terminal:

sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"

Write in the terminal:

sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"

  1. Check if the nouveau driver is blacklisted.
    Write in the terminal:

cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf

  1. If everything is done
    Write in the terminal:

sudo update-initramfs -u

Step 7 is for Zorin OS users, Pop! OS already comes with dkms installed

  1. Install dkms, this is needed so you don't need to reinstall the nvidia driver anymore after a kernel upgrade. Write in the terminal:

sudo apt-get install dkms

  1. Now we are going to install the nvidia driver. We switch to text mode. Write in the terminal:

systemctl set-default multi-user.target

  1. Now we have to reboot the system. Write in the terminal:

reboot

  1. Now we have booted into text mode. Login with your username and password.
  2. When your logged in we are going to remove/delete older nvidia drivers. Write:

sudo apt remove --purge ^nvidia-.*

  1. When the purge is done write:

sudo apt-get autoremove

Optional: This will uninstall traces of the older nvidia driver. Just to make sure the purge was done correctly.

sudo ./NVIDIA-Linux-x86_64-565.57.01 --uninstall

  1. Install the nvidia driver. Write:

sudo ./NVIDIA-Linux-x86_64-565.57.01.run

  1. Follow the instructions (hit everything on yes).

*** If you encounter a error while installing about “failed building kernel modules” don’t panic. You have to install a newer GCC version. You can follow this tutorial after you rebooted back to your system. I followed the steps till step 5 from medium 2.

  1. When the installation is done we need to have root access, write:

sudo -i

  1. Now you have to write this to get your desktop enviroment back:

systemctl set-default graphical.target

  1. Now we are going to reboot the system, write

reboot

  1. To confirm the driver is working open nvidia x server settings (save the configuration file too), if the driver is not in use it will open a blank screen. In terminal write:

sudo lshw -c display

  1. When the configuration says "configuration: latency=0" you have to disable secure boot in the bios (Zorin OS users).

Voilla, you have installed your nvidia driver manually.

Update the nvidia driver manually on Zorin OS and Pop! OS: This only works when you installed the driver manually before (Post 1).

  1. Download the official Nvidia Driver and place it in the home folder

Optional: you can rename the NVIDIA-Linux-x86_64-565.57.01.run driver to 1.run. I personally use 1.run because i don't want to write the whole nvidia name into the terminal. In the tutorial below i use the original name from nvidia, it's up to you what you want to use.

  1. The file needs permission to be executed, you can do this by 2 ways. The first one is by terminal, the second one by right clicking on the file (NVIDIA-Linux-x86_64-565.57.01.run) and change the permission of the file.

For option one: Open the terminal and write:

chmod +x ./NVIDIA-Linux-x86_64-565.57.01.run

For option two: See the picture below (enable execute below)
IMG_7823

  1. Open up the terminal and write

systemctl set-default multi-user.target

  1. Now we are going to reboot the system, write

reboot

  1. Now we have booted into text mode. Login with your username and password.

  2. Install the new nvidia driver. The old files will be deleted automatically. Write:

sudo ./NVIDIA-Linux-x86_64-565.57.01.run

  1. Follow the instructions (hit everything on yes)

  2. When the installation is done we need to have root access, write:

sudo -i

  1. Now you have to write this to get your desktop enviroment back:

systemctl set-default graphical.target

  1. Now we are going to reboot the system, write

reboot

A little Suggestion:

Maybe it would be good to mark the Option on this Picture because it isn't English (Is this dutch?). So, the People would directly know where to Look.

1 Like

Good suggestion, i did some tweaks in post 1 and 2.

Old thread got deleted on my request because people had issues with it. Did some tests on my old acer notebook, the old tutorial was still accurate BUT the newer nvidia drivers had to use a newer GCC version. If the newer GCC version whas not installed the nvidia driver could not install their kernel modules.

Tutorial should work now for everyone.

1 Like

A new nvidia driver has been released (550.135). It can be downloaded here

Release highlights:

  • In Linux kernel 6.11, drm_fbdev_generic was renamed to drm_fbdev_ttm.Use drm_fbdev_ttm when present to keep supporting direct framebufferaccess needed for Wayland compositors to present content on newerkernels.
  • In linux-next commit 446d0f4849b1, output_poll_changed is removedfrom struct drm_mode_config_funcs. Do not implement the functionpointer member when not present to ensure the driver can compile withnewer kernels. The driver now supports enumerating modes on hotplugevents through the DRM fbdev API.
  • Updated the kernel module build process to use CONFIG_CC_VERSION_TEXTfrom the Linux kernel's Kconfig to detect the compiler used to buildthe kernel. This may help select the correct compiler on systems wherethe kernel was built with a compiler other than the default one.
  • Fixed a bug that prevented kernel modules linked using precompiledkernel interface files from loading on recent Debian systems.
1 Like