Ubuntu 14.04 Dual graphics Nvidia doesn't work

If you have nvidia prime installed just go to nvidia x server settings and choose it in prime profile (you need to relog to apply the changes). Nvidia prime

To install prime:

First make sure bumblebee not installed! Or just remove it:

sudo apt-get purge bumblebee*

Install:

sudo apt-get install nvidia-prime

You can also install prime-indicator for easier switching. Prime indicator

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install prime-indicator

If you prefer to use bumblebee/have it installed you have to run the application with a command to use the video card (advantage: you don't need to relog).

optirun <program-name>

To install bumblebee make sure you remove prime! More info: https://wiki.ubuntu.com/Bumblebee