Differences between revisions 1 and 65 (spanning 64 versions)
Revision 1 as of 2012-01-17 13:57:21
Size: 5868
Editor: PeterWu
Comment:
Revision 65 as of 2020-04-09 06:12:04
Size: 10484
Editor: ?nvidiaLmao
Comment: libgl1-nvidia-tesla-glxis no longer listed now is presented in libnvidia-tesla-glcore
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#language en
~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[fr/Bumblebee|Français]] - [[it/Bumblebee|Italiano]] - [[es/Bumblebee|español]] - [[ru/Bumblebee|Русский]] - [[pt_BR/Bumblebee|Brasileiro]]-~
----
Line 2: Line 5:
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.
Line 6: Line 6:
The instructions on this page have been made for Debian 6 Squeeze. Debian 5
Lenny is not supported.
<<TableOfContents(3)>>
Line 9: Line 8:
== Requirements == Bumblebee aims to provide support for [[https://developer.nvidia.com/optimus|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.
Line 11: Line 10:
 * source tarball from https://github.com/Bumblebee-Project/Bumblebee/downloads
 * Build dependencies: {{{
sudo apt-get install build-essential pkg-config help2man libx11-dev libbsd-dev
}}}
 * [[http://sourceforge.net/projects/virtualgl/files/VirtualGL/|Virtual GL]]
 * A video driver (nouveau or nvidia, see below)
 * [[https://github.com/Bumblebee-Project/bbswitch|bbswitch]] (kernel module for Power Management, see below)
The instructions on this page applies to Debian Wheezy and newer. Debian Squeeze and prior are not supported.
Line 19: Line 12:
=== bbswitch ===
It's recommended to install this kernel module using DKMS such that it survives
kernel upgrades. The [[https://launchpad.net/~bumblebee/+archive/testing/+packages?field.name_filter=bbswitch|bbswitch-dkms package from Ubuntu]]
is compatible with Debian and can also be used.
'''For users of versions newer than Wheezy''', Bumblebee packages are available directly from the Debian repositories, head down to the [[#Installation|Installation]] section. In summary, it's as simple as installing {{{bumblebee}}} or {{{bumblebee-nvidia}}}, and {{{primus}}}.
Line 24: Line 14:
=== Driver choice ===

NVIDIA Optimus graphics card are very recent, the [[http://packages.debian.org/xserver-xorg-video-nouveau|nouveau]]
package supplied with Squeeze is very old. For nouveau, kernel 3.1 and up is recommended
because of the firmware. If you're using Squeeze, the easiest way is to use
the NVIDIA proprietary driver.

==== NVIDIA blob ====
To install the nvidia proprietary driver, you will have to install the
[[http://packages.debian.org/nvidia-glx|nvidia-glx]] and
[[http://packages.debian.org/nvidia-kernel-dkms]] packages. If using Squeeze, the
backports repository [[https://wiki.debian.org/Backports|needs to be enabled]].
Make sure APT has ''non-free'' and ''contrib'' sources (consult the [[DebianMan:5/sources.list|sources.list(5)]] man page for help on doing this).

After refreshing the package lists using `sudo apt-get update`, install the NVIDIA drivers with: {{{
sudo apt-get install -t squeeze-backports nvidia-glx linux-headers-$(uname -r) nvidia-kernel-dkms
}}}
(remove {{{-t squeeze-backports}}} if you are not using Squeeze)

The following command is '''very''' important, if you skip it you will loose
3D acceleration. Restore Mesa as the default GL library since the primary
display is running on the Intel graphics card: {{{
sudo update-alternatives --set glx /usr/lib/mesa-diverted
}}}
'''For Wheezy users''', Bumblebee packages are available from [[https://backports.debian.org/Instructions/|wheezy-backports]]. Follow the steps listed on that page to add backports to your sources.list (but make sure that you also add wheezy-backports' contrib repository as well to your sources.list, e.g. {{{deb http://YOURMIRROR.debian.org/debian wheezy-backports main contrib non-free}}}), and then install {{{bumblebee}}} or {{{bumblebee-nvidia}}}, and {{{primus}}}. Refer to the [[#Installation|Installation]] section below.
Line 51: Line 18:
=== Compiling ===
Configure the source tree, it can be as simple as {{{./configure}}} if you
use nouveau and want to install Bumblebee to {{{/usr}}} with the configuration
directory at {{{/usr/local/etc/bumblebee}}}.
=== From repository ===
Line 56: Line 20:
If you use the proprietary nvidia driver, set the correct driver paths: Users of versions newer than Wheezy can install everything directly from the official repositories.

For users who would like to use the free nouveau driver:

{{{sudo apt install bumblebee primus}}}

For users who would like to use the proprietary nvidia driver (again, requires contrib and non-free enabled in your sources.list):

{{{sudo apt install bumblebee-nvidia primus libgl1-nvidia-glx}}}

Since Debian bullseye libgl1-nvidia-glx no longer exists, the correct package is --(libgl1-nvidia-tesla-glx)-- '''libnvidia-tesla-glcore''' so to install nvidia drivers from bullseye or more recent versions:

{{{sudo apt install bumblebee-nvidia primus libnvidia-tesla-glcore}}}

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:i386}}}. This requires [[Multiarch|Multiarch]] support. Similarly, if 32-bit [[Mesa|OpenGL]] support is required (e.g., for running 32-bit Microsoft Windows games under [[Wine]]), install {{{libgl1-nvidia-glx:i386}}}, as explained [[http://forums.debian.net/viewtopic.php?f=7&t=136830|here]].

{{{sudo dpkg --add-architecture i386 && sudo apt update && sudo apt install bumblebee-nvidia primus libgl1-nvidia-glx primus-libs:i386 libgl1-nvidia-glx:i386}}}

Wheezy users can install everything directly from backports.

{{{sudo apt install -t wheezy-backports bumblebee primus}}}
 -or-
{{{sudo apt install -t wheezy-backports bumblebee-nvidia primus}}}
 -or-
{{{sudo dpkg --add-architecture i386 && sudo apt update && sudo apt install -t wheezy-backports bumblebee-nvidia primus primus-libs:i386}}}

'''Note''' wheezy-backports does ''not'' contain the newer {{{xserver-xorg-video-intel}}} package that is needed by newer intel cards. If you find yourself stuck with the fbdev or vesa driver then you'll need to upgrade to a newer version.

'''Warning''' DebianPkg:xserver-xorg-video-intel is not developed any more since 2017. Using it may impair your experience on newer graphic cards. As referred in [[GraphicsCard#Intel]], use the modesetting driver instead.

'''Warning:''' If you choose to install bumblebee-nvidia and the dependent nvidia driver packages, during postinst, you will see a debconf prompt warning you that you need to create a xorg.conf file in order to use the proprietary nvidia driver. '''This prompt only applies to non-Optimus users''', i.e. single Nvidia GPU systems. Do '''NOT''' allow debconf to create a xorg.conf file, and do '''NOT''' run nvidia-xconfig! (This prompt always appears when you install nvidia packages through the repositories, and it currently does not detect Optimus/bumblebee users. See DebianBug:735049 for a brief explanation.)

=== Compiling from source ===

Refer to [[Bumblebee/ManualInstall]]. These instructions are provided for historical reference only and are not recommended now that packages are available through the repositories.


== Post-installation ==

You must add your user to the {{{bumblebee}}} group in order to use optirun, i.e.

{{{sudo adduser $USER bumblebee}}}

where $USER corresponds to your username. 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. 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:
Line 58: Line 73:
./configure CONF_DRIVER_MODULE_NVIDIA=nvidia-current \
  CONF_LDPATH_NVIDIA=/usr/lib/nvidia:/usr/lib32/nvidia \
  CONF_MODPATH_NVIDIA=/usr/lib/nvidia,/usr/lib/xorg/modules
 $ `optirun [options] <application> [application-parameters]`
Line 63: Line 76:
Append {{{--sysconfdir=/etc}}} if you wish to have configuration files available
at {{{/etc/bumblebee}}}.
Example:
Line 66: Line 78:
Continue with building and installing files.
Line 68: Line 79:
make
sudo make install
 $ `optirun glxgears -info`
Line 72: Line 82:
=== Startup script ===
To make the bumblebee daemon (bumblebeed) start on boot, install an
init script: {{{
sudo install -m755 scripts/sysvinit/bumblebeed /etc/init.d/
sudo update-rc.d bumblebeed defaults
For a list of options for `optirun` open the manual page with `man optirun` or run:

{{{
 $ `optirun --help`
Line 79: Line 88:
=== Groups ===
For security reasons, the use of Bumblebee is restricted to a
certain group. By default, this group is {{{bumblebee}}}, which
must be created: {{{
sudo groupadd
}}}
== Power Management ==
Line 86: Line 90:
Users who are allowed to use Bumblebee must be added (replace `$USER`
accordingly): {{{
sudo usermod -a -G bumblebee $USER
}}}
Group settings are re-read after login so re-login to get started.
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.
Line 92: Line 92:
== 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`

== 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.
Line 108: Line 97:
If you have any questions, feel free to join [[http://webchat.freenode.net/?channels=#bumblebee|#bumblebee]] on Freenode.
If you have any questions, feel free to join [[https://webchat.freenode.net/?channels=bumblebee|#bumblebee]] on Freenode.
Line 111: Line 101:
First of all: If you have any problem, please read the article [[https://github.com/Bumblebee-Project/Bumblebee/wiki/Troubleshooting|Troubleshooting]]. If your issue is not solved, you can join the [[http://webchat.freenode.net/?channels=#bumblebee|#bumblebee]] IRC channel to ask for help (recommended). See also
https://github.com/Bumblebee-Project/Bumblebee/wiki/Reporting-Issues
Line 114: Line 102:
When asked to create a bugreport, run the `sudo bumblebee-bugreport` command in a terminal First of all: If you have any problem, please read the article [[https://github.com/Bumblebee-Project/Bumblebee/wiki/Troubleshooting|Troubleshooting]]. If your issue is not solved, you can join the [[https://webchat.freenode.net/?channels=bumblebee|#bumblebee]] IRC channel to ask for help (recommended). See also
[[https://github.com/Bumblebee-Project/Bumblebee/wiki/Reporting-Issues|how to report issues]].
Line 116: Line 105:
== Uninstall ==
If you're unsatisfied with Bumblebee, you can remove it by running {{{sudo make uninstall}}} from the source directory.
When asked to create a bug report, run the `sudo bumblebee-bugreport` command in a terminal.
Line 119: Line 107:
== Social Media ==
Follow us on: [[http://www.facebook.com/pages/Bumblebee-Project/292915584089408|Facebook]] and [[https://twitter.com/#!/Team_Bumblebee|Twitter]].
=== 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.

{{{ sudo service bumblebeed restart }}}

(Refer to Debian Bug DebianBug: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 (DebianBug: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 [[https://snapshot.debian.org/package/linux/|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 [[https://github.com/Bumblebee-Project/Bumblebee/issues/455#issuecomment-22497464|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 [[https://github.com/Bumblebee-Project/bbswitch/issues/140|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 [[https://github.com/Bumblebee-Project/Bumblebee/issues/764#issuecomment-234494238|issue #764]].

- If your laptop freezes during boot in Debian Buster when starting the graphical display, you may try workaround where you force Bumblebee service to start after display manager [[https://github.com/Bumblebee-Project/Bumblebee/issues/1036|issue #1036]]
Line 123: Line 151:
 * https://wiki.ubuntu.com/Bumblebee
* UbuntuWiki:Bumblebee
Line 125: Line 154:
 * http://wiki.debian.org/NvidiaGraphicsDrivers  * NvidiaGraphicsDrivers
 * https://bumblebee-project.org/

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 applies to Debian Wheezy and newer. Debian Squeeze and prior are not supported.

For users of versions newer than Wheezy, Bumblebee packages are available directly from the Debian repositories, head down to the Installation section. In summary, it's as simple as installing bumblebee or bumblebee-nvidia, and primus.

For Wheezy users, Bumblebee packages are available from wheezy-backports. Follow the steps listed on that page to add backports to your sources.list (but make sure that you also add wheezy-backports' contrib repository as well to your sources.list, e.g. deb http://YOURMIRROR.debian.org/debian wheezy-backports main contrib non-free), and then install bumblebee or bumblebee-nvidia, and primus. Refer to the Installation section below.

Installation

From repository

Users of versions newer than Wheezy can install everything directly from the official repositories.

For users who would like to use the free nouveau driver:

sudo apt install bumblebee primus

For users who would like to use the proprietary nvidia driver (again, requires contrib and non-free enabled in your sources.list):

sudo apt install bumblebee-nvidia primus libgl1-nvidia-glx

Since Debian bullseye libgl1-nvidia-glx no longer exists, the correct package is libgl1-nvidia-tesla-glx libnvidia-tesla-glcore so to install nvidia drivers from bullseye or more recent versions:

sudo apt install bumblebee-nvidia primus libnvidia-tesla-glcore

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:i386. This requires Multiarch support. Similarly, if 32-bit OpenGL support is required (e.g., for running 32-bit Microsoft Windows games under Wine), install libgl1-nvidia-glx:i386, as explained here.

sudo dpkg --add-architecture i386 && sudo apt update && sudo apt install bumblebee-nvidia primus libgl1-nvidia-glx primus-libs:i386 libgl1-nvidia-glx:i386

Wheezy users can install everything directly from backports.

sudo apt install -t wheezy-backports bumblebee primus

  • -or-

sudo apt install -t wheezy-backports bumblebee-nvidia primus

  • -or-

sudo dpkg --add-architecture i386 && sudo apt update && sudo apt install -t wheezy-backports bumblebee-nvidia primus primus-libs:i386

Note wheezy-backports does not contain the newer xserver-xorg-video-intel package that is needed by newer intel cards. If you find yourself stuck with the fbdev or vesa driver then you'll need to upgrade to a newer version.

Warning xserver-xorg-video-intel is not developed any more since 2017. Using it may impair your experience on newer graphic cards. As referred in GraphicsCard#Intel, use the modesetting driver instead.

Warning: If you choose to install bumblebee-nvidia and the dependent nvidia driver packages, during postinst, you will see a debconf prompt warning you that you need to create a xorg.conf file in order to use the proprietary nvidia driver. This prompt only applies to non-Optimus users, i.e. single Nvidia GPU systems. Do NOT allow debconf to create a xorg.conf file, and do NOT run nvidia-xconfig! (This prompt always appears when you install nvidia packages through the repositories, and it currently does not detect Optimus/bumblebee users. See 735049 for a brief explanation.)

Compiling from source

Refer to Bumblebee/ManualInstall. These instructions are provided for historical reference only and are not recommended now that packages are available through the repositories.

Post-installation

You must add your user to the bumblebee group in order to use optirun, i.e.

sudo adduser $USER bumblebee

where $USER corresponds to your username. 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. 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]`

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.

 sudo service bumblebeed restart 

(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 when starting the graphical display, you may try workaround where you force Bumblebee service to start after display manager issue #1036

References


CategoryHardware