Skip to content

Bumblebee for NVIDIA Optimus (older systems)

This is candidate for removal, as of only needed for devices already gone legacy for long times.

Introduction

For some older Optimus hardware it is still useful to have bumblebee to handle switching between discrete and integrated GPU.

On newer Nvidia Optimus systems it is recommended to take optimus-manager, optimus-switch, or render-offload.

Some computers may need BIOS adjustments before Bumblebee installation.  See the Two BIOS types section.

Bumblebee installation and removal are simple and straightforward processes.  See Installation and Remove Bumblebee sections.

The text speaks about a fresh Bumblebee installation.  It is also a repairing tool.  If Bumblebee is already installed but you’re unsure about its state, simply install Bumblebee again.  It does not hurt a system in any way.

Bumblebee’s power-saving feature was missing in the mid of 2015.  See Missing power-off section.

Do I have an Optimus card?

First things first.  An excerpt from Bumblebee Project Wiki  Troubleshooting section:

Only laptops have these kinds of Nvidia Optimus card, so this project won’t apply to desktops (for now).  Cards from the 4xxM and newer series are all Optimus-enabled. The M stands for “Mobile”. But having a 4xxM card isn’t enough to be sure that you’re having an Optimus laptop. There must also be an integrated video controller in your processor. To check that, run this command in a terminal:

lspci -vnn | grep '\''[030[02]\]'

If it outputs two lines, then you’re likely to have an Optimus laptop.  Else…

…this article is of no help for your card.

On NVIDIA Optimus two output lines look like this:

00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 09) (prog-if 00 [VGA controller])

and

01:00.0 3D controller [0302]: NVIDIA Corporation GK107M [GeForce GT 750M] [10de:0fe4] (rev ff) (prog-if ff)

The first line starts with 00:02.0.  It corresponds to Intel GPU.

The second line starts with 01:00.0.  It corresponds to Nvidia GPU.

Your Intel and Nvidia make and model will obviously be different from this example.

Take note of your Nvidia model because the driver version you install will depend on it

(see the section, Do I Have Legacy or Current Hardware?).

Two BIOS types

For the purpose of this guide let’s distinguish two BIOS types:

  1. BIOS doesn’t control video card and doesn’t mention it
  2. BIOS tries to control integrated and/or discrete video cards

1st type BIOS is the most Bumblebee-friendly.  It doesn’t require to enter BIOS Setup utility, to configure or change anything in BIOS.  Just boot the computer normally and, if possible, make sure it runs on xf86-video-intel video driver.  It should be so by default.  Nothing else is required.

2nd type of BIOS is less Bumblebee-friendly.  It requires entering the BIOS Setup utility and make some adjustments within it.  Before and after Bumblebee installation.  All BIOS changes in the guide refer only to the 2nd BIOS type.  Make sure the computer runs on xf86-video-intel.

Briefly.  Bumblebee installation on:

  1. 1st type BIOS doesn’t require any change in BIOS setup
  2. 2nd type BIOS may require some changes in BIOS setup before and after Bmb installation

Manual Installation

see: nvidia-installer-dkms for instructions on how to install bumblebee automatic

Disable and remove Nouveau

Edit 2017-07-14:  Intel + Nouveau combination is deprecated.  It is not supported by Bumblebee anymore.  Intel + Nouveau support can be dropped from Bumblebee at any time.  Bumblebee supports Intel + Nvidia combination only.

Nouveau video driver causes many troubles on NVIDIA Optimus cards.  Unbootable system, crashes during boot, a system that boots into unresponsive black screen with a white text cursor blinking in the top left corner, Cnchi and LiveDE freezes are only a few of Nouveau effects.

If you don’t experience any of these issues, you may safely skip this section.  Otherwise, keep reading on.

Three steps are needed to remove Nouveau.

1. Disable it during a boot from LiveMedia, to be able to start LiveDE with Calamares and complete the installation

2. Disable it on the first boot of the installed system, to be able to reach the graphical DE

3. Physical Nouveau package uninstallation on the first boot; the system will use Intel GPU on subsequent boots until Bumblebee installation

Steps in detail.

1. Use the default LiveMedia boot menu option.  Edit the boot line and add to it the following parameter:

modprobe.blacklist=nouveau

Continue to boot normally.

2. Disable Nouveau on the first boot of the installed system, exactly the same way as in the previous step.

3. Once you’ve reached the graphical DE, open the terminal and run the following command, to remove Nouveau completely:

sudo pacman -Rc xf86-video-nouveau

It is a common mistake to use nouveau.modeset=0 parameter in an attempt to exclude Nouveau. The parameter only shifts the responsibility for setting up the graphical mode from Xorg to the kernel. It doesn’t prevent the nouveau module from being loaded and used.

Install EndeavourOS without Nvidia drivers

Doing a fresh EndeavourOS installation, make sure to not install proprietary Nvidia drivers.  The option installs drivers for single-GPU, non-hybrid video cards, with NVIDIA GPU only.  It does not install drivers for double-GPU, hybrid video cards with NVIDIA, and Intel GPUs.

