From Bumblebee's FAQ:
Bumblebee is a effort to make Nvidia Optimus enabled laptops work in GNU/Linux systems. Such feature involves two graphics cards with two different power consumption profiles plugged in a layered way sharing a single framebuffer.
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 tries to mimic the Optimus technology behavior; 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 connected to a "fake" screen (the screen is configured but not used). The second server is called using VirtualGL as if it were a remote server. That said, you will need a series of steps to set-up the kernel driver, the X server and a daemon.
To add Power Management functionality you need to installAUR package.
Using Nouveau Driver
To use the Nouveau driver make sure you have these packages:
- experimental 3D acceleration driver
- Mesa classic DRI + Gallium3D drivers
- Mesa 3-D graphics libraries
To get them run
# pacman -S xf86-video-nouveau nouveau-dri mesa
Using Nvidia Driver
To use Nvidia you need to install AUR from AUR, and the nvidia kernel module you like, both AUR or would work. Optionally there is AUR package in AUR that will depend explicitly on AUR for convenience.
Then make sure you load the proper kernel module at startup. If you run into trouble try the official Bumblebee wiki on GitHub.
There are some post-install steps to do before you can use Bumblebee.
Giving permission to use Bumblebee
Permission to use
optirun is granted to all members of the
bumblebee group, so you must add yourself (and other users whiling to use Bumblebee) to that group:
# usermod -a -G bumblebee $USER
$USER is the login name of the user to be added. Then log off and on again to apply the group changes.
Start Bumblebee Daemon
Bumblebee provides a daemon to start the second X server and manage some privileged functions, to start it simply run:
# rc.d start bumblebeed
To be started at boot add it to your
DAEMONS array in
You can test Bumblebee with this command:
$ optirun glxspheres
If it succeeds means you are able of offload render to the Nvidia card.
To run any program trough Bumblebee you need to append
optirun to it:
$ optirun <application>
You can run
$ optirun --help
for available options.
You may configure some variables in file
Compression and VGL Transport
Compression and transport regards how the frames are compressed in the server side (bumblebee X server), then transported to the client side (main X server) and uncompressed to be displayed in the application window. It mostly will affect performance in the GPU/GPU usage, as the transport is unlimited in bandwidth. Compressed methods (such as
jpeg) will load the CPU the most but will load GPU the minimum necessary; uncompressed methods loads the most on GPU and the CPU will have the minimum load possible.
You can try different compression methods adding
-c argument to
optirun command and test which suits you best:
optirun -c <compress-method> glxspheres
<compress-method> can be
yuv. Then you can replace the one you like in
VGLTransport variable in
... [optirun] VGLTransport=proxy ...
To launch an application using the dedicated graphics card:
$ optirun [options] <application> [application-parameters]
For a list of options for
$ optirun --help
If you want to run a 32-bit application on a 64-bit system you may need to install the proper 'lib32' packages.
The goal of power management is to turn the discrete card off when it is not used by any application, and turn it back on when it is needed. Currently the card can be used on-demand and no automatic switching is supported by default.
To enable it, first make sure you haveAUR in place and loaded at boot
MODULES=(... bbswitch ...)
Make sure the secondary Xorg server is stopped when not in use. Then in the driver section of
bumblebee.conf set the
PMMethod option to
[bumblebeed] KeepUnusedXServer=false ... [driver-nvidia] PMMethod=auto ... [driver-nouveau] PMMethod=auto ...
This should be enough as the daemon will recognize the module loaded and act accordingly. Then restart the daemon
# rc.d restart bumblebeed