Debian

Install NVIDIA Optimus Drivers on Debian Laptops

Install Nvidia Optimus Graphics Drivers on Debian 9 Stretch

In this article, I am going to show you how to install and uninstall Nvidia Optimus Graphics drivers for devices that can run in hybrid graphics mode. In Linux, there are two types of Nvidia graphics drivers available. One is called nouveau which is open source and the other one is the closed source drivers from Nvidia. For most people, the open source nouveau drivers are enough. But if you strictly need the closed source Nvidia drivers for high performance graphics experience, then this article is for you.  Let’s get started. I am using GNOME3 desktop on Debian 9 Stretch.

First go to Activities and click on “Software and Updates”

Make sure all of these checkboxes are marked. If they are marked then you’re good to go.

Now run the following command to check whether your device supports Hybrid graphics:

lspci | grep 'VGA\|Nvidia'

You can see that I have Nvidia GeForce 940M and Intel HD Graphics 520 on my laptop.

Now to install Nvidia Optimus graphics drivers, run the following commands:

sudo apt-get update
sudo apt-get install bumblebee-nvidia

Press ‘y’ and press <Enter> to continue. It should take a while for it to download and install all of these packages from the internet.

You should get the following message, simply press <Enter>. It’s nothing serious. The nouveau graphics driver will be blacklisted after installing the proprietary Nvidia drivers anyway. So it won’t be loaded from the next boot.

Once it’s complete, restart your computer. Once your computer boots, you have to perform some additional steps.

Open a terminal and run the following command:

sudo nano /usr/share/applications/nvidia-settings.desktop

The following window opens up:

Here you have to change only the marked section. Change it as it’s shown in the screenshot below.

Now press Ctrl+X and press to save the file.

Now click on “Activities” in the top left corner and search for “Nvidia”:

Click on Nvidia icon and you should be able to see Nvidia settings as shown below.

So everything is working correctly.

If you want to uninstall Nvidia Optimus drivers and go back to open source nouveau drivers, just run the following commands:

sudo apt-get autoremove --purge bumblebee-nvidia

Press ‘y’ and then press , Nvidia Optimus graphics drivers should be uninstalled.

Once it’s complete, restart your computer. That’s how you install and uninstall Nvidia Optimus graphics drivers on Debian 9 Stretch.

About the author

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.