Do not choose to install NVidia at the package/DE selection page!!

Failing to do so will result in an unbootable NVIDIA Optimus system.

With Graphic drivers (Proprietary) not installed EndeavourOS will install Intel drivers only and make use of the nouveau driver shipped with the kernel (modesetting driver)

By default, Nvidia GPU is never active, or switched on, in Optimus computers with the 1st type BIOS. Nvidia GPU remains unused and switched off until it is activated by proprietary Nvidia or by free Nouveau drivers.

Bumblebee switches Nvidia GPU ON and OFF automatically, whichever is needed.

Disable Optimus, 2nd type BIOS only

The owners of the 1st type of BIOS may safely skip this section.

After the installation has been completed reboot your system, and enter the BIOS configuration utility. Most Nvidia Optimus cards run alongside Intel integrated graphics. Find your display settings, and select “Intel Integrated”, or something similar – just make sure that Optimus and Discrete are not enabled.  Also, make sure that the setting below it, the “Detection by OS” setting is disabled. After this step has been completed, you may reboot, and enter your new install of EndeavourOS.

Enable [multilib] repo

The repo is already enabled by default in recent EndeavourOS releases.  If you install on native Arch Linux, Arcolinux, or other systems which use unmodified Arch repos, then edit the /etc/pacman.conf file and uncomment the repo.

Fully upgrade the system

yay -Syua

Install Bumblebee

On modern hardware, with current drivers:

sudo pacman -S bumblebee mesa xf86-video-intel nvidia lib32-nvidia-utils lib32-virtualgl nvidia-settings bbswitch

On older hardware, with 390xx legacy drivers:

yay -S --needed bumblebee mesa xf86-video-intel nvidia-390xx nvidia-390xx-utils lib32-nvidia-390xx-utils lib32-virtualgl bbswitch

On even older hardware, with 340xx legacy drivers:

yay -S --needed bumblebee mesa xf86-video-intel nvidia-340xx nvidia-340xx-utils lib32-nvidia-340xx-utils lib32-virtualgl bbswitch

Add yourself to bumblebee group

Any user that is supposed to use Bumblebee must be added to this group.  The user must also be a member of the video group – it is usually so by default, but not always.

sudo gpasswd -a $USER bumblebee

sudo gpasswd -a $USER video

Enable bumblebeed service

Notice the final d (from daemon) letter in the service’s name.  The step may be skipped if the next step will be executed.

sudo systemctl enable bumblebeed.service

Reboot the system

sudo shutdown -r now

Enable Optimus, 2nd type BIOS only

The owners of the 1st type of BIOS may safely skip this section.

Startup your computer, and once again, enter your BIOS utility configuration. Find the Display configuration and change it from “integrated graphics” to “Optimus”. Leave the “Detected by OS” in the “Disabled” position.

Missing power off

Edit 2016.07:  Somewhere in 2016.06 the issue has been solved upstream.  If you install after this date, most probably the problem will not be present.  Check it with the test described here.  There’s no need to install the patch.

Most time NVIDIA Optimus cards run on Intel GPU.  It is done for power saving.  Nvidia GPU is used only when explicitly instructed to do so – by placing the optirun command in front of the program’s name.  When optirun exits it should immediately switch Nvidia GPU off and turn back to Intel GPU. It does not happen recently. Nvidia is not switched off.  The system continues to run on Nvidia.

There’s no power saving, computer becomes overheated, cooling fans are constantly spinning at max speed. Technically speaking, the issue is caused by the fact that nvidia_drmnvidia_modeset and nvidia modules are not unloaded upon optirun termination.

When the system runs on Intel GPU, three modules are not used and are not loaded.  All are loaded only when optirun starts running.  And should be unloaded on optirun termination.  Which doesn’t happen.

Check if your system is affected by the issue.  After startup open a terminal and run three commands, one after another:

optirun --status

Bumblebee status: Ready (3.2.1). X inactive. Discrete video card is off.

optirun pwd ~/

optirun --status

Bumblebee status: Ready (3.2.1). X inactive. Discrete video card is off.

If after the last (third) command the Discrete video card is off, like in the example above, then the system is not affected by the issue.  You may skip this section.

If after the last (third) command the Discrete video card is on, then the system is affected by the issue.  You may wish to solve it, either manually or automatically.  Below is described how to do it.

Turning Off Nvidia Manually

First, let’s try to shut down Nvidia by hand.  To be sure that we’re facing the issue described here; three modules must be listed exactly in the same order as in this example:

sudo rmmod nvidia_drm nvidia_modeset nvidia

sudo tee <<<OFF /proc/acpi/bbswitch

The first command forces three modules to be unloaded.  The second one switches Nvidia GPU off.  Check Nvidia status again:

optirun --status

Bumblebee status: Ready (3.2.1). X inactive. Discrete video card is off

