Ubuntu – How does bumblebee optirun actually work

bumblebeenvidia

When I use bumblebee optirun command to start a program , Google Chrome for example, my laptop indicates that it switched to nvidia GPU. My question is: Is then whole desktop rendered by nvidia or just the program I started with optirun ?
I can't imagine that some parts of screen are rendered by one graphic card and other parts by another, but the way optirun command is used (in combination with specific program)makes me wonder.

Best Answer

optirun is an abstraction for VirtualGL. This runs a headless X screen with your Nvidia card and renders the application on that screen. The result is copied over to your visible screen. VGL also allows you to send the result over a network which is pretty cool.

Everything that isn't being optirun'd is directly rendered through your Intel device. That includes the desktop (by default - I'm certain you could hack everything to be optirun if you really wanted - but I wouldn't recommend it).