Bumblebee

Differences between revisions 92 and 93
Revision 92 as of 2014-10-29 20:11:33
Size: 8883
Editor: 178
Comment: Add solution for the libGL.so.1 error when running 32-bit applications on a 64-bit system
Revision 93 as of 2015-05-03 10:59:49
Size: 8424
Editor: penalvch
Comment: 1) RM'ed EOL mentionings. 2) Chg'd ref to help.ubuntu.com. 3) Streamlined logic flow of article to follow install/troubleshoot/contact for help precedent.
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
Line 7: Line 8:
graphics which will be displayed using the Intel card. Bumblebee is officially supported by Ubuntu in 13.10 Saucy or newer. However, all releases are supported by the [[https://launchpad.net/~bumblebee|Bumblebee Project community]] from Ubuntu version 12.04 up to 13.10. graphics which will be displayed using the Intel card. Bumblebee is officially supported by Ubuntu in 14.04 newer. However, all releases are supported by the [[https://launchpad.net/~bumblebee|Bumblebee Project community]] from Ubuntu version 12.04 up to 14.04.
Line 9: Line 10:
== Installation == = Installation =
Line 11: Line 12:
=== Basic Setup for 12.04 - 13.04 ===
You need to open your [[http://askubuntu.com/questions/38162/what-is-the-terminal|terminal]] and enter the commands below.
== Setup for 12.04 ==
Line 14: Line 14:
If on 12.04.3, replace linux-headers-generic with linux-headers-generic-lts-raring. You need to open your [[https://help.ubuntu.com/community/UsingTheTerminal|terminal]] and enter the commands below.
Line 16: Line 16:
 1. Enable the [[http://askubuntu.com/questions/78613/how-do-i-enable-the-universe-repository-from-the-command-line|Universe]] and [[http://askubuntu.com/questions/89096/how-do-i-enable-the-multiverse-repository|Multiverse]] repositories - you need to do this to allow the bumblebee and nvidia packages respectively to be installed.
 1. `sudo add-apt-repository ppa:bumblebee/stable`
 3. `sudo apt-get update`
 4. Install Bumblebee using the default proprietary nvidia driver for 12.04 - 13.04 :
 `sudo apt-get install bumblebee bumblebee-nvidia virtualgl linux-headers-generic`
If on 12.04.5, replace linux-headers-generic with linux-headers-generic-lts-trusty.

 1. Enable the [[https://help.ubuntu.com/community/Repositories/Ubuntu|Universe and Multiverse]] repositories in order to allow the bumblebee and nvidia packages to be installed.
 2. {{{
 sudo add-apt-repository ppa:bumblebee/stable
}}}
 3. {{{
sudo apt-get update
}}}
 4. Install Bumblebee using the default proprietary nvidia driver for 12.04: {{{
sudo apt-get install bumblebee bumblebee-nvidia virtualgl linux-headers-generic
}}}
Line 23: Line 30:
=== Basic Setup for 13.10 and later ===
You need to open your [[http://askubuntu.com/questions/38162/what-is-the-terminal|terminal]] and enter the commands below.
== Setup for 14.04 and later ==
Line 26: Line 32:
 1. Enable the [[http://askubuntu.com/questions/78613/how-do-i-enable-the-universe-repository-from-the-command-line|Universe]] and [[http://askubuntu.com/questions/89096/how-do-i-enable-the-multiverse-repository|Multiverse]] repositories - you need to do this to allow the bumblebee and nvidia packages respectively to be installed.
 2. `sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic`
You need to open your [[https://help.ubuntu.com/community/UsingTheTerminal|terminal]] and enter the commands below.

 1. Enable the [[https://help.ubuntu.com/community/Repositories/Ubuntu|Universe and Multiverse]] repositories in order to allow the bumblebee and nvidia packages to be installed.
 2. {{{
sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic
}}}
Line 30: Line 40:
=== Advanced Setups ===
For advanced users, if you do not want to use the proprietary nvidia driver
or 32-bit libraries (for example, if you are only interested in power
savings), you can do your custom installation.
== Advanced Setups ==
Line 35: Line 42:
Minimal setup :
`sudo apt-get install --no-install-recommends bumblebee`
For advanced users, if you do not want to use the proprietary nvidia driver or 32-bit libraries (for example, if you are only interested in power savings), you can do a custom installation: {{{
sudo apt-get install --no-install-recommends bumblebee
}}} Depending on your needs, also install:
 * `bumblebee-nvidia`: proprietary nvidia driver support (if installed, become default over nouveau).
 * `virtualgl`: VirtualGL as backend.
 * `virtualgl-libs-ia32`: 32bit support for VirtualGL on 64bit system, necessary to run 32bit app through optirun.
 * `primus`: primus/primusrun as backend (virtualgl Stays default, you need to run `optirun -b primus <app>`).
 * `primus-libs-ia32`: 32bit support for primus/primurun on 64bit system, necessary to run 32bit app through optirun.
Line 38: Line 51:
Depending on your needs, add to this line:
 * `bumblebee-nvidia`: proprietary nvidia driver support (if installed, become default over nouveau)
 * `virtualgl`: VirtualGL as backend
 * `virtualgl-libs-ia32`: 32bit support for VirtualGL on 64bit system, necessary to run 32bit app through optirun
 * `primus`: primus/primusrun as backend (virtualgl Stays default, you need to run `optirun -b primus <app>`)
 * `primus-libs-ia32`: 32bit support for primus/primurun on 64bit system, necessary to run 32bit app through optirun
= Usage =
Line 45: Line 53:
== Usage ==
To run your application with the discrete NVIDIA card run in the terminal:
 $ `optirun [options] <application> [application-parameters]`
To run your application with the discrete NVIDIA card run in the terminal: {{{
optirun [options] <application> [application-parameters]
}}} For example: {{{
optirun firefox
}}} For a list of options for optirun execute: {{{
optirun --help
}}} Normally you do not use optirun for your window manager, installations, or other non-graphic, resource intensive programs. The optirun command is mainly used for graphic demanding programs (ex. games).
Line 49: Line 61:
Example:
 $ `optirun firefox`
= Power Management =
Line 52: Line 63:
For a list of options for `optirun` run:
 $ `optirun --help`
A primary goal of this project is to not only enable use of the discrete GPU (dGPU) 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) to do this in Bumblebee.
Line 55: Line 65:
Normally you do '''not''' use `optirun` for your window manager, installations or other non graphic heavy demanding programs. The `optirun` command is mainly used for graphic demanding programs or for games.

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

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.
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 manual configuration required.
Line 65: Line 69:
== Troubleshooting ==
=== "Cannot access secondary GPU" error ===
In LTS 12.04.3, 13.04 and later, if your card seems to be inaccessible, i.e.
`[ERROR]Cannot access secondary GPU - error: [XORG] (EE) No devices detected.`
you need to edit the /etc/bumblebee/xorg.conf.nvidia (or /etc/bumblebee/xorg.conf.nouveau if using the noveau driver) and specify the correct BusID by following the instructions therein.
= Updating drivers =
Line 71: Line 71:
=== Error running 32-bit applications on a 64-bit system ===
If you're using a 64-bit system and 32-bit applications fail to run because ''libGL.so.1''
is not found, then your system is probably not correctly configured to use the 32-bit Mesa GL libraries.
The Bumblebee project recommends you install drivers only through APT and not drivers provided by nvidia.com directly. With that said, whenever you update your drivers through supported repositories, you need to setup the correct config values in `/etc/bumblebee/bumblebee.conf`. See also [[https://github.com/Bumblebee-Project/Bumblebee/wiki/Troubleshooting#bumblebeed-module-nvidia-is-not-found|this FAQ on github]].
Line 75: Line 73:
To fix this:
 1. Ensure that the package `libgl1-mesa-glx:i386` is installed.<<BR>>
 You can run the following command too check that: `apt-cache policy libgl1-mesa-glx:i386`
 2. Do ONE of the following:
  * Reinstall `bumblebee-nvidia` by running the following command in a terminal:
  `sudo apt-get install --reinstall bumblebee-nvidia`<<BR>>
  This is the easiest solution.
  * Or configure the system to correctly use the 32-bit Mesa GL libraries:
   1. Open a terminal and run: `sudo update-alternatives --config i386-linux-gnu_gl_conf`<<BR>>
   Something like this will be displayed:
   {{{
== Update to nvidia-319 driver ==

To update to the latest update of 319.x driver, you need to install it through apt: {{{
sudo apt-get install nvidia-319-updates nvidia-settings-319-updates
}}} Then you need to edit `/etc/bumblebee/bumblebee.conf` and set: {{{
Driver=nvidia
KernelDriver=nvidia-319-updates
LibraryPath=/usr/lib/nvidia-319-updates:/usr/lib32/nvidia-319-updates
XorgModulePath=/usr/lib/nvidia-319-updates/xorg,/usr/lib/xorg/modules
}}} by running either: {{{
optirun nvidia-settings
}}} or: {{{
optirun -b none nvidia-settings -c
}}}

= CUDA =

There is sometimes confusion about CUDA. You don't need Bumblebee to run CUDA. Follow the [[http://askubuntu.com/questions/131506/how-can-i-get-nvidia-cuda-or-opencl-working-on-a-laptop-with-nvidia-discrete-car|How-to]] to get CUDA working under Ubuntu.

There is however a new feature (--no-xorg option for optirun) in Bumblebee 3.2, which makes it possible to run CUDA / OpenCL applications that does not need the graphics rendering capabilities.

= Uninstall PPA =

If you're unsatisfied with Bumblebee, you can remove it. {{{
sudo apt-get install ppa-purge
sudo ppa-purge ppa:bumblebee/stable
}}} If you want to keep some programs from the bumblebee repository, you can also suffice by removing Bumblebee only (including its dependencies): {{{
sudo apt-get purge bumblebee
sudo apt-get --purge autoremove
}}}

= Troubleshooting =

== "Cannot access secondary GPU" error ==

In LTS 12.04.5 and later, if your card seems to be inaccessible: {{{
[ERROR]Cannot access secondary GPU - error: [XORG] (EE) No devices detected.
}}} you need to edit the /etc/bumblebee/xorg.conf.nvidia (or /etc/bumblebee/xorg.conf.nouveau if using the noveau driver) and specify the correct BusID by following the instructions therein.

== Error running 32-bit applications on a 64-bit system ==

If you're using a 64-bit system and 32-bit applications fail to run because ''libGL.so.1'' is not found, then your system is probably not correctly configured to use the 32-bit Mesa GL libraries. To fix this:
 1. Ensure that the package libgl1-mesa-glx:i386 is installed.<<BR>>
 You can run the following command to check that: {{{
apt-cache policy libgl1-mesa-glx:i386
}}}
 2. Do one of the following:
  * Reinstall bumblebee-nvidia by running the following command in a terminal: {{{
sudo apt-get install --reinstall bumblebee-nvidia
}}} This is the easiest solution.
  * Configure the system to correctly use the 32-bit Mesa GL libraries.
   1. Open a terminal and run: {{{
sudo update-alternatives --config i386-linux-gnu_gl_conf
}}} Something like this will be displayed: {{{
Line 94: Line 135:
   }}}
   2. Select the option `/usr/lib/i386-linux-gnu/mesa/ld.so.conf`<<BR>>
}}}
   2. Select the option /usr/lib/i386-linux-gnu/mesa/ld.so.conf
Line 97: Line 138:
   3. Run: `sudo ldconfig`    3. Run: {{{
sudo ldconfig
}}}
Line 99: Line 142:
== Updating drivers ==
The Bumblebee project recommends you install drivers only through APT and not drivers provided by nvidia.com directly.
This said, whenever you update your drivers through the supported repositories, you need to setup the correct config values in `/etc/bumblebee/bumblebee.conf`. See also [[https://github.com/Bumblebee-Project/Bumblebee/wiki/Troubleshooting#bumblebeed-module-nvidia-is-not-found|this FAQ on github]]
= Reporting bugs/problems =
Line 103: Line 144:
=== Example update to nvidia-319 driver ===
E.g. to update to the latest update of 319.x driver, you need to install it through apt.
First, if you have any problem, please read [[http://wiki.Bumblebee-Project.org/Troubleshooting]]. If your issue is not solved, it is recommended to join the [[http://webchat.freenode.net/?channels=#bumblebee|#bumblebee]] IRC channel to ask for help. See also
[[http://wiki.Bumblebee-Project.org/Reporting-Issues]].
Line 106: Line 147:
`sudo apt-get install nvidia-319-updates nvidia-settings-319-updates` If you're asked to create a bugreport, run the next command in a terminal: {{{
sudo bumblebee-bugreport
}}}
Line 108: Line 151:
Then you need to edit `/etc/bumblebee/bumblebee.conf` and set: = IRC =
Line 110: Line 153:
'''`Driver=nvidia`''' Please join [[http://webchat.freenode.net/?channels=#bumblebee|#bumblebee]] channel on Freenode if you wish to help testing and creating the installer.
Line 112: Line 155:
`KernelDriver=nvidia-319-updates` = Social Media =
Line 114: Line 157:
`LibraryPath=/usr/lib/nvidia-319-updates:/usr/lib32/nvidia-319-updates`

`XorgModulePath=/usr/lib/nvidia-319-updates/xorg,/usr/lib/xorg/modules`

By running `optirun nvidia-settings` (or `optirun -b none nvidia-settings -c :8`) you can assert you are using the installed kernel module and driver.

== IRC ==
Please join [[http://webchat.freenode.net/?channels=#bumblebee|#bumblebee]] channel on Freenode if you wish to help testing and creating the
installer.

== Reporting bugs/problems ==
First of all: If you have any problem, please read this article:
http://wiki.Bumblebee-Project.org/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

If you're asked to create a bugreport, run the next command in a terminal:
`sudo bumblebee-bugreport`

== Uninstall ==
If you're unsatisfied with Bumblebee, you can remove it via:
 1. `sudo apt-get install ppa-purge`
 2. `sudo ppa-purge ppa:bumblebee/stable`
If you want to keep some programs from the bumblebee repository, you can also suffice by removing Bumblebee only (including its dependencies):
 1. `sudo apt-get purge bumblebee`
 2. `sudo apt-get --purge autoremove`

== Social Media ==
Line 144: Line 158:

== CUDA ==
There is sometimes confusion about CUDA. You don't need Bumblebee to run CUDA.
Follow the [[http://askubuntu.com/questions/131506/how-can-i-get-nvidia-cuda-or-opencl-working-on-a-laptop-with-nvidia-discrete-car|How-to]] to get CUDA working under Ubuntu.

There is however a new feature (--no-xorg option for optirun) in Bumblebee 3.2, which makes it possible to run CUDA / OpenCL applications that does not need the graphics rendering capabilities.

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. Bumblebee is officially supported by Ubuntu in 14.04 newer. However, all releases are supported by the Bumblebee Project community from Ubuntu version 12.04 up to 14.04.

Installation

Setup for 12.04

You need to open your terminal and enter the commands below.

If on 12.04.5, replace linux-headers-generic with linux-headers-generic-lts-trusty.

  1. Enable the Universe and Multiverse repositories in order to allow the bumblebee and nvidia packages to be installed.

  2.  sudo add-apt-repository ppa:bumblebee/stable
  3. sudo apt-get update
  4. Install Bumblebee using the default proprietary nvidia driver for 12.04:

    sudo apt-get install bumblebee bumblebee-nvidia virtualgl linux-headers-generic
  5. Reboot

Setup for 14.04 and later

You need to open your terminal and enter the commands below.

  1. Enable the Universe and Multiverse repositories in order to allow the bumblebee and nvidia packages to be installed.

  2. sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic
  3. Reboot

Advanced Setups

For advanced users, if you do not want to use the proprietary nvidia driver or 32-bit libraries (for example, if you are only interested in power savings), you can do a custom installation:

sudo apt-get install --no-install-recommends bumblebee

Depending on your needs, also install:

  • bumblebee-nvidia: proprietary nvidia driver support (if installed, become default over nouveau).

  • virtualgl: VirtualGL as backend.

  • virtualgl-libs-ia32: 32bit support for VirtualGL on 64bit system, necessary to run 32bit app through optirun.

  • primus: primus/primusrun as backend (virtualgl Stays default, you need to run optirun -b primus <app>).

  • primus-libs-ia32: 32bit support for primus/primurun on 64bit system, necessary to run 32bit app through optirun.

Usage

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

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

For example:

optirun firefox

For a list of options for optirun execute:

optirun --help

Normally you do not use optirun for your window manager, installations, or other non-graphic, resource intensive programs. The optirun command is mainly used for graphic demanding programs (ex. games).

Power Management

A primary goal of this project is to not only enable use of the discrete GPU (dGPU) 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) to do this in Bumblebee.

Since Bumblebee 3.0, this feature is enabled by default, using bbswitch. This allow automatic power management, without any manual configuration required.

If Power Management doesn't work on your laptop, please go to this Power Management (PM) page and help to improve Bumblebee.

Updating drivers

The Bumblebee project recommends you install drivers only through APT and not drivers provided by nvidia.com directly. With that said, whenever you update your drivers through supported repositories, you need to setup the correct config values in /etc/bumblebee/bumblebee.conf. See also this FAQ on github.

Update to nvidia-319 driver

To update to the latest update of 319.x driver, you need to install it through apt:

sudo apt-get install nvidia-319-updates nvidia-settings-319-updates

Then you need to edit /etc/bumblebee/bumblebee.conf and set:

Driver=nvidia
KernelDriver=nvidia-319-updates
LibraryPath=/usr/lib/nvidia-319-updates:/usr/lib32/nvidia-319-updates
XorgModulePath=/usr/lib/nvidia-319-updates/xorg,/usr/lib/xorg/modules

by running either:

optirun nvidia-settings

or:

optirun -b none nvidia-settings -c

CUDA

There is sometimes confusion about CUDA. You don't need Bumblebee to run CUDA. Follow the How-to to get CUDA working under Ubuntu.

There is however a new feature (--no-xorg option for optirun) in Bumblebee 3.2, which makes it possible to run CUDA / OpenCL applications that does not need the graphics rendering capabilities.

Uninstall PPA

If you're unsatisfied with Bumblebee, you can remove it.

sudo apt-get install ppa-purge
sudo ppa-purge ppa:bumblebee/stable

If you want to keep some programs from the bumblebee repository, you can also suffice by removing Bumblebee only (including its dependencies):

sudo apt-get purge bumblebee
sudo apt-get --purge autoremove

Troubleshooting

"Cannot access secondary GPU" error

In LTS 12.04.5 and later, if your card seems to be inaccessible:

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

you need to edit the /etc/bumblebee/xorg.conf.nvidia (or /etc/bumblebee/xorg.conf.nouveau if using the noveau driver) and specify the correct BusID by following the instructions therein.

Error running 32-bit applications on a 64-bit system

If you're using a 64-bit system and 32-bit applications fail to run because libGL.so.1 is not found, then your system is probably not correctly configured to use the 32-bit Mesa GL libraries. To fix this:

  1. Ensure that the package libgl1-mesa-glx:i386 is installed.
    You can run the following command to check that:

    apt-cache policy libgl1-mesa-glx:i386
  2. Do one of the following:
    • Reinstall bumblebee-nvidia by running the following command in a terminal:

      sudo apt-get install --reinstall bumblebee-nvidia
      This is the easiest solution.
    • Configure the system to correctly use the 32-bit Mesa GL libraries.
      1. Open a terminal and run:

        sudo update-alternatives --config i386-linux-gnu_gl_conf

        Something like this will be displayed:

          Selection    Path                                      Priority   Status
        ------------------------------------------------------------
        * 0            /usr/lib/nvidia-331/alt_ld.so.conf         8604      auto mode
          1            /usr/lib/i386-linux-gnu/mesa/ld.so.conf    500       manual mode
          2            /usr/lib/nvidia-331-prime/alt_ld.so.conf   8603      manual mode
          3            /usr/lib/nvidia-331/alt_ld.so.conf         8604      manual mode
        
        Press enter to keep the current choice[*], or type selection number:
      2. Select the option /usr/lib/i386-linux-gnu/mesa/ld.so.conf

        In the above case, you would enter 1.

      3. Run:

        sudo ldconfig

Reporting bugs/problems

First, if you have any problem, please read http://wiki.Bumblebee-Project.org/Troubleshooting. If your issue is not solved, it is recommended to join the #bumblebee IRC channel to ask for help. See also http://wiki.Bumblebee-Project.org/Reporting-Issues.

If you're asked to create a bugreport, run the next command in a terminal:

sudo bumblebee-bugreport

IRC

Please join #bumblebee channel on Freenode if you wish to help testing and creating the installer.

Social Media

Follow us on: Facebook, Twitter and Google+.


CategoryHardware

Bumblebee (last edited 2015-05-03 11:04:05 by penalvch)