Question: Background: I'm a 3D artist (as a hobby) and have recently started using Ubuntu 12.04 LTS as a dual-boot with Windows 7. It's running on my a fairly new 64-bit Toshiba laptop with an nVidia GeForce GT 540M GPU (graphics card). It also, however has Intel Integrated Graphics (which I suspect Ubuntu's been using).

So, when I render my 3D scenes to images on Windows, I am able to choose between using my CPU or my nVidia GPU (faster). From the 3D application, I can set the GPU to use either CUDA or OpenCL. In Ubuntu, there's no GPU option.

After doing (too much?) research on the issues with Linux and the nVidia Optimus technology, I am slightly more enlightened, but a lot more confused.

**I don't care one bit about the Optimus technology, as battery life is not by any means an issue for me.**

Here's my question: What can I do to be able to use CUDA-utilizing programs (such as Blender) on my nVidia GPU in Ubuntu? Will I need nVidia drivers? (I have heard they don't play nicely with Optimus setups on Linux.) Is there at least a way to use OpenCL on my GPU in Ubuntu?

Answer: 
Hybrid graphics (usually Intel integrated graphics and Nvidia discrete graphics) support under Linux is currently a bit troublesome. Something is slowly moving in the X server field but don't hold your breath.

As you have guessed Bumblebee is currently a good way to go.

I recently bought an Asus N55 laptop with Intel/Nvidia graphics I was able to get the Blender Cycles renderer to use CUDA.

When I installed Ubuntu 12.04 it used the integrated graphics by default trough the intel graphics driver. The noveau graphics driver should not get installed.

Then I opened a terminal and did:

```
sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update
sudo apt-get install bumblebee bumblebee-nvidia

```

After that I did (as recommended by the installation instructions):

```
sudo usermod -a -G bumblebee $USER

```

Then I rebooted.

To choose the driver to use when launching programs use the optirun program, for example:

```
optirun blender

```

To test if all works correctly use:

```
optirun glxspheres

```

And verify the GL vendor string contains the word Nvidia.
If you run instead:

```
glxspheres

```

The vendor string should contain the Intel word
I find that to run all the examples of CUDA, using Bumblebee, you have to install the drivers 295.40 from [here](http://www.nvidia.com/object/linux-display-amd64-295.40-driver.html) and during installation *choose not to override* the `config x11`.

Then you have to use the same driver to compile the examples and to run the program.