Translation(s): English - Français - Italiano - español - Русский - Brasileiro


Bumblebee Project

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 card.

The instructions on this page apply to all Debian versions that are currently supported, however modern hardware will accordingly require a modern release of the NVIDIA graphics drivers. If you're using a particularly recent card, please make sure the driver version you're using supports it. A list of the versions available in Debian and the supported devices for each of them can be found on the NvidiaGraphicsDrivers page.

Bumblebee packages are available directly from the Debian repositories, see the Installation section. In summary, it's often as simple as installing bumblebee or bumblebee-nvidia, and primus.

Though not recommended since official packages are available, historical instructions for compiling from source can be found at Bumblebee/ManualInstall.

Installation (Debian 10 and older)

From repository

For users who would like to use the free and open-source "Nouveau" driver:

sudo apt install bumblebee primus

For users who would like to use the proprietary driver (make sure the contrib and non-free components are enabled in your SourcesList file):

sudo apt install bumblebee-nvidia primus

Users running a 64-bit system who want to take advantage of Bumblebee with the primus backend when running 32-bit applications will also want to install primus-libs-ia32. This requires Multiarch support. Similarly, if 32-bit OpenGL support is required (e.g., for running 32-bit Microsoft Windows games under Wine), install the nvidia-driver-libs-i386 package.

Warning: If your internal graphics card is an Intel chipset, you may wish to uninstall the xserver-xorg-video-intel package as the driver it supplies is not actively developed. Use of this driver is actively discouraged if your hardware is new enough (roughly 2007 or newer) as it may introduce other issues.

Installation (Debian 11 and newer)

From repository

Warning: Debian 11 (Bullseye) is currently unreleased and in development. These instructions apply for anyone using it as the current testing branch or anyone using Debian Sid/Unstable. These instructions also may change at any time.

For users who would like to use the free and open-source "Nouveau" driver:

sudo apt install bumblebee primus

For users who would like to use the proprietary driver (make sure the contrib and non-free components are enabled in your SourcesList file):

sudo apt install bumblebee-nvidia primus-nvidia primus-vk-nvidia

Users running a 64-bit system with the proprietary driver who want to take advantage of Bumblebee with the primus backend when running 32-bit applications will also want to install the primus-libs-ia32 and primus-vk-nvidia-i386 packages. This requires Multiarch support. Similarly, if 32-bit OpenGL support is required with the proprietary drive (e.g., for running 32-bit Microsoft Windows games under Wine), install the nvidia-driver-libs-i386 package.

After installation, the usage is comparable to what's written in the current section however you are recommended to use primusrun instead of optirun for OpenGL applications, and pvkrun for Vulkan applications. Do note that pvkrun requires using the proprietary drivers with the primus-vk-nvidia package installed.

For Steam, you must first find whether or not the game you wish to play requires OpenGL or Vulkan. Older or less graphically-intense native games will often require OpenGL, while DirectX games running through Proton/Steam Play along with modern native titles will often require Vulkan. For games using OpenGL, you may set the game's launch options from its "Properties" menu and enter into the field:

primusrun %command%

While for games using Vulkan or DirectX via Proton:

pvkrun %command%

Post-installation

In some cases, you may need to add your user to the bumblebee group in order to use optirun, i.e.

adduser $USER bumblebee

where $USER corresponds to your username. Do also note that this command must be run as root. Don't forget to log out and log back in for this to take effect.

If you have sudo configured for your current user, i.e. your user is a member of the sudo group, this step is not needed (the bumblebee package postinst script takes care of adding sudo users to the bumblebee group automatically). This is likely to be the reason why Bumblebee works out of the box in Ubuntu, but not in Debian, with the same initial setup, i.e. Ubuntu has sudo installed by default; Debian does not configure sudo if you set a root password during installation using the non-live installer. To clarify, sudo is not needed to use bumblebee; it simply makes adding your user to the bumblebee group unnecessary.

Usage

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

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

For example:

optirun glxgears -info

For a list of options for optirun open the manual page with man optirun or run:

optirun --help

Power Management

A primary goal of this project is to not only enable use of the discrete GPU for rendering, but also to enable smart power management of the dGPU when it's not in use. We're using either bbswitch (a module) or vga_switcheroo (kernel module, experimental) to do this in Bumblebee.

bbswitch is packaged in Debian and is automatically installed when choosing to install bumblebee through the repositories.

Since Bumblebee 3.0, this feature is enabled by default, using bbswitch. This allow automatic power management, without any configuration needs. If Power Management doesn't work on your laptop, please go to this Power Management (PM) page and help to improve Bumblebee.

IRC

If you have any questions, feel free to join #bumblebee on Freenode.

Reporting bugs/problems

First of all: If you have any problem, please read the article Troubleshooting. If your issue is not solved, you can join the #bumblebee IRC channel to ask for help (recommended). See also how to report issues.

When asked to create a bug report, run the sudo bumblebee-bugreport command in a terminal.

Common issues

- If optirun returns the following error:

[ERROR]Cannot access secondary GPU - error: Could not load GPU driver

You must edit /etc/bumblebee/bumblebee.conf using your preferred editor as root, and change "KernelDriver=nvidia" to "KernelDriver=nvidia-current", then restart the bumblebee daemon, i.e.

systemctl restart bumblebeed

(Refer to Debian Bug 717687 for a brief explanation.)

- If optirun returns the following error:

[ERROR]Cannot access secondary GPU - error: [XORG] (EE) No devices detected

You may have to set the BusID manually, in /etc/bumblebee/xorg.conf.nvidia. To get the BusID, run lspci | egrep 'VGA|3D' in a terminal. Refer to the comments in that file for further instructions.

- If optirun returns the following error (756522):

[ERROR]Cannot access secondary GPU - error: [XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied

You have to append the following section to /etc/bumblebee/xorg.conf.nvidia:

Section "Screen"
    Identifier "Default Screen"
    Device "DiscreteNvidia"
EndSection

You might also try downgrading libdrm from 2.4.58 to 2.4.56. That might fix the Permission denied errors in Jessie.

- If optirun errors out and dmesg reports that your GPU has "fallen off the bus" on Linux >= 3.10, either stick with an older kernel version (<= 3.9), or add rcutree.rcu_idle_gp_delay=1 to your grub command line (in /etc/default/grub, then run update-grub and reboot) as a workaround.

This is a known problem upstream and suspected to be an issue with the proprietary nvidia driver. Refer to Bumblebee github issue #455.

- If optirun returns the following error: [ERROR]Cannot access secondary GPU - error: Could not enable discrete graphics card and dmesg states: Refused to change power state, currently in D3, you have probably issue with ACPI (encountered on Dell laptops). One solution is to prevent nvidia card to go to failed sleep state. Set PMMethod=none in /etc/bumblebee/bumblebee.conf. To keep the powersaving capabilities, you can try to tweak kernel parameters as noted below for Dell XPS 15 in bumblebee github link and here issue #140.

- If your laptop locks up during boot when starting the graphical display you may need to add a kernel parameter to set acpi_osi="!Windows 2015" or some variant. This is a known ACPI problem with 2017 Dell XPS 15 and others. Refer to Bumblebee github issue #764.

- If your laptop freezes during boot in Debian Buster while starting the graphical display, you may try a workaround where you force the Bumblebee service to start after the display manager issue #1036

References


CategoryHardware