Configure Bumblebee for NVIDIA Optimus based laptops on Linux Mint 17

By | April 26, 2015
If you are using a laptop running a discrete Nvidia GPU along with an integrated Intel HD graphics chip, chances are, you are running an Nvidia Optimus (switchable graphics) compliant machine.
If you are using Windows, configuring your graphics cards to switch on demand is as simple as installing the respective Intel and Nvidia graphics drivers. They generally take care of using the appropriate GPU depending upon your task.
Using Optimus on Linux on the other hand, is a whole different ball game. The configuration is fairly complicated and can be intimidating for Linux novices. Here, I will be showing you how to configure Nvidia Optimus on Linux Mint 17. 
The main software we will need to configure is Bumblebee which will allow you to switch to your Nvidia GPU on demand.
The laptop I’m using is an Asus K53SM with the following configuration:
  • Intel Core i5 – 2450
  • 4GB DDR3 RAM
  • 1TB HDD
  • Nvidia GT630M alongwith Intel HD3000 Integrated Graphics
 This guide is applicable for any laptop with Nvidia Graphics running alongside Intel HD Graphics.
Note: It is recommended that you follow these steps on a fresh installation of Linux Mint 17.
1. Installing Bumblebee
 Installing Bumblebee is a fairly simple process. We will try to use the terminal as little as possible in this guide.
First, you need to open Synaptic Package Manager. This can be found in Menu > Administration > Synaptic Package Manager.

 

 

Next, we will search for bbswitch-dkms, right-click on the package and click Mark for Installation.



Then we type bumblebee in the search box to get the following result. Right-click on 

  • bumblebee
  • primus
  • bumblebee-nvidia
respectively and select Mark for Installation.
Now, click on the Apply at the top of the window. Let the installation of the packages complete before moving to the next step.

2. Installing the NVIDIA Graphics Driver

Once we finish the installation of Bumblebee, we need to ensure that we have the correct Nvidia graphics driver installed. To do this click on Menu > Administration > Driver Manager. This window may take some time to open.

 

 

Once open, select nvidia-331, then click Apply Changes. Driver installation will take some time. After it’s done, move on to the next step.
3. Configuring Bumblebee
This is where you will need to use a terminal. Please follow this step very carefully. First, we need to open a Terminal window. To do this, simple press Ctrl+Alt+T. In the terminal window, type the following:


sudo gedit /etc/bumblebee/bumblebee.conf

In the text window which open, you need to find the following lines:

# The Driver used by Bumblebee server. If this value is not set (or empty),
# auto-detection is performed. The available drivers are nvidia and nouveau
# (See also the driver-specific sections below)
Driver=

and change them to…..

# The Driver used by Bumblebee server. If this value is not set (or empty),
# auto-detection is performed. The available drivers are nvidia and nouveau
# (See also the driver-specific sections below)
Driver=nvidia

Next, find the following section:

## Section with nvidia driver specific options, only parsed if Driver=nvidia
[driver-nvidia]
# Module name to load, defaults to Driver if empty or unset
KernelDriver=nvidia-current
PMMethod=auto
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/nvidia-current:/usr/lib32/nvidia-current
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib/nvidia-current/xorg,/usr/lib/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia

and replace with the following text……

## Section with nvidia driver specific options, only parsed if Driver=nvidia
[driver-nvidia]
# Module name to load, defaults to Driver if empty or unset
KernelDriver=nvidia-331
PMMethod=auto
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/nvidia-331:/usr/lib32/nvidia-331
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib/nvidia-331/xorg,/usr/lib/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia

Once that is done, make sure you click on Save before you close the Text Editor window.

4. Finally

Now that the configuration is over, all you need to do is restart your computer. You should notice that your computer is not heating up as much as it used to, and your battery is not draining as fast as earlier.

For explicitly running something using the Nvidia GPU, you need to run it from the Terminal using the following command.

optirun application
 

Replace “application” in the above code with the name of the application that you wish to run. The application will now be using the Nvidia GPU for rendering.

 

2 thoughts on “Configure Bumblebee for NVIDIA Optimus based laptops on Linux Mint 17

  1. Nix 666

    Hi, Thank you for the great tutorial. I would like to know whether not having bumblebee installed ,but only the nvidia driver-331 , could result in freezes and lockups in Mint 17 Cinnamon ? I have a friend with an Asus TravelMate-5760G who recentlry installed Cinnamon , and the GUI freezes and random times.

    Any input on this would be greatly appreciated.

    Thank you

    Reply
    1. Piyush

      The thing is, the Nvidia driver itself implements what is known as Nvidia PRIME. This is supposed to allow you to switch between the onboard Intel, or the discrete Nvidia adapter, but the implementation is kinda broken. This may result in some inconsistencies with the GUI.

      Unless your PC exclusively has an Nvidia card without Optimus, I wouldn't recommend using just the Nvidia driver. If you aren't interested in gaming, you could remove the Nvidia driver, and turn off the card from the BIOS setup. This will make Linux default to the onboard Intel card, which should be more stable.

      Reply

Leave a Reply

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