Let’s run a bit more complicated test.  It will switch Nvidia on and then back off, in one command:

optirun pwd && sleep 1 && sudo rmmod nvidia_drm nvidia_modeset nvidia && sudo tee <<<OFF /proc/acpi/bbswitch

This method may be used to switch Nvidia off by hand.  

Turning Off Nvidia Automatically

The method to solve the issue automatically was discussed in Arch Linux bug-tracker here.  It applies the same two commands seen in the previous section.

The advantage of the method is that there’s no need to enter any command by hand in the terminal, with elevated privileges.  Optirun turns to work normally, as usual, automatically switching Nvidia ON and OFF when it starts and exits.

The disadvantage is that you’ll need to install a “homemade” package, unknown to regular Arch repos.

Download the file and install it normally with pacman, like any other package:

sudo pacman -U /path/to/package/bumblebee-3.2.1-11-x86_64.pkg.tar.xz

The package has no dependencies.  During installation, it will issue three informational messages.  They may be safely ignored.

With the package installed, pacman and pamac will issue the warning on subsequent system upgrades.  It may be safely ignored as well:

warning: bumblebee: local (3.2.1-11) is newer than community (3.2.1-10)

Important.  Once the package is installed, the computer must be rebooted.  A simple logout-login is not enough.

Fine tuning NVIDIA Optimus settings

It is possible to fine-tune NVIDIA settings, by running the nvidia-settings utility on NVIDIA GPU

optirun -b none nvidia-settings -c :8

nvidia-x-server-settings

The command is the only correct way to execute nvidia-settings on Optimus computers. Any attempt to run nvidia-settings utility with a different syntax will fail.

Adjust menu to run NVIDIA settings

Once Bumblebee and proprietary NVIDIA drivers are installed, the menu entry to launch nvidia-settings utility is automatically created.  It is called NVIDIA X Server Settings in the menu.

This menu entry is wrong for NVIDIA Optimus.

The menu is not configured correctly right after the installation.  It executes the simple nvidia-settings command.

If you select NVIDIA X Server Settings menu entry with the default content (command), you will be advised to run nvidia-xconfig utility, to fix the problem.  Never do that.  The problem does not exist.  See the Warning section below for more info.

If you want to run NVIDIA X Server Settings from menu, you have to edit the menu entry by hand, and replace the default incorrect command with the correct one.

From:

/usr/bin/nvidia-settings

To:

optirun -b none nvidia-settings -c :8

Warning

There’s nvidia-xconfig utility, installed with Bumblebee among NVIDIA tools. 

Never run it on Optimus computers. 

It was designed for and works correctly on single-GPU NVIDIA cards only.  It doesn’t detect hybrid NVIDIA Optimus cards. It’s a perfect Bumblebee killer.  If executed, it immediately breaks Bumblebee configuration.  

Known Issues

GeForce GTX 960M

When rebooting your computer might not start again. To solve that issue add acpi_osi=”!Windows 2015″ as a kernel parameter. See issue #764(comment) on github.

To make that change permanent in grub add in /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=\"!Windows 2015\""

 and create grub config after with the command

sudo grub-mkconfig -o /boot/grub/grub.cfg

Cards used

The article was written and is being continuosly tested on three Nvidia Optimus video cards:

It was not tested on recent Optimus cards, like GeForce GTX 10-Series Notebooks.  There are reports about successful Bumblebee installation on modern GeForce Optimus, though they still may present some problems which are not covered here.

The article was written and tested on PC laptops only.  It was never tested on Mac hardware.  It may or may not work on Mac computers.

The guide was successfully applied also on the following cards.

Uninstall Bumblebee

Bumblebee and proprietary Nvidia driver may be removed from Arch and EndeavourOS.Stop running bumblebee service:

sudo systemctl stop bumblebeed

Disable bumblebee service from being started on subsequent boot-ups:

sudo systemctl disable bumblebeed

Delete all users from bumblebee group. If only the current user was added to it, he may be removed with

sudo gpasswd --delete $USER bumblebee

When all users have been removed from bumblebee group, the group may be deleted

sudo groupdel bumblebee

Remove all packages that were installed for Bumblebee and Nvidia, and their dependencies

sudo pacman -Rcnsu bumblebee nvidia lib32-nvidia-utils lib32-virtualgl nvidia-settings bbswitch --noconfirm

(Optional) Re-install xf86-video-intel driver without unneeded Bumblebee dependencies

sudo pacman -Syu xf86-video-intel --noconfirm

Regenrate initramfs running Dracut (default on EndeavourOS):

With systemd-boot in use:

sudo reinstall-kernels

Running Grub as Bootloader:

sudo dracut-rebuild

(Regenerate initramfs (if using mkinitcpio)

sudo mkinitcpio --preset linux

Shutdown the system

sudo shutdown -h now

Done

All Nvidia entries: https://discovery.endeavouros.com/?s=nvidia

Bumblebee for NVIDIA Optimus (older systems)

  • by