How To Switch Between Intel and Nvidia Graphics Card on Ubuntu

These days, it is common to see two graphics cards on laptops: Intel graphics and Nvidia. This tutorial will show you how to seamlessly switch between Intel and Nvidia graphics card on Ubuntu.

Which Graphics Card Should You Use?

For gaming and 3D charting that requires a lot of graphics power, use the discrete Nvidia card. If you are not interested in gaming or 3D charting, the integrated Intel graphics card, which is embedded in the CPU, is good enough and it consumes less energy than Nvidia card does, resulting in less energy consumption and longer battery hours.

Step 1: Check What Graphics Card You’ve Got

The first thing you need to do is to check what graphics card your laptop has. This is a very easy task on Ubuntu. Just paste the following command in the terminal window.

lspci -k | grep -A 2 -i "VGA"

How To Switch Between Intel and Nvidia Graphics Card on Ubuntu

As you can see, my laptop has Intel and Nvidia Graphics card. If this is also the case for you, then continue to read this article.

Step 2: Check What Graphics Card You Laptop is Using

Ubuntu uses Intel graphics by default. If you think you made some changes to this before and you don’t remember what graphics card is being used, then go to system settings > details, and you will see the graphics card being used right now.

Step 3: Install Nvidia Graphics Card Driver

Ubuntu comes with the open source nouveau driver which is included in the Linux kernel for Nvidia cards.  However, this driver lacks 3D acceleration support. For best graphics performance, we can use the software-properties-gtk program to install the proprietary driver. Enter the below command in the terminal window.

software-properties-gtk

This will open up the software & updates window. Click the Additional Drivers tab. You can see what driver is being used for Nvidia card (Nouveau by default) and a list of proprietary drivers.

Software & Updates_ additional drivers

You can choose the highest version. You can also open up a new terminal window and enter the following command to see which binary driver is recommended for your specific card.

 sudo ubuntu-drivers devices

How To Switch Between Intel and Nvidia Graphics Card on Ubuntu

As you can see, nvidia-352 is recommended for my Nvidia card, so I enter this command to install it.

sudo apt-get install nvidia-352

After the proprietary driver is installed, re-open software & updates window, you should see that the newly installed driver is being used for Nvidia card. If it’s not being used, select it and click the Apply Changes button at the bottom-right corner.

How To Switch Between Intel and Nvidia Graphics Card on Ubuntu

Now we have installed the proprietary driver for Nvidia graphics but we still are using the Intel Graphics card.

Step 4: Switch to Nvidia Graphics Card

After you selected the proprietary driver for Nvidia, You may have to reboot your computer to enable PRIME support. If PRIME supported is not enabled, you might encounter the below message.

Message: PRIME: is it supported? no

Once rebooted, open Nvidia X Server Settings from Unity Dash. Alternatively, you can issue this command to open it.

nvidia-settings

NVIDIA X Server Settings_ prime profiles

Click PRIME Profiles tab on the left pane, and then select Nvidia card on the right pane. If you don’t have PRIME Profiles, reboot your computer so PRIME can be enabled.

Now go to System Settings > Details, you will see the Nvidia Graphics card.

How To Switch Between Intel and Nvidia Graphics Card on Ubuntu

To switch back to Intel graphics, simply select Intel in PRIME Profiles. You can also use terminal commands to switch graphics card. For example, this command will switch to Intel graphics card.

sudo prime-select intel

To switch to Nvidia card:

sudo prime-select nvidia

To check which card is being used right now, run this command:

prime-select query

How to Uninstall Nvidia Drivers

Sometimes Nvidia drivers can fail and you get a blank desktop with no panel or launcher. Sometimes you may encounter the following error:

driver ebridge is already registered aborting

In these cases, you would want to uninstall Nvidia drivers completely which is quite simple to do. Just run the following command to remove all packages that start with nvidia in the package name.

sudo apt purge nvidia-*

As always, if you found this post useful,  subscribe to our free newsletter or follow us on Google+Twitter or like our Facebook page.

Rate this tutorial
[Total: 274 Average: 3]

