Article Number: 000132622
This article is about the Nvidia Optimus Technology and its compatibility with the Ubuntu operating system.
Nvidia Optimus is something that Nvidia invented to swap graphics support between the onboard Intel GPU and the discrete Nvidia GPU. It is commonly referred to as Discrete Switching. This is something that is seen on Notebook and AIO (All in One) systems. The purpose behind the technology is to extend battery life and lower power consumption. It switches applications that do not need high-end graphics to the onboard GPU. While saving those applications which require high-end graphics to use the discrete GPU.
In Ubuntu, the term for multiple GPUs is Hybrid Graphics. An application that is called VGA_switcheroo was used to resolve these multiple GPUs. However, it does not support those notebooks with Optimus that do not use a hardware multiplexer. It is only since Ubuntu 14.04 that there is support that is built into the kernel for this technology.
We will go into a bit of detail below as to why and then explain what options you have.
Nvidia did not support the Optimus technology on Ubuntu. While it did give Linux drivers for its discrete GPUs, it never had direct support for this particular hardware setup. Your options were usually to turn either the integrated or discrete GPU off. Use one of them for everything, or try and configure Bumblebee on your system. (This could be difficult if you did not have the use Nvidia only option in your BIOS.)
The Bumblebee project was until recently, as good as it got in terms of support for Optimus hybrid graphics on Ubuntu. You could assign applications via the CLI (Command Line Interface) (i.e. 'optirun vlc') if you had configured Bumblebee correctly. However, getting things like HDMI to work is tricky.
Nvidia took some time to release any support for Optimus. (There is still no direct support for discrete switching at the time this was written.) We can now choose between the integrated or discrete GPU, because Ubuntu 14.04 was the first kernel to support using the Nvidia-prime and the Nvidia-331 drivers. After each configuration change, restart your session (achieved by logging out and logging in) for the change to take effect. There is an applet for quick switching, which is covered in the next section.
This guide assumes you have Ubuntu 14.04 or a more recent revision installed and ready to go.
Are you working with a clean install? If not, or you have previously installed packages like Bumblebee, run the following command before installing the new packages:
sudo apt-get purge libvdpau-va-gl1 bumblebee* nvidia*
There are two ways to go about installing the new packages:
You can use the GUI (Graphical User Interface) and the Driver Manager. Open the Additional Drivers application and select the correct Nvidia release for you (Nvidia-331 is recommended.). Apply changes.
You can also do it using the CLI (Command Line Interface) by installing:
sudo apt-get install nvidia-331 nvidia-settings nvidia-prime
Follow this by a reboot.
You can switch between Nvidia and non-Nvidia (i.e. Intel) cards by pressing Alt + F2 keys together or by typing in Terminal:
To bring up a GUI where you can choose the desired card, then log out and log back in.
Using CLI you can set which card to use as default:
sudo prime-select intel <or nvidia>
Requires a reboot to set changes.
You can also switch cards using:
sudo prime-switch intel <or nvidia>
Requires a reboot to set changes.
sudo service lightdm restart
To verify which card is running, use the command:
sudo prime-select query
While this does not resolve all the issues that are seen with Optimus and Ubuntu. It is a simple answer with proper proprietary support. You can still decide to go with either the integrated or discrete graphics alone. Whichever suits you better.
Inspiron, Latitude, Vostro, XPS, Fixed Workstations
21 Feb 2021