Install Nvidia drivers on Debian [and Ubuntu]

Many Linux enthiuasts use Linux System with high end specs and find Nvidia drivers difficult to install and, the main reason behind this difficulty is that Nvidia is not open source thus it needs to done manually most of the time. This is the main reason why Linux users are tend to buy AMD GPU at the first place.

But we are not going to buy new GPU instead we will see how to install NVIDIA driver on Debian.

Nvidia

Note: This article will also work on Debian based Linux systems like Ubuntu and others.

Before we install anything make sure everything is up to date.

sudo apt update

Now we need to install small software that will tell you what exact drivers you’ll need for Linux system. Skip this step if you do not wish to test the system and want to install drivers directly.

sudo apt install nvidia-detect

Now run the following command and see it’s output. Skip this step too if you do not want to test.

sudo nvidia-detect

It will tell you what drivers you’ll need based on hardware.

It was suggesting me to install nvidia-driver as I have Nvidia GTX 1060 in my computer system.

Now all you need to do is install that and wait for it to finish.

Since the nvidia driver is large in size it may take few seconds to minutes based on your internet speed.

sudo apt install nvidia-driver

While nvidia driver is being installed you may be prompted for a note that nouveau will be black listed or disabled and something like that, that will be fixed with simple restart when installation is finished.

Reboot the system once and it will apply the nvidia driver in action.

Keep in mind that NVIDIA is not given any driver support to Linux kernel development so new kernel update may brick your installation so better lock your kernel to existing one, or remove NVIDIA driver all together.

To hold your kernel version from updating itself first identify what version of kernel is installed.

uname -r

The output would be like this:

6.xx.x-xx-generic

As you know the version now, hold it from being update.

sudo apt-mark hold 6.xx.x-xx-generic

It will hold a few headers and images that runs the system and now you can relax.

But you should update the system when new drivers are there as using old kernel not suggested for long. However if you have basic home computer then be worry free for 6-12 months. Later try to update.

What if I updated the system accidentally and getting errors.

Simply reboot and from GRUB menu load older kernel and then remove the newer kernel.

Leave a Reply

Your email address will not be published. Required fields are marked *