22 Responses to “How To Switch Between Intel and Nvidia Graphics Card on Ubuntu

  • hmmm…i did this fo rmine and i don’t have near as many settings as you. I especially don’t have graphics switching 🙁 not sure why. Linux sucks

    • Xiao Guoan
      2 years ago

      Hi, Caleb. After Nvidia proprietary driver is installed, you may have to reboot your computer to enable PRIME.

    • Caleb
      2 years ago

      I did already. Doesn’t work. I’ve reinstalled Linux multiple times too to no avail. Also got stuck into a login loop where it old me my password was wrong even though I told it to auto login. I’m not sure why Ubuntu is like this

    • Xiao Guoan
      2 years ago

      I was stuck into the same login loop before. What I did is to boot into recovery mode and create a new user.

    • Caleb
      2 years ago

      Thats so odd. That shouldn’t happen . I want to like Linux and switch from Windows but little things like this make it really hard to justify

    • Xiao Guoan
      2 years ago

      This login loop and some other errors, like MariaDB login failure, are Ubuntu only. I don’t know why Canonical, the company behind Ubuntu, still can’t fix these errors. Everyone will not encounter these errors. I hope this won’t discourage you to try Linux. If you don’t like it, you can try other Linux distributions. That’s the suggestion I have for you and Linux beginners.

    • Caleb
      2 years ago

      I’ve used Linux before. I don’t know if it is just Ubuntu but the stability of it really suffered bad. I’ve tried Linux mint and it wouldn’t even boot after install. Maybe a KDE distroeoild work better. But weird things like CPU hangs still exist also. Why can’t it just shut down properly? If it sees I have a hybrid card, why not install properly. It obviously knows what cardi am using

  • Alex Camilleri
    2 years ago

    Perfect article, thank you very much for this useful guide

  • Carlos Santos
    2 years ago

    The article are very good. But I my system don’t change to Nvidia Card. I folow every steps.

    I’m using Ubuntu 16.04.

    • Xiao Guo-An (Admin)
      2 years ago

      Using terminal commands to switch graphics card may give you some hint on what’s wrong.

      sudo prime-select nvidia
  • Any idea why when i switch to intel using the nvidia program it no longer boots up? it freezes right after the splash screen and before the gui gets loaded

    • Xiao Guo-An (Admin)
      2 years ago

      Mine works like a charm. I think you should check out the system log to see what’s wrong.

       less /var/log/syslog
    • Mad Man
      4 months ago

      I have the same issue. The instructions at this link allows me to switch without problems now.
      https://askubuntu.com/questions/879856/nvidia-prime-cant-switch-to-intel
      This works for my current driver nvidia-384 as well.

  • in the additional drivers tab, I have some weird virtual box stuff, can you please help me get Nvidia stuff?

  • Eloies Jordan
    4 months ago

    Great guideline indeed. Thanks for sharing.

  • David Cardoso
    4 months ago

    Great! Thank you!

  • Bas Heijermans
    4 months ago

    Thank you very very much!

  • Victor Yarema
    4 months ago

    There is a problem with command ‘ lspci -k | grep -A 2 -i “VGA” ‘.
    In my case it doesn’t list NVidia controller because it is prefixed as “3D controller:” instead of “VGA controller:”.
    The command should be
    lspci -k | grep -E -A2 -i ‘VGA|3D’

  • Attila The King
    3 months ago

    Thanks dude. Working on GeForce GT 540M.
    Ubuntu 18.04

  • Quality content. Thanks for sharing.
    Successfully switched to Intel Graphics (ubuntu 18.04) since I don’t need to be constantly running on GTX 1050 in my daily use and the fan noise was starting to annoy me.

  • On running command “nvidia-settings”, I am getting following error

    ** Message: PRIME: No offloading required. Abort
    ** Message: PRIME: is it supported? no

    ERROR: nvidia-settings could not find the registry key file. This file should
    have been installed along with this driver at
    /usr/share/nvidia/nvidia-application-profiles-key-documentation. The
    application profiles will continue to work, but values cannot be
    prepopulated or validated, and will not be listed in the help text.
    Please see the README for possible values and descriptions.

  • After using the command ( lspci -k | grep -A 2 -i “VGA” ) as you told my terminal window doesn’t show any sign of Nvidia GPU but my laptop has a GeForce MX130 discreet GPU, what should I do?

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • * Some of my previous answers are lost after I uninstalled Disqus comment system from my website. I try to recover those answers whenever I can.