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 card and Nvidia graphics card. 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: 297 Average: 3.8]

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

  • Alex Camilleri
    8 years ago

    Perfect article, thank you very much for this useful guide

  • Carlos Santos
    7 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)
      7 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)
      7 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
      6 years 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
    6 years ago

    Great guideline indeed. Thanks for sharing.

  • David Cardoso
    6 years ago

    Great! Thank you!

  • Bas Heijermans
    6 years ago

    Thank you very very much!

  • Victor Yarema
    6 years 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
    6 years ago

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

  • Skander
    6 years ago

    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?

  • electronico
    6 years ago
    nico@nico-GS43VR-6RE:~$ sudo lspci | grep VGA
    [sudo] Mot de passe de nico : 
    00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
    01:00.0 VGA compatible controller: NVIDIA Corporation GP106M [GeForce GTX 1060 Mobile] (rev a1)
  • “Sometimes Nvidia drivers can fail and you get a blank desktop with no panel or launcher”. Nice, isn’t it?
    What to do if this happens?. How could you get back?

  • You explained how to install the Nvidia drivers, but how about the intel ones? Is it good enough to have the ones provided by Canonical or should we try and install the Intel® Graphics Update Tool for Linux from 01.org? Do you think this tool could be compatible with the Nvidia drivers and the PRIME profiles?
    Thank you.

  • Mathias
    5 years ago

    In a typical newer laptop there is a hybrid graphics setup in the bios. Here I can choose between 1: discrete graphics card. 2: enable hybrid graphics. 3: Auto.

    Do you know if such bios settings affect the manual switching between graphics cards as described here? What should the bios setting be?

  • Thanks Xiao. Very helpful.

  • i am having an issue in which the first command you do
    ” lspci -k | grep -A 2 -i “VGA” ”

    only reads the Intel GUI

    jdosio@2io-01:~$ lspci -k | grep -A 2 -i “VGA”
    00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
    Subsystem: Dell HD Graphics 530
    Kernel driver in use: i915

    however, all other interface including, Additional Drivers through settings, “sudo ubuntu-drivers devices”, and even prime provides an option to switch between drivers.

    however when i reboot nothing happens, i am still shown to be using the Intel driver through settings.
    anyone know what I should do ?

  • Syed Hamza
    5 years ago

    great tutorial, thanks 🙂

  • Hello, I am working with a Linux, bionic version. I want to use Psychtoolbox from Matlab (a software where correct timings between frames is very important) and I want to run it in the Nvidia GeForce MX130 the laptop has, instead of the Intel one.
    I have followed all the steps for the installation of the drivers that are explained above, and when I type:

     prime-select query 

    it says that Nvidia is the card being used. But when I run the program, it turns out it still uses the Intel card.
    I couldn’t find any place to specifically ask for this program to run with Nvidia.
    If someone has any idea on how to solve this, I would be very grateful. Thanks!

  • helloWang
    5 years ago

    very useful thanks a lot 🙂

  • MarcialCZ
    4 years ago

    Hello, For some of you, the problem of getting Ubuntu to load Nvidia may be related to Secure Boot. You may choose to disable secure boot (not recommended but it works) or manually create a signed key. See https://wiki.ubuntu.com/UEFI/SecureBoot/DKMS to check how to do both options.
    Please if someone more enlightened can elaborate on this answer, please do.

  • Supriya Chakraborty
    4 years ago

    I got help from this site.

    Thanks

  • Hrishikesh Waikar
    4 years ago

    Great article! Helped a lot with getting my Nvidia Drivers working. Very well explained. I have still not got the Prime Profiles tab in my Nvidia X Server Settings GUI. However, as long as I am able to run Nvidia driver as my prime GPU, I am happy.

  • Ayush Akarsh
    4 years ago

    lspci -k | grep -A 2 -i “VGA” command only shows my nvidia driver as VGA compatible controller, what should I do?
    I have checked – gedit /etc/X11/xorg.conf
    It shows this along with other things, no mention of intel of any sort
    Section “Device”
    Identifier “Device0”
    Driver “nvidia”
    VendorName “NVIDIA Corporation”
    BoardName “GeForce GTX 1650”
    Option “RegistryDwords” “EnableBrightnessControl=1″
    EndSection

    I have edited my grub and this only to ensure that I can change brightness using function keys.

    GRUB CHANGE-
    GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash acpi_backlight=video”

  • Really thanks! Finally some manual which is working on my machine and on first time.

  • Thank you very much!

  • Thanks, this worked perfectly for me, except for the lspci command:

    mark@foo:~$ lspci -k | grep -A 2 -i VGA
    00:02.0 VGA compatible controller: Intel Corporation UHD Graphics (rev 05)
    	DeviceName: Onboard - Video
    	Subsystem: Dell Device 09c0
    

    But I knew this was wrong, due to a command I found on a different post:

    mark@foo:~$ sudo lshw -C display
      *-display                 
           description: 3D controller
           product: GP108M [GeForce MX250]
           vendor: NVIDIA Corporation
           physical id: 0
           bus info: pci@0000:02:00.0
           version: a1
           width: 64 bits
           clock: 33MHz
           capabilities: pm msi pciexpress bus_master cap_list rom
           configuration: driver=nvidia latency=0
           resources: irq:163 memory:ec000000-ecffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:3000(size=128) memory:ed000000-ed07ffff
      *-display
           description: VGA compatible controller
           product: UHD Graphics
           vendor: Intel Corporation
           physical id: 2
           bus info: pci@0000:00:02.0
           version: 05
           width: 64 bits
           clock: 33MHz
           capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
           configuration: driver=i915 latency=0
           resources: irq:162 memory:eb000000-ebffffff memory:80000000-8fffffff ioport:4000(size=64) memory:c0000-dffff
    

    The rest all worked a treat and I’m now running the correct device/driver

  • Harold Burton
    3 years ago

    Uh F-Zero was the TITS in 91, Yoshis Island, ZeldaLink to Past/ChronoTrigger, Mario Cart/SuperMarioWorld & Turtles inTime OMG, fantastic games.SF2 was the game that started al the fighting craze… PERIOD.Mortal Kompats don’t belong on this list, as they did nothing for gaming other than the rating system & Ultra Hype that evaporates after a wek of playing unlike SF, also pick one of EarthWorm Jims not 1&2, they’re almost identical.Also StarFox was just good, i bought it, got boring in a couple of weeks.

    Harold Burton

  • Ashley Jones
    3 years ago

    Sorry to say but Donkey Kong Country is NOT better than its sequel, Diddy’s Kong Quest. Everything that was done well in the first game was done EVEN BETTER in the sequel. Also, Super Metroid is leagues ahead of some of the choices above it, such as DKC, Mario World, and ALTTP (my opinion on those last 2, it is definitely better than DKC). However I think DKC 2 is better than Super Metroid, but they are my favorite and second favorite games respectively.
    Ashley Jones

  • Thanks a bunch!

  • laptopleon
    2 years ago

    After a lot of wasted time, I found out my monitor is from the early days of HDMI and does not support resolutions over 2K over HDMI. So that’s why I could not get Ubuntu screen settings to higher than 2K via HDMI, even though the monitor’s native resolution is higher (2560×1600 = WQXGA) and the motherboard native / intel gpu specs go to 4K.

  • An easier way: https://github.com/bauca/graphics-switcher

  • Thank you very much, this solved my problem!

  • This was exactly what I needed. Thanks!

  • best article found to solve my problem and understand how to change graphic card settings in ubuntu, thankyou

  • Hello,
    I went over on the tutorial, also thrie to disable secure mode as @MarcialCZ recommended. If i run ‘prime-select query’ it returns with ‘nvidia’ however if I check Settings -> About, it says the ‘Mesa Intel® UHD Graphics (CML GT2)’ in use.
    Additional driver name: ‘nvidia-driver-525-open’
    Ubuntu version: 20.04
    Computer: Lenovo Ideapad gaming 3
    Any idea how could I solve it?

    • *tried (typo: thrie)

      And I forgot to mention, it is a dual boot PC with a Win10 too.

  • John Walshaw
    1 year ago

    Even though 525-open shows as recommended, test the nvidia-driver-525 as has more features. You may need to temporarily change to x.org X server first in order to swap out the nvidia driver version.

  • is used prime-select query and its also showing nvidia but in settings menu its still showing intel uhd graphics….

  • Thank you so much!!

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.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here