Bumblebee (Optimus support) HowTo

Read First:
This guide is not conclusive and worked for the author and others, it may or may not work in every situation or for every hardware combination. In either case post what has worked and what has not worked and the best attempt will be made to collect the information in this post.

In the recent generation of laptop/netbooks intel and nvidia have collaborated to bring a hybrid graphics solution to the market. This system incorporates a cpu with a integrated low end (low power) gpu in conjunction with a discrete higher end (higher power) gpu. The general purpose of the system is to only system resources according to the users activity to maximize power efficiency. The system uses the integrated gpu in normal desktop operations and simple applications saving power. If the user runs a gpu intensive application such as a 3d game then the system will seamlessly switch over to running the application on the higher end gpu resulting in a much better user experience, but at a increases power loss. At least this is how it functions with the support nvidia provide in windows.

Nvidia has already said they will not support optimus under linux. Well that of course didnt stop some users from finding a way. There a mainly 2 works undergoing to support nvidia hybrid graphics. The first is bumblebee, which uses a software solution to run appplications through the nvidia gpu and send the results back to the screen. The second is at the driver level and is called vga_switcharoo. (At this time I do not know much about this project but I believe it will allow a similar experience that is provided by the windows system)

This solution uses VirtualGL and a secondary X11 server (:8) to run the application on the nvidia or nouveau driver and send the results back to the main X11 server.

Install the repo and packages for this project:
One Click:

Now at this point bumblebee should be able to function using the nouveau driver. Although nouveau does not provide the same level of performance the nvidia module does.

Install the nvidia packages from the nvidia repository. (If you need help on this step find the post on installing the nvidia driver and follow the easy way). Make sure you restart at least the window mananger (i.e. go to runlevel 3 and then back to 5), of course a reboot doesnt hurt.

Now the Nvidia driver should be running, check dmesg for nvidia messages (should not see nouveau) It would also be good to check the xorg log file for :8. This may show the monitor type failed and the message will be very clear. There are tow types CRT and DLP, check the log and if the error is present then find the xorg.conf for nvidia provided by the bumblebee package and change the monitor type. Reboot and the driver should load error free.

At this point both intel and nvidia should be running and available. To check if it is working correctly first send:
intel: glxinfo
nvidia : optirun glxinfo

Each should show the correct renderer name and a lot of other color information. If its short and with no vendor information then it is not working. If it is not working check the known problems at the end.

An alternative test is glxgears or glxspheres. The important thing to check is the fps. The intel should have a much lower result than nvidia.

Known Problems:
Intel side works, but the Nvidia side does not: check the xorg.conf for X11 :8 and look for errors. It may something simple as the wrong monitor type.

Nvidia side works, but the Intel side does not: it is possible installing the nvidia driver it overwrites the intel files. I was able to correct this by reinstalling the mesa packages, xorg-intel, xorg-drivers packages. At this point I do not know if all are required.

Vdpau Support: as is this does not work. The vdpau system expects to render directly, which isnt supported by this solution. There have been some reports of using an application called windump, although this sounds to be a bad hack and could break the system.
Reference: https://lists.launchpad.net/hybrid-graphics-linux/msg01708.html

HDMI Support: does not work, I expect being that bumblebee is a software work around it can not use this port. More likely is that with vga_switcharoo or some other low level support will provide this in the future.

Works Bumblebee also with Tumbleweed? I see builds there, but for Tumbleweed the nvidia driver must be installed “the hard way”.

Yes in general if you can install the nvidia module the ‘easy way’ via rpms you could try and build it the ‘hard way’. But be aware the nvidia install process will overwrite parts that intel side will need. I did this once, i was not able at that time to recover it (ended up installing the os from scratch), but later I had a similar experience with the intel side breaking when the latest nvidia driver was updated. I was able to fix by resintalling mesa and xorg/intel packages. So it may work, but your going to have to experiment.

That’s what snapper is for ;).

Do you know anything about Ironhide? I’ve seen Bumblebee was split up in The Bumblebee Project and Ironhide some time ago.

Maybe it would be nice to include in your HowTo, how to enable power management.
I was able to get power management working with

sudo bumblebee-configuration

and selecting a similar configuration (I have a Lenovo T520 and since most Lenovo notebooks have the same Optimus card, it works like a charm).

For information - to help tie some ‘related’ threads together - we recently also have another Optimus Guide written from a slightly different perspective here : http://forums.opensuse.org/english/get-technical-help-here/how-faq-forums/unreviewed-how-faq/469419-opensuse-12-1-optimus-laptop.html

Now Optimus is for users with nVidia/Intel hybrid graphics. For users with Radeon/Intel hybrid graphics, we don’t have a guide yet, although there is a recent thread with some useful information on Radeon/Intel here: http://forums.opensuse.org/forums/english/get-technical-help-here/laptop/445072-i-have-problem-switchable-graphics-laptop.html

Nvidia side works, but the Intel side does not: it is possible installing the nvidia driver it overwrites the intel files.

You can make it work only by trying this: “zypper install --force xorg-x11-server”
Other packages are: mesa xorg-x11 xorg-x11-driver-video xorg-x11-libX11 xorg-x11-driver-video-intel-legacy

It looks like the Intel card works fine (I’ve tried glxinfo, glxgears, and gnome shell actually loads) and the bumblebee daemon is running (checked for the process), but when running something with optirun, I get:

[ERROR]Cannot access secondary GPU - error: [XORG] (EE) Problem parsing the config file

[WARN]The Bumblebee server was not available.

And then the program proceeds to load with the Intel card instead of the NVidia one.
My /etc/X11/xorg.conf looks like this:

Section “ServerLayout” Identifier “X.org Configured” Screen 0 "Scr - Pastebin.com


Okay, I’ve cleaned up my config, but it still returns that error.