i got optimus running on a fresh ubuntu 12.04 installation (m11x r2, gt 335m) without any problems by following the directions on bumblebee’s site:


Installation

Bumblebee 3.0 is supported up to Ubuntu version 12.04.

Currently, you need to open your terminal and enter the commands below.

sudo add-apt-repository ppa:bumblebee/stable

If you are on Ubuntu 11.04 or older and want newer drivers (recommended) than the ones available in the official repos, run:

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates

sudo apt-get update
Install Bumblebee using the proprietary nvidia driver:

sudo apt-get install bumblebee bumblebee-nvidia

Reboot or re-login

Formerly, you had to add a user manually to a group with sudo gpasswd -a $USER bumblebee. As of version 3.0-2, which was released on April 30th, this is not necessary anymore for new installations. With that version, the 32-bit libraries are also installed automatically on Oneiric and later.

For advanced users, if you do not want to use the proprietary nvidia driver or 32-bit libraries (for example, if you are only interested in power savings), install bumblebee with: sudo apt-get install –no-install-recommends bumblebee

source: https://wiki.ubuntu.com/Bumblebee#Installation

i suspect that when this article was written that these instructions did not exist or work, but… when i did optirun glxspheres i got 60 fps (not great from what i read above, but hey) it appears that the proper gpu is kicking in.

good luck!