• Bumblebee 5/6: No power saving

    Hi all,

    Practical fixes continue. Differently from described in previous posts easy-to-solve minor issues, missing power saving is a very serious bug. While those were solved in one day, this one took a week to be fixed.

    The bug consists in some incongruence between kernels 3.19 and above, on one side, and Bumblebee software on another side. It demonstrate itself when a program, executed with optirun, terminates and optirun exits.

    Under normal circumstances upon exit from optirun bbswitch switches Nvidia GPU power OFF. It prevents computer from high power consumption, Nvidia card and overall computer overheating, craizily and constantly spinning cooler fans which roar like an F-14 taking off with all afterburners at max, etc. In other words, Bumblebee works exactly like Nvidia Prime.

    With Nvidia GPU OFF computer runs on Intel GPU, remains cold and silent, consumes almost no energy.

    Tecnically speaking, the bug is caused by the fact that nvidia_modeset and nvidia modules are not unloaded upon optirun termination. When the system runs on Intel GPU two modules are not used and are not loaded. Both are loaded only when optirun starts running. And should be unloaded on optirun termination. Which doesn’t happen with this bug.

    On boot Nvidia GPU is correcctly switched OFF. It remains always OFF until any command is executed with optirun. Once the command terminates, Nvidia remains ON. Troubles start here.

    Check if you are affected by this bug.

    1. Boot the system

    2. Run the command

      optirun --status

      It will output

      Bumblebee status: Ready (3.2.1). X inactive. Discrete video card is off.
    3. Run a simple command with optirun now:

      optirun pwd

      It will print your current working directory

    4. Now, check Nvidia card status again:

      optirun --status

      If it outputs again

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

      then you aren’t affected by the bug. You may safely ignore this post.

      If it outputs

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

      then the system is affected by the bug. This post describes how to fix it.

    Manual test.

    If Nvidia remains ON, as the first thing we’ll check that it my be switched OFF by hand. Run two commands in terrminal:

    sudo rmmod nvidia_modeset nvidia
    sudo tee <<<OFF /proc/acpi/bbswitch

    The first command forces two modules unload. The second one switches Nvidia OFF. Check Nvidia status again:

    optirun --status

    It it outputs

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

    then Nvidia has been successfully switched OFF by hand and you may apply the patch (below).

    Let’s verify that switching Nvidia OFF really works, by running the command:

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

    Check Nvidia status. If the card is OFF, we are ready to apply the patch.

    Power saving patch.

    I made a package that fixes the bug. Its advantage consists in switching Nvidia OFF automatically, upon optirun termination. There’s no need to perform any manual operations, with root privileges. Optirun turns to work normally, as in the past. Bbswitch turns Nvidia OFF immediately on optirun termination.

    The package is ready to be installed with pacman. I’m not practical with building and making packages, so this one has no corresponding signature, and probably misses other things. But I’ve installed it here without a problem 36 times, it never failed, works flawlessly.

    If you prefer to avoid using homemade packages, it is always possible to switch Nvidia OFF by hand, as described above.

    The package is named bumblebee-3.2.1-11-x86_64.pkg.tar.xz. The forum’s upload mechanism adds in front of the name a long numeric sequence, like 1456775675942-. So the name of the downloaded file will be 1456775675942-bumblebee-3.2.1-11-x86_64.pkg.tar.xz. You may cut the initial numbers by renaming the file, or use it as is. It makes no difference.

    Don’t look for the file in Internet, I’m attaching it here for the first time. It was not uploaded by me elsewhere.

    Patch 2016.03: bumblebee-3.2.1-11-x86_64.pkg.tar.xz
    Patch 2016.04: bumblebee-3.2.1-11-x86_64.pkg.tar.xz

    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 information messages. They may be safely ignored.

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

    Once installed, the patch will upgrade the current bumblebee package from 3.2.1-10 to 3.2.1-11. The former is from official repos. The latter was made here and is unknown to Arch. So on every subsequent upgrade pacman will issue the warning

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

    It may be safely ignored. I have no idea, what will happen when - and if - the official bumblebee package will get the same or higher version number. Only Gandalf knows the answer.


    Fixes for users with existing Bumblebee installation are finished here. If you’ve applied the fixes from previous posts and this one, then after reboot you’ll get a perfectly working shiny Bumblebee, running with the latest proprietary Nvidia 361.28-1 drivers.

    In the next - and last - post I’ll very synthetically describe how to install Bumblebee from scratch, on a system where it was never installed before. As a side effect, it will help to repair an existing broken Bumblebee installation.

    Good luck.

  • Which previous posts?

nvidia166 optimus26 optirun6 bbswitch2 Posts 3Views 1517
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.