Differences between revisions 47 and 76 (spanning 29 versions)
Revision 47 as of 2014-01-24 22:11:56
Size: 8223
Comment:
Revision 76 as of 2021-08-24 17:41:36
Size: 10949
Editor: ThiagoPezzo
Comment: fix pt_BR label in header
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[fr/Bumblebee|Français]] - [[it/Bumblebee|Italiano]] - [[ru/Bumblebee|Русский]]-~ ~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[fr/Bumblebee|Français]] - [[it/Bumblebee|Italiano]] - [[es/Bumblebee|español]] - [[pt_BR/Bumblebee|Português (Brasil)]] - [[ru/Bumblebee|Русский]]-~
Line 6: Line 6:
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.

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 sections for installing on [[#debian10|Debian 10 or older]], or [[#debian11|Debian 11 and newer]], depending on your need.

Though not recommended since official packages are available, historical instructions for compiling from source can be found at [[Bumblebee/ManualInstall]].
Line 8: Line 16:
Bumblebee aims to provide support for [[http://www.nvidia.com/object/optimus_technology.html|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.
<<Anchor(debian11)>>
== Debian 11 and newer ==
Line 12: Line 19:
The instructions on this page applies to Debian Wheezy and newer. Debian Squeeze and prior are not supported. === Installation ===
For users who would like to use the free and open-source "Nouveau" driver:
{{{
sudo apt install bumblebee primus
}}}
Line 14: Line 25:
'''For Sid and Jessie users''', 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}}}. 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
}}}
Line 16: Line 30:
'''For Wheezy users''', Bumblebee packages are available from [[http://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. For users who need accelerated 32-bit application support on a 64-bit system with the proprietary driver ([[Multiarch/HOWTO|Multiarch]] required):
{{{
sudo apt install primus-libs:i386 libprimus-vk1:i386 nvidia-primus-vk-wrapper:i386 nvidia-driver-libs-i386
}}}
Line 18: Line 35:
== Installation == === Usage ===
While the {{{optirun}}} command that was used in Debian 10 and older versions is still available, much better performance can be found by using the new {{{primusrun}}} command. This uses the same syntax as before, i.e.:
{{{
primusrun [options] <application> [application-parameters]
}}}
Which would look something like:
{{{
primusrun glxgears -info
}}}
Line 20: Line 45:
=== From repository === Debian 11 also introduces Vulkan support for Bumblebee, however it requires using the proprietary driver due to Nouveau's current lack of support for the Vulkan API. {{{primusrun}}} should also work for Vulkan applications, however if you run into any issues, you may try explicitly using the {{{pvkrun}}} command instead.
Line 22: Line 47:
Sid and Jessie users can install everything directly from the official repositories. ----
Line 24: Line 49:
For users who would like to use the free nouveau driver: <<Anchor(debian10)>>
== Debian 10 and older ==
=== Installation ===
For users who would like to use the free and open-source "Nouveau" driver:
Line 26: Line 54:
{{{sudo apt-get install bumblebee primus}}} {{{
sudo apt install bumblebee primus
}}}
Line 28: Line 58:
For users who would like to use the proprietary nvidia driver (again, requires contrib and non-free enabled in your sources.list): For users who would like to use the proprietary driver (make sure the contrib and non-free components are enabled in your [[SourcesList]] file):
Line 30: Line 60:
{{{sudo apt-get install bumblebee-nvidia primus}}} {{{
sudo apt install bumblebee-nvidia primus
}}}
Line 32: Line 64:
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. 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 DebianPkg:primus-libs-ia32. This requires [[Multiarch/HOWTO|Multiarch]] support to be enabled. Similarly, if 32-bit OpenGL support is required (e.g., for running 32-bit Microsoft Windows games under [[Wine]]), install the DebianPkg:nvidia-driver-libs-i386 package.
Line 34: Line 66:
{{{sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install bumblebee-nvidia primus primus-libs:i386}}} '''Warning:''' If your internal graphics card is an Intel chipset, you may wish to uninstall the DebianPkg: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.
=== Usage ===
To run your application with the discrete NVIDIA card, the syntax would be:
{{{
optirun [options] <application> [application-parameters]
}}}
Line 36: Line 73:
Wheezy users can install everything directly from backports. For example:
{{{
optirun glxgears -info
}}}
Line 38: Line 78:
{{{sudo apt-get install -t wheezy-backports bumblebee primus}}}
 -or-
{{{sudo apt-get install -t wheezy-backports bumblebee-nvidia primus}}}
 -or-
{{{sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install -t wheezy-backports bumblebee-nvidia primus primus-libs:i386}}}
For a list of options for `optirun` open the manual page with `man optirun` or run:
{{{
optirun --help
}}}
Line 44: Line 83:
'''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 jessie or sid. ----
Line 46: Line 85:
'''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.) == Using Bumblebee with Steam ==
The proprietary [[Steam]] gaming storefront and distribution software also supports using Bumblebee with surprising ease. If you want to run the entire client (including games launched through it) with Bumblebee then you can simply run the client with {{{optirun}}} or {{{primusrun}}} (depending on your Debian version).
Line 48: Line 88:
Alternatively, Wheezy, Jessie, and Sid users can install everything from an external repository (which was setup before bumblebee packages were made available in the official repositories). Check [[http://suwako.nomanga.net/]] for details. If you want to apply this on a game-specific basis, you'll have to set the game's launch options from its "Properties" menu in the Steam client.
Line 50: Line 90:
=== Compiling from source === For games on Debian 10 and older, the field should be set to:
{{{
optirun %command%
}}}
Line 52: Line 95:
Refer to [[Bumblebee/ManualInstall]]. These instructions are provided for historical reference only and are not recommended now that packages are available through the repositories.

For games on Debian 11 and newer, the field should be set to:
{{{
primusrun %command%
}}}
----
Line 57: Line 102:
You must add your user to the {{{bumblebee}}} group in order to use optirun, i.e. In some cases, you may need to add your user to the {{{bumblebee}}} group in order to use optirun, i.e.
Line 59: Line 104:
{{{sudo adduser $USER bumblebee}}} {{{
adduser $USER bumblebee
}}}
Line 61: Line 108:
where $USER corresponds to your username. Don't forget to log out and log back in for this to take effect. 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.
Line 63: Line 110:
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. 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.
----
== Power Management ==
Line 65: Line 114:

== 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 manpage with `man optirun` or run:
 $ `optirun --help`

== Power Management ==
Line 81: Line 118:
Since Bumblebee 3.0, this feature is enabled by default, using [[https://github.com/Bumblebee-Project/bbswitch|bbswitch]]. This allow automatic power management, without any configuration needs. If Power Management doesn't work on your laptop, please go to this [[http://wiki.Bumblebee-Project.org/Power-Management|Power Management (PM)]] page and help to improve Bumblebee. Since Bumblebee 3.0, this feature is enabled by default, using [[https://github.com/Bumblebee-Project/bbswitch|bbswitch]]. This allow automatic power management, without any configuration needs. If Power Management doesn't work on your laptop, please go to this [[https://github.com/Bumblebee-Project/Bumblebee/wiki/Power-Management|Power Management (PM)]] page and help to improve Bumblebee.
----
== IRC ==
Line 83: Line 122:
== IRC ==
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.
----
== Reporting bugs/problems ==
Line 86: Line 126:
== Reporting bugs/problems ==
First of all: If you have any problem, please read the article [[http://wiki.Bumblebee-Project.org/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
http://wiki.Bumblebee-Project.org/Reporting-Issues
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 90: Line 129:
When asked to create a bugreport, run the `sudo bumblebee-bugreport` command in a terminal When asked to create a bug report, run the `sudo bumblebee-bugreport` command in a terminal.
Line 93: Line 132:
Line 94: Line 134:
Line 96: Line 137:
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. 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.
Line 98: Line 139:
{{{ sudo service bumblebeed restart }}} {{{
systemctl
restart bumblebeed
}}}
Line 100: Line 143:
(Refer to Debian Bug DebianBug:717687 for a brief explanation.) (Refer to Debian Bug DebianBug:717687 for a brief explanation. You may use "!KernelDriver=nvidia-legacy-390xx" for example, if nvidia-legacy-390xx.ko is the name of the module that you find in /usr/lib/modules/5.8.0-3-amd64/updates/dkms/)
Line 103: Line 146:
Line 107: Line 151:
- If optirun errors out and {{{dmesg}}} reports that your GPU has "fallen off the bus" on Linux >= 3.10, either stick with an older [[http://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. - If optirun returns the following error (DebianBug:756522):

{{{[ERROR]Cannot access secondar
y 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.
Line 111: Line 170:
- 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]].
Line 112: Line 172:
== Social Media ==
Follow us on: [[http://www.facebook.com/BumblebeeProject|Facebook]], [[https://twitter.com/#!/Team_Bumblebee|Twitter]] and [[https://plus.google.com/u/0/102207276811032054708|Google+]].
- 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]].
Line 115: Line 174:
- 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 [[https://github.com/Bumblebee-Project/Bumblebee/issues/1036|issue #1036]]
----
Line 116: Line 177:
 * UbuntuWiki:Bumblebee
* UbuntuWiki:Bumblebee on Ubuntu
Line 119: Line 181:
 * http://Bumblebee-Project.org/
 * http://suwako.nomanga.net/
 * https://bumblebee-project.org/

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


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 sections for installing on Debian 10 or older, or Debian 11 and newer, depending on your need.

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

Debian 11 and newer

Installation

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

For users who need accelerated 32-bit application support on a 64-bit system with the proprietary driver (Multiarch required):

sudo apt install primus-libs:i386 libprimus-vk1:i386 nvidia-primus-vk-wrapper:i386 nvidia-driver-libs-i386

Usage

While the optirun command that was used in Debian 10 and older versions is still available, much better performance can be found by using the new primusrun command. This uses the same syntax as before, i.e.:

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

Which would look something like:

primusrun glxgears -info

Debian 11 also introduces Vulkan support for Bumblebee, however it requires using the proprietary driver due to Nouveau's current lack of support for the Vulkan API. primusrun should also work for Vulkan applications, however if you run into any issues, you may try explicitly using the pvkrun command instead.


Debian 10 and older

Installation

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 to be enabled. 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.

Usage

To run your application with the discrete NVIDIA card, the syntax would be:

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


Using Bumblebee with Steam

The proprietary Steam gaming storefront and distribution software also supports using Bumblebee with surprising ease. If you want to run the entire client (including games launched through it) with Bumblebee then you can simply run the client with optirun or primusrun (depending on your Debian version).

If you want to apply this on a game-specific basis, you'll have to set the game's launch options from its "Properties" menu in the Steam client.

For games on Debian 10 and older, the field should be set to:

optirun %command%

For games on Debian 11 and newer, the field should be set to:

primusrun %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.


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. You may use "KernelDriver=nvidia-legacy-390xx" for example, if nvidia-legacy-390xx.ko is the name of the module that you find in /usr/lib/modules/5.8.0-3-amd64/updates/dkms/)

- 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