Update as of Ubuntu 12.10:
All the pieces of the graphics stack required to support hybrid graphics made it into 12.10; the Quantal Quetzal has the infrastructure to support for hybrid graphics - both to extend the display when the external monitors can only be driven by the discrete chip, and to run applications on the discrete chip and display them on the integrated GPU.
There are two caveats, though, one large, one minor.
The minor caveat is that there's no GUI support - there's no obvious way to run an application on the discrete GPU. You can do this by setting the
DRI_PRIME=1 environment variable before starting an application.
The major caveat is that this only applies to the free drivers -
intel. Nvidia has now expressed interest in supporting hybrid graphics on linux, but the
dma-buf kernel symbols they need to use are marked as GPL, which they won't use.
Additionally the hybrid support has seen only light testing, and there are still pieces that remain to be implemented, like synchronisation across GPUs to prevent tearing.
Status as of Ubuntu 12.04 LTS:
nVidia's official position is that they have no plans to support Optimus on Linux - our graphics stack is engineered with an assumption that only one card is driving a given display, and it's not easy to work around.
Dave Airlie has done a lot of work untangling this in the X server and kernel, and that'll likely be rebased on the
drm-buf work that's primarily come out of the ARM world via Linaro. Once this is all up and running - which seems to be 6 months to a year away - it'll be possible to do hybrid graphics correctly. At that point nVidia might reconsider supporting Optimus on Linux, as it will no longer be a huge technical mess to implement¹.
In terms of supporting hybrid graphics now, the Bumblebee project does something along those lines. It essentially runs a second X server on the nVidia card and copies across the output of the rendering. This is not as bad as it might sound - that's basically what the nVidia card does under Windows 7, too, just with a little bit of hardware support.
The Ubuntu X team does not plan to support Bumblebee or Ironhide (a fork of Bumblebee).
If your system has a BIOS option to switch between the Intel and nVidia cards then you can chose between them.
If your system has a hardware mux - so both the nVidia and Intel GPUs are connected to the outputs - and vga_swicheroo works, you can use that interface to switch between them, but only if you're using the open-source drivers. For 12.04 we plan to ensure that the unused GPU is turned off in this case, which should improve battery life.
If your system doesn't have a BIOS option and doesn't have a hardware mux that vga_switcheroo knows how to drive then your nVidia card will not be usable on 12.04.
fglrx driver has some support for hybrid graphics. It appears to do this by pretending to be an X server and loading the Intel driver itself. This is not a clean solution ☺.