[How-To] Manually install the latest Nvidia driver on Zorin 16 and Pop! OS 21.04

Install the nvidia driver manually on Zorin OS 16: (scroll down for Pop! OS instructions)

  1. Download the official Nvidia Driver and place it in the home folder
  2. 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
  3. 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
  4. Disable Nouveau Nvidia driver, write in the terminal:
    sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
    sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
  5. Check if the nouveau driver is blacklisted, write in the terminal:
    cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf
  6. After you checked, write in the terminal:
    sudo update-initramfs -u
  7. Stop Desktop Manager, write in the terminal:
    sudo telinit 3
  8. Install the new Nvidia Driver, write in terminal:
    sudo bash NVIDIA-Linux-x86_64-470.63.01.run
  9. Follow the steps in the nvidia setup
  10. The Nvidia driver is now installed, reboot with this command:
    sudo reboot
  11. When you are in Zorin OS 16 check if the driver is actually installed, to check this write in the terminal:
    sudo lshw -c display
  12. When the configuration says "configuration: latency=0" you have to disable secure boot in the bios.
  13. Reboot and your good to go

With dkms installed:

Update your nvidia installation:

  1. Stop Desktop Manager, write in the terminal:
    sudo telinit 3
  2. Install the new Nvidia Driver, write in terminal:
    sudo bash NVIDIA-Linux-x86_64-470.74.run
  3. Follow the steps in the nvidia setup.
  4. The Nvidia driver is now installed, reboot with this command:
    sudo reboot

Install the nvidia driver manually on Pop! OS 21.04:

First i found a tutorial online to install the nvidia driver manually on Pop! OS 20.04. This guide did not work at all for Pop! OS 21.04 and i am not sure if the tutorial online is complete, because i had to do alot more then those few steps they posted here → Upgrading NVIDIA Drivers in Pop OS 20.04 | by Nitin Reddy | Medium

  1. Download the official Nvidia Driver and place it in the home folder
    Optional: rename the NVIDIA-Linux-x86_64-470.74.run driver to 1.run

  2. Install the build essential package, those are needed for the nvidia driver.
    In terminal write: sudo apt install build-essential libglvnd-dev pkg-config

  3. Blacklist the Nouveau Nvidia driver otherwise the nvidia driver does not work proper.
    In terminal write: sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
    In terminal write: sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"

  4. Check if the nouveau driver is blacklisted.
    In terminal write: cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf

  5. If everything is done
    In terminal write: sudo update-initramfs -u

Now we are going to install the nvidia driver. We switch to text mode.

  1. In terminal write: systemctl set-default multi-user.target
  2. In terminal write: reboot

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

  1. Write: sudo apt remove --purge '^nvidia-.*'
  2. When the purge is done write: sudo apt-get autoremove
  3. After that write: chmod +x ./1.run (remember i said to change the name to 1.run ?, to make it easier)
    Optional: sudo ./1.run --uninstall
  4. Install the nvidia driver. Write: sudo ./1.run
  5. Hit everything on yes in the installer.
  6. When the installation is done, write: sudo -i
  7. When you have root acces, write: systemctl set-default graphical.target
  8. Now write reboot and your good to go if you did all the steps above.
  9. To confirm it’s working open nvidia x server settings, if the driver is not in use it will not open. Also in terminal write: sudo lshw -c display
  10. When the configuration says "configuration: latency=0" you have to disable secure boot in the bios.

That’s all

5 Likes

Hmmm... This seems very thorough, but also quite complicated way how to install nv drivers.
Why not just adding an nVidia repository to your Zorin system with:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update

and then just installing drivers like:

sudo apt install nvidia-graphics-drivers-<xyz>

?

Your method install drivers only from PPA.
@Michel's method install more recent driver which is only available from Nvidia site.

1 Like

@boldos, how is this complicated ? The steps i posted tells you exactly how to do so.

My first zorin os installation got messy with the ppa, i will never use that method again. Jelly mode was so slow...i tried to refert back to stock zorin os driver but it did not let me to and made it worse so i did a clean install and decided to use the nvidia driver instead.

Well, his method is in 3 lines :wink:
But of course the end result is not the same.

That is a peril of PPA.
As the name indicates it is a "personal" thing and some PPA is abandoned for quite sometime. phpMyadmin is one of those and I had to install it from the source :frowning:

Zorin OS 16 got a kernel update, i noticed the nvidia driver was not working properly anymore. I have read somewhere this can be fixed, but i can't find it anymore.

For now i just reinstalled the driver, that worked.

1 Like

I have seen three other posts on this same thing. That the 5.11.0-34 kernel update caused Black Screen for other users. Tagging this to @azorin and @zorink for immediate attention.

Well don't forget i use the nvidia driver from the nvidia site. I did not get a black screen, it booted fine but i noticed it was a bit laggy. So i checked the driver and it was set to noveau again (even if it is blacklisted).

In the past in mint 17 nvidia used dkms, but when i check in zorin i don't even see dkms is installed. Do we need it so the driver can load AFTER a new kernel upgrade ?

DKMS can definitely help with this, but whether you need it depends on how the driver was installed. Drivers patched in from the developer generally do not need DKMS to roll forward with a kernel update. Drivers installed from a third party source by the user would need DKMS to prevent having to reinstall the driver each and every time the kernel upgrades.

Well like i said before, i do remember in the past when i manually installed nvidia on the mint 17 installation it used dkms. Now when i manually install the driver it does not ask about it.

So "normally" after a kernel upgrade the driver should auto load ? Even when i installed the nvidia driver from the nvidia site ?

In the case of your guide, you are installing from the Nvidia site, not from an independent developer that patched the driver for Linux.
DKMS may help you prevent needing to reinstall after a kernel upgrade.
You can install dkms with:

sudo apt-get install dkms

Then when you move to install a new kernel, build against the... Actually let me find a guide or this post can get out of hand...


Guide:
https://www.xmodulo.com/build-kernel-module-dkms-linux.html

Oh - one other thing - You also can often search for and install a dkms kernel already compiled. You can choose between the native kernel build or the LTS build.

Thanks for the guide, i think i will just reinstall the driver if it happens again haha.

1 Like

There may be an easier way and I am just not smart enough to point in that direction. But this is an issue that comes up often enough (Mostly with Realtek Drivers) that it is probably well worth me learning more about.

New kernel 5.11.0-36 + new nvidia driver 470.74 is working fine here.

1 Like

Finally some good news for a change! :+1:

1 Like

Thread updated with Pop! OS 21.04 tutorial and dkms solution for Zorin OS 16 so users don't have to reinstall the nvidia driver when a kernel upgrade has been done.

2 Likes