Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Just wandered if there is a way to use optirun with the desktop environment.

Anyone know if it works?


I have been reading a lot about bumblebee and still have not found any conformation on whether or not your desktop environment runs with optirun (using the GPU) by default or not. Or if it even works.

I do keep coming back to it to try and figure it out, but so far I have no success.

Note: bumblebee works fine with my machine (Ubuntu 12.04, NVIDIA GT 650M GDDR3 2GB Graphics)

share|improve this question
possible duplicate of optirun fails in Ubuntu 12.10 Not an exact duplicate mind you, but the answer is likely similar. – bodhi.zazen Feb 26 '13 at 21:39
I'm using 12.04 (as the tag states), its a general question, optirun works fine on my machine. I want to know if you can run optirun startx with out issue? – Ne0 Feb 26 '13 at 21:44
I am not sure about that. You might want to update your question. – bodhi.zazen Feb 26 '13 at 21:52
up vote 3 down vote accepted

Bumblebee has two components:

  • Power Management (PM)
  • Enable you to use the dedicated GPU

The PM component puts the Nvidia card in the D3 state to save power when Bumblebee thinks that you do not need the dedicated GPU.

The second component (which you are asking about) is accomplished by starting a X server that binds to the Nvidia card. Each client that wants to render something on the Nvidia card needs this X server for rendering. Since this server is headless, you won't see anything until it is drawn to a display. The desktop that you run on the Intel GPU is used for displaying the rendered frames. In order to transfer the frames from the rendering X server to the displaying X server, a bridge such VirtualGL or primus is needed.

ASCII art that shows the architecture when three different applications are running using both primus and virtualgl as transport:

  |   rendering X server (Nvidia)     |
    ||              ||             ||
VirtualGL-\    /--primus       /-primus
    ||     \  /     ||        |    ||
|glxgears|  ||  |glxgears|    |  |java|
            ||                |
  |     displaying X server (Intel)   |

So no, you cannot use optirun startx or something to draw your full desktop on the Nvidia card. Remember that the Nvidia GPU is headless, rendering something on the nvidia card and then transporting it back for displaying on the same headless GPU is quite useless. If you have an external monitor, it might be possible (varies between hardware) to render/display everything on that screen (see Bumblebee wiki).

You may also be interested in

share|improve this answer
Thanks for the informative answer. I don't think I could even do it with my external monitor then. It would appear that my HDMI and VGA outputs are connected to the Intel chip-set. I had read the Multi Monitor set-up and have based this assumption on that info. I have not needed to make any changes to the stock bumblebee install to get a multi monitor desktop working. – Ne0 Mar 4 '13 at 10:11
@Ne0 , Lekensteyn, Is there a way to query what state the Graphics Card is in? (Powersave mode / Running / Off etc) – user3728501 Jul 24 '13 at 2:44
As standard it is always in power save, until you run an application with optirun. – Ne0 Jul 24 '13 at 8:26
@EdwardBird Try optirun --status – Lekensteyn Jul 24 '13 at 10:10
@Lekensteyn Okay thanks! – user3728501 Jul 24 '13 at 10:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.