Bumblebee is a solution to Nvidia Optimus hybrid-graphics technology allowing to use the dedicated graphics card for rendering. It was started by Martin Juhl
- 1 About Bumblebee
- 2 Using Nouveau driver
- 3 Using Nvidia driver
- 4 Configuration
- 5 Usage
- 6 Troubleshooting
- 7 See also
Optimus Technology is an hybrid graphics implementation without a hardware multiplexer. The integrated GPU manages the display while the dedicated GPU manages the most demanding rendering and ships the work to the integrated GPU to be displayed. When the laptop is running on battery supply, the dedicated GPU is turned off to save power and longer the battery life.
Bumblebee is a software implementation based on VirtualGL and a kernel driver to be able to use the dedicated GPU, which is not physically connected to the screen.
How it works
Bumblebee mimics the Optimus technology behaviour; using the dedicated GPU for rendering when needed and power it down when not in use. The present releases only support rendering on-demand, power-management is a work in progress.
The Nvidia dedicated card is managed as a separate X server conected to a "fake" screen (the screen is configured but not used). The second server is called using VirtualGL as it where a remote server. That said, you will need a series of steps to set-up the kernel driver, the X server and a daemon.
Using Nouveau driver
There is way to use Bumblebee with the Nouveau driver. It depends on the experimental 3D support by Gallium3D, so it may not work for you, yet. This option needs almost no configuration but make sure the Nvidia proprietary module is not loaded and you have nouveau-dri package correctly installed.
This option enables power management through vga-switcheroo by default so you must configure 'debugfs' filesystem to be mounted on every boot (see #Setup). Switch is made automatic with a daemon triggered by pm-utils. Rendering is made on-demand.
Please report bugs here.
AUR package: bumblebee-nouveau-git.
To enable power management you will need to mount 'debugfs' filesystem at every boot. Add this line to Template:Filename: Template:File Then reboot. If you don't want to reboot you can mount it manually:
# mount -t debugfs none /sys/kernel/debug/
To run applications just use
$ optirun <application> [application parameters]
To run 32bit applications on a 64bit system you will need lib32's packages:
# pacman -S lib32-libgl lib32-nouveau-dri lib32-mesa
Using Nvidia driver
Versions >= 1.7.10 works with a daemon to start/stop the X server but won't control the card's power (see #Power Management below)
AUR package: bumblebee
In order to make Bumblebee functional you will need to configure a second X server, load the nvidia kernel module and run the bumblebee daemon. Most of these steps are made automatic at installation time and will be managed by the daemon.
Load Kernel Module
In order to run Bumblebee using the proprietary Nvidia kernel module, you need to unload the Nouveau kernel module first. To do so run in a terminal:
# rmmod nouveau
Now load the Nvidia module running this:
# modprobe nvidia
To check for success of loading the kernel module, check the output of this command:
$ lspci -k | grep nvidia
It should be something like this:
Kernel driver in use: nvidia
If you want nvidia module to be loaded at boot, add the Nvidia module in the "MODULES" array in your Template:Filename:
MODULES=(... nvidia ...)
Setup X Server
The installation should take care of recognize your graphics card and it's PCI BusID. If you notice a warning regarding this during installation follow this steps.
After installation a Template:Filename file is created with the minimal device configuration. In this file you must specify the PCI bus address of the Nvidia card. To get it run in a terminal:
$ lspci | grep VGA
This will give you something like this:
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 18) 01:00.0 VGA compatible controller: nVidia Corporation GT218 [GeForce 310M] (rev a2)
Start Bumblebee Daemon
Bumblebee provides a daemon to start the second X server, to start it simply run:
# rc.d start bumblebee
To be started at boot add it to your 'DAEMONS' array in Template:Filename
# DAEMONS=(... @bumblebee)
The goal of power management is to turn the discrete card off when it's not used by any application, and turn it back on when it's needed. Currently the card can be used on-demand and no automatic switching is supported.
You can test Bumblebee by comparing the output of these two commands:
$ optirun glxgears
You may configure some variables in file Template:Filename. The defaults are:
You can try different compression methods adding the '-c <compress-method>' to the 'optirun' command and test which suits you best:
$ optirun -c jpeg glxgears $ optirun -c proxy glxgears $ optirun -c rgb glxgears $ optirun -c yuv glxgears
And you can replace the one you like in VGL_COMPRESS variable in Template:Filename.
To launch an application using the dedicated graphics card:
$ optirun <application> [application-parameters]
If you want to run a 32-bit application on a 64-bit system you may install lib32-nvidia-utils-bumblebee
VirtualGL can't open display
If you recieve a message like this
[VGL] ERROR: Could not open display :XX
means the second X server is not running. To troubleshoot this you must look Template:Filename file, where the 'XX' is the number of the display used by bumblebee.
Here are some things you can try and check:
- Check the kernel module loaded for the nvidia card with "lspci -k"
- Check the file Template:Filename and make sure the option "BusID" points to the correct PCI port.
- Change the "ConnectedMonitor" option to "DFP-0" or "CRT-0" (or "DFP,CRT"). This must be a valid screen on your laptop different of "LVDS"