From Mageia wiki
Jump to: navigation, search
Drakconf multiflag.png
Other languages

Deutsch ; English ;


About Bumblebee

Bumblebee aims to provide support for NVIDIA Optimus laptops for GNU/Linux distributions. Using Bumblebee, you can use your NVIDIA card for rendering graphics which will be displayed using the Intel chipset.

When your laptop is configured to use Bumblebee, your system starts using the Intel chipset and works by default as if there was no NVIDIA card. You can then start applications via Bumblebee using either the optirun or primusrun commands as described in a later section.


Graphics drivers configuration

When asked, configure only the Intel integrated graphics processor in the MCC / XFdrake - the most common hardware configuration for Optimus is that the monitor is connected only to the Intel IGP, and it's therefore the one that should be configured. Do not use the "hybrid configuration" option if it is shown, as it would result in a non-working Xorg setup.

If anything goes wrong, you can boot in text mode and delete/rename the file /etc/X11/xorg.conf. The default (empty) configuration should work fine to boot and start Xorg with the Intel drivers.

For Bumblebee, you don't need to do any specific driver configuration - the package will handle it.


Installation

The Bumblebee package is available directly in Mageia's repositories since Mageia 5. It is meant for use with the proprietary nvidia-current driver; older branches of the driver may work too, but the configuration would need to be edited manually to match the driver's identifier.

If you intend to use the libre nouveau driver, we recommend to use Reverse PRIME instead of Bumblebee, which should give much better performance on Mageia 6 and later. On Mageia 5, a bumblebee-nouveau flavor is available if you want to use GPU offloading with the libre driver.

To install Bumblebee, simply run:

# urpmi --auto bumblebee

If you are on a 64-bit machine, we recommend installing the following 32-bit dependencies (necessary to run 32-bit programs, very common among e.g. Steam games):

# urpmi --auto libvirtualgl libturbojpeg0 libprimus

After the installation is completed, add the relevant users to the "bumblebee" group to enable the use of the corresponding service. You can do this with:

# gpasswd -a <username> bumblebee

Now you'll have to restart your computer for the changes to take effect.


Usage

To run your application with the discrete NVIDIA card run in the terminal:

$ optirun [options] <application> [application parameters]

Example:

$ optirun firefox

For a list of options for optirun run:

$ optirun --help

Alternatively, you can use the primusrun command:

$ primusrun [options] <application> [application parameters]

In Mageia, both commands will use by default the "primus" bridge and therefore offer similar performances. optirun offers more options to play with, and can also use the "VirtualGL" bridge with:

$ optirun -b virtualgl <application>

VirtualGL is the default bridge of the Bumblebee project, but this default value has been changed in Mageia as primus is known to offer better compatibility (e.g. with Steam games) and performance. Feel free to experiment with both solutions for each application. Note that the VirtualGL libraries are only recommended by the bumblebee package, so you might not have them installed if you told urpmi not to install recommended packages.


Testing and benchmarking

To confirm that you are properly accessing the NVIDIA card using Bumblebee, you can use glxinfo (from the glxinfo package) or glxspheres64 (from the virtualgl package - note that on 32bit systems, the command is glxspheres):

$ optirun glxinfo | grep OpenGL
$ optirun glxspheres64

The terminal output of these commands should give the name of your NVIDIA card and the OpenGL version that it supports.

If you want to use glxspheres64 to compare the performance of your Intel chipset and NVIDIA GPU, you need to be aware of two things:

  • The framerate is by default capped at 60 FPS since higher framerates usually bring only an excess of power consumption. To lift this upper limit, prefer your commands with vblank_mode=0, e.g.:
$ vblank_mode=0 optirun glxspheres64
  • You might be surprised to find that your Intel chipset gives a better framerate than the NVIDIA GPU with the glxspheres64 test. This is normal and likely due to the fact that the test is not really demanding hardware-wise, and the Intel chipset has direct access to your monitor, contrarily to the NVIDIA GPU with has to go through a bridge to access the monitor. To do a real benchmark, you will have more luck with a graphically-demanding application, e.g. SuperTuxKart or 0 A.D. with high-end graphics.


Managing the bumblebeed daemon

On Mageia, Bumblebee runs as a systemd daemon named bumblebeed. After installation, it is enabled by default and will start with the system. It can be managed as any systemd daemon.

# systemctl [start|stop|status|enable|disable] bumblebeed

The five arguments listed above will respectively start the daemon, stop it, check its status, enable the autostart or disable the autostart.


Troubleshooting

For more info, we strongly recommend to read the very good Arch Linux wiki page about Bumblebee, which has a very detailed troubleshooting section. Most points are valid on Mageia too. You may also be interested in their page about Optimus, which also documents alternatives to Bumblebee that you might be interested in (albeit they may require more manual configuration).

Freeze during boot

On some computers, installing Bumblebee can lead to a freeze during boot. Affected computers seem to have in common a AMI BIOS. This bug is documented though not resolved. A workaround is available here.

You may need to pass some additional options to the kernel. Refer to How to set up kernel options to get the procedure. The option to pass to the kernel may differ depending on your computer. Here is a non-exhaustive list of the kernel option to pass:

  • Clevo N550RN i7-6700HQ HD Graphics 530 + NVidia GeForce 940MX : acpi_osi=! acpi_osi="Windows 2009"

A non-tested list is available on the page mentioned earlier.

References