Tuesday, October 8, 2013

openSUSE 13.1: install 'bumblebee' and disable discrete graphics adapter on NVIDIA Optimus laptop

As far as I know, the following should still work in openSUSE 13.2 -- can anyone confirm or deny?

My scenario: I am running openSUSE 13.1 on an Optimus laptop and would like to be able to turn the discrete graphics adapter on and off. Either (a) I have a clean install of openSUSE 13.1 or (b) I have already done things like install bumblebee, NVIDIA drivers, etc. in the past.

N.B.: These notes apply to my Dell Latitude E6430 laptop.

If I am in group (b), I will need to get rid of the old setup. If I have a clean install of 13.1, this part is not necessary.
  1. Make sure that I am running openSUSE 13.1
    $ cat /etc/SuSE-release
  2. Make sure that my system is fully updated
    # zypper ref
    # zypper up
  3. Reboot to make sure I'm running the latest standard kernel
  4. While rebooting, make sure Optimus is *enabled* in the laptop's BIOS setting
  5. Get rid of all NVIDIA-related packages:
    # zypper se nvidia
    # zypper rm ...
  6. Get rid of bumblebee, primus, dkms, dkms-nvidia, dkms-bbswitch:
    # zypper rm bumblebee primus dkms dkms-nvidia dkms-bbswitch
  7. Delete all mentions of nvidia in /etc/sysconfig/kernel
  8. Delete Overman79 repository (and thank Overman79 for the good work!)
    # rm /etc/zypp/repos.d/Overman79.repo
    # zypper ref
  9. Make sure xf86-video-intel package is installed
    zypper if xf86-video-intel
  10. Rebuild the initrd
    # mkinitrd
  11. reboot and pray

After the system comes back up in its pristine state (without possibility to influence the discrete adapter), I may want to check how much power the system is drawing. For this, I install powertop.

  • Install 'powertop' package and note power consumption (must be on battery for power consumption to be shown)
    # zypper in powertop
    # powertop

To actually install bumblebee, I refer to the up-to-date instructions at openSUSE wiki SDB:NVIDIA Bumblebee page.

  • If I don't plan to use the NVIDIA discrete graphics adapter at all (i.e., I want to run the Intel driver 100% of the time), I can safely ignore the "Install NVIDIA Driver" section. Bumblebee will use the nouveau driver for its own internal purposes.

Thanks to Scarabeus and the rest of the openSUSE team for bringing bumblebee into the official distro, and thanks to Overman79 for maintaining all the bumblebee-related packages in his home repository before that!

Once I have the system back up with bumblebee installed, I can verify its status and that of the discrete graphics adapter like so:

  1. When the system comes back, log in as my normal user and verify that I am still in the bumblebee group:
    $ groups
    users wheel dialout video vboxusers bumblebee
    This should not be a problem anymore, but if "bumblebee" is not shown, I will have to add it again, log out, and then log back in
  2. Follow the instructions in the "Verify installation" section of the openSUSE wiki SDB:NVIDIA Bumblebee page
  3. As root, check that the following commands produce the output shown:
    # ls /proc/acpi/bbswitch
    # cat /proc/acpi/bbswitch
    0000:01:00.0 OFF
    # systemctl status bumblebeed
    bumblebeed.service - Bumblebee C Daemon
       Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled)
       Active: active (running) since Fri 2014-06-04 11:09:27 CET; 7min ago
     Main PID: 1390 (bumblebeed)
       CGroup: /system.slice/bumblebeed.service
               └─1390 /usr/sbin/bumblebeed
    Jun 04 11:09:27 wilbur systemd[1]: Started Bumblebee C Daemon.
    Jun 04 11:09:28 wilbur bumblebeed[1390]: [   39.375112] [INFO]/usr/sbin/bumblebeed 3.2.1 started
  4. While on battery, verify power consumption using 'powertop' again -- in my case, it was 12 - 16W compared to 25W before performing these steps. This translates into a 10-degree (Celsius) reduction in running temperature and, of course, much longer battery life
The results are more than satisfying.


  1. Hi! Thanks for the info! I tried to install bumblebee on 13.1 adapting your instructions from 12.3 just do find out that I don't have to do anything! I just completely reinstalled my system with 13.1 RC1 and xf86-video-intel as well as xf-video-nv were installed automatically.

    Is there a way to confirm that the nvidia card is off? The energyconsumption reading from powertop seems a little high :(


    1. My laptop has an indicator LED that goes orange when using the NVidia GPU and blue when using the Intel GPU. You do need these instructions, though... Having Nouveau and the Intel GPU drivers installed is not enough. You need Bumblebee.

    2. Try this:
      # lspci|grep VGA

      If the state of NVIDIA card is ff, the card is off.

  2. Yeah, sorry -- temperature is elevated on my 13.1 system, too, though not as high as it goes when bumblebee turns the discrete graphics card on. I will be revising this page in the near future -- unfortunately. Looks like will have to revert to the old method of installing nouveau, bumblebee, and bbswitch and telling bbswitch to keep the discrete card off at all times.

    The only problem with this is that after a few sleep/resume cycles the temperature goes up and I have to reboot to get it back down again.

  3. I went ahead and installed bumblebee the old fashioned way. I added myself to the bumblebee and video group, then added overman79's Factory repo:
    and did a

    # zypper in dkms dkms-nvidia dkms-bbswitch bumblebee primus x11-video-nvidia
    # systemctl enable dkms
    # systemctl enable bumblebeed

    Without further doing, my energyconsumption dropped from 21W to 15W !!

    After that I still blacklisted nvidia, but it did not have any effect on the powerconsumption anymore.


    1. Martin, you're a genius! Your method worked like a charm, and my results are similar to yours. Now I'll be curious to see how resistant it is to sleep/resume cycles. . .

    2. Thanks, although "genius" is a little overrated, after all I based it on your openSuse 12.3 post... I am a little sad that Kernel 3.12 doesn't make it into openSuse 13.1. It seems that's the kernel we Optimus victims are waiting for. Once 13.1 is released I'll definitely try to update the kernel to see what my graphic cards do. Waiting another 8 months for openSuse 13.2 seems kind of hard with kernel 3.12 released in about a month. I'll keep reporting, maybe we can find a way together.


    3. some nvidia card have a lot of problem with nouveau driver and 3.12 don't fix anything...
      on nvc1 driver i can't suspend, some other can't boot...

  4. This works great!!!! been dying to get this working on my Lenovo T430....thanks!!!

    1. Hi
      I have Lenovo T430 and I could install bumblebee successfully. Thanks to this great tutorial.
      But the problem is I can't use Nvidia configuration. I need to configure another screen by mini-D port. But unfortunately I couldn't find a way to install the Nvidia driver successfully. I appreciate if you help me on this.

    2. Newst Mesa drivers partialy solve this problem. To install add repo X11:Xorg and update all files from there (switch packets). if you use KDE you must change renderer from OpenGL to Xrender (in Desktop Effects). Maybe you must install newer kernel (as decribed below).

  5. In my Lenovo W530 with open suse 13.1 RC1, works perfect.


  6. The kernel is dead, long live the kernel!!!! Graphic Switching Works with kernel 3.12!!!

    After 3 years of shortened battery life, shady hacks and a lot of anger, the day has come that Linux supports my Notebook with Optimus Graphics!

    Since yesterday kernel 3.12 was officially released and I couldn't resist to wait until it shows up in the standard repos. So today I went ahead and added the Kernel HEAD repo (also known as the Kernel Of The Day repo) and installed kernel-default-3.12.0-1.1 on my fresh oS 13.1 RC2 install.

    And here it comes:
    Power consumption (powertop) Kernel 3.11.6-1.1 --> 20.5 W
    Power consumption (powertop) after restart with Kernel 3.12.0-1.1 --> 14.1 W !!!!!!!!!!!!!!!!!!!!!!!!

    Install info:

    1. Add Kernel HEAD repo, refresh and set repo priority to 100 to prevent future automatic updates:
    sudo zypper ar http://download.opensuse.org/repositories/Kernel:/HEAD/standard KOTD

    sudo zypper ref

    sudo zypper mr -p 100 KOTD

    2. Install Kernel from KOTD repo
    sudo zypper in -r KOTD kernel-default

    3. restart and be amazed

    1. did you install bumblebee? i installed kernel 3.12 like you and it doesnt get overheat, but i want to use the nvidia card to play somegames.

    2. I've followed your instructions, but used latest stable 3.12.2 kernel, rather than KOTD. My laptop's power consumption is now 9 to 15W.

      Thank you kindly, sir, much, much appreciated.

    3. Is there a way to test that it really works? I'm currently running 3.12.7. I don't remember the exact power consumption I used to have in 12.3 but the cooling fans do seem to make more noise now...

  7. Unfortunately, the kernel modules are not being built, so bumblebee even does not work at all :(

    1. Remove the dkms-nvidia and dkms-bbswitch packages (zypper rm dkms-nvidia dkms-bbswitch)

      Then install them again (zypper in dkms-nvidia dkms-bumblebee)

  8. Thanks a lot, after try several distros like debian wheezy and sid, ubuntu 13 and 14 , finally got my new laptop working perfectly with opensuse and the tips from this blog. Great job.

    Lenovo y410p with onboard intel 4600 and dedicated nvidia GT 750M ( 2G ) .

    OpenSuse 13.1

    Running OpenSuse 13.1

  9. It's work on my T430 and power consumption is about 12-15W..that's great but how do i enable or switch to my NVIDIA graphics card?

    1. Here I use :


    2. ** Logged with the userid you added to bumblebee and video groups.

  10. Thank you kindly, sir Smithfarm for sharing this information with us. I have installed kernel 3.12.2 (the stable one) and can confirm that power-saving functions work just fine - 9 - 15W consumption with intel hd 3000 and nvidia 540m.

  11. Hi, I have dell 7537 with Intel Haswell and Nvidia Geforce Gt 750M, how much chance I have to run Opensuse 13.1 on my laptop using both Intell and Nvidia?
    Will be noisy my laptop ?
    Will drain my battery more offen ?

  12. Doesn't work at this time: kmod-compat dependency breaks it up. :(

    1. Same here:

      Problem: bumblebee-3.2.1-15.1.x86_64 requires kmod-compat, but this requirement cannot be provided
      uninstallable providers: kmod-compat-14-2.1.2.i586[download.opensuse.org-oss]

    2. Mikhail and Mark: Thanks for your posts. Please note: I currently have version 3.2.1-14.11 of the bumblebee package installed. 'rpm -qR bumblebee' shows no dependency on kmod-compat, and indeed on my system kmod-compat is not installed. Suggest you try downgrading bumblebee to 3.2.1-14.11.

    3. Hi, I have also the problem with kmod-compat. Unfortunately the older version is not available anymore in the repo. Any ideas?

    4. Fixed that!
      Add Overman79's repository:

      # zypper ar http://download.opensuse.org/repositories/home:/Overman79:/Laptop/openSUSE_Factory/ Overman79

      substitute "openSUSE_Factory" to openSUSE_13.1 and you'll be just fine.
      Have a nice time!

    5. Thanks it helped :)

      Btw. have you tested the 3.12 kernel that it supposed to handle graphic switching automatically? I upgraded to 3.12 right after I installed OpenSuse 13.1 but for other reasons (my laptop didn't work at all with 3.11) and I didn't know about this new feature. However I'm not sure whether it worked at all because the cooling fans were definitely noisier than in 12.3 with bbswitch. Now I have successfully installed bbswitch in 13.1 and the cooling fans seem to be back to normal although it is still too soon to be tell (right now it is quite cold in my room :D). The power consumption is around 14W.

      One last question (sorry to bother): I've just read the article to the very end and you claim that it is necessary to repeat the last several steps every time I use zypper up. But I never do that, I just let OpenSuse handle updates through the update applet. Does it mean that I don't have to worry about it?

    6. Ahoj Tobiáši,

      RE: kernel 3.12 - no, I have not tested it but others have reported (in the comments on this page) that it works for them.

      RE: zypper up - I do not use the update applet, so I can't comment on that. When I run "zypper up", for some unknown reason every time it happens that the "bumblebee" group disappears. So I have to restore it manually, add my user to it, then log out the user and log back in. I do not have to repeat steps 7 through 11 anymore - going to fix that right now. Thanks for the reminder.

    7. But is the bumblebee group necessary even if I don't use the discrete card at all? I just want it to stay switched off and that is managed by the bumblebee module (or deamon) that naturally runs with root privileges. Or am I wrong?

    8. Mikhail: changed repository to openSUSE_13.1. Thanks!

    9. Tobias: AFAIK the bumblebee daemon (bumblebeed.service) will refuse to start if the 'bumblebee' group doesn't exist. If I'm wrong, please post a working set of steps that does not require the bumblebee group, and I will be happy to test.

    10. bumblebee group is created when installing the package, thus its deletion would be rather strange.
      However you don't need to add any users to that group.
      It doesn't do anything with bumblebeed apart from enabling users from that group to use primusrun/optirun commands.

      Really curious: why one would bother?

    11. Mikhail: I can only repeat that, on my system, every time I run 'zypper up', the bumblebee group disappears (i.e. something deletes it) and bumblebeed.service does not start. After I restore the bumblebee group, it starts again. If you don't experience this on your system, count yourself lucky. Here's the relevant log excerpt:
      Dec 27 13:06:25 wilbur systemd[1]: Started Bumblebee C Daemon.
      Dec 27 13:06:25 wilbur bumblebeed[2800]: [ 241.823908] [ERROR]Success
      Dec 27 13:06:25 wilbur bumblebeed[2800]: [ 241.823964] [ERROR]There is no "bumblebee" group
      Dec 27 13:06:25 wilbur systemd[1]: bumblebeed.service: main process exited, code=exited, status=1/FAILURE
      Dec 27 13:06:25 wilbur systemd[1]: Unit bumblebeed.service entered failed state.

    12. neko@linux-fvuo:/etc/bumblebee> grep -i group bumblebee.conf
      # The name of the Bumbleblee server group name (GID name)

      Yes it is started under group $GROUP, however you could define ServerGroup=users or anything.

  13. Are you sure it is kernel_devel and not devel_kernel ?? Is this something different?

    1. Oops! It should be devel_kernel -- fixed now.

  14. Hello, congratulations on the blog.
    Questions, after each kernel upgrade bbswitch stops working and have to re-install.
    Can you somehow fix it to work with all kernels?

    I currently use the kernels 1.g2caf20a 3.12.8-3.12.8-desktop-and 1.g2caf20a-default (according to what I read consumes less energy) but I can not put bbswitch for both kernels, only leaves me with one.

    Can you do something?

    A greeting.

    1. Hi Guillermo: Thanks for reading my blog, whose only purpose is to serve as a memory aid. Suggest you ask your question at http://forums.opensuse.org

  15. Due to changes in Nvidia Licence (item 2.1.1: "may be copied and redistributed, provided that the binary files thereof are not modified in any way") became possible to create binary packages for openSUSE. Having that in mind i created packages for nvidia drivers, eliminating *most* of the problems. To enable nvidia proprietary drivers for desktop kernel users, insted of installing dkms-nvidia and x11-video-nvidia, just install nvidia-kmp-(YOYRKERNELFLAVOUR) and nvidia-utils. For users runing custom kernels, it's still necessary to use the dkms-nvidia package.

  16. It gives me for:

    ls /proc/acpi/bbswitch
    ls: cannot access /proc/acpi/bbswitch: No such file or directory

    and for

    cat /proc/acpi/bbswitch
    cat: /proc/acpi/bbswitch: No such file or directory

    Any ideas? My driver is Geforcee Gt 750 M, Opensuse 13.1 Gnome3.

    1. And what does "lsmod | grep bbswitch" say? And how about "systemctl status bumblebeed.service"? If the bbswitch kernel module doesn't load, then Bumblebee will probably not work. In that case, I would repeat all the steps from the very beginning (including the part at the top about completely removing the previous installation of nvidia, bumblebee etc.). Also: have you asked your question at forums.opensuse.org?

    2. I have brand new opensuse 13.1, so I guess I have no nvidia , bumblebee..

      lsmod | grep bbswitch -gives me nothing


      systemctl status bumblebeed.service -gives me:
      bumblebeed.service - Bumblebee C Daemon
      Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled)
      Active: active (running) since Tue 2014-02-04 20:12:17 EET; 15h ago
      Main PID: 2199 (bumblebeed)
      CGroup: /system.slice/bumblebeed.service
      └─2199 /usr/sbin/bumblebeed

    3. Hi again! Sounds to me like you haven't actually performed the steps outlined above.

    4. Hi, this means that I must uninstall everything and start over..I will try.

    5. Ok, I guess this is out of my reach..

    6. I had same symptoms than you. In my case the problem was the kernel source version that differs from the running kernel. Check the output of zypper in -f dkms-bbswitch if you see any warning about this...

      Creating symlink /var/lib/dkms/bbswitch/0.8/source ->

      DKMS: add completed.

      Module build for the currently running kernel was skipped since the
      kernel source for this kernel does not seem to be installed.

      cat /var/log/messages | grep bumblebeed
      2014-02-22T14:26:14.797919-03:00 thiago bumblebeed[1820]: [ 28.647874] [INFO]/usr/sbin/bumblebeed 3.2.1 started
      2014-02-22T14:33:59.285179-03:00 thiago bumblebeed[1467]: FATAL: Module bbswitch not found.
      2014-02-22T14:33:59.285549-03:00 thiago bumblebeed[1467]: [ 36.146073] [ERROR]Module bbswitch could not be loaded (timeout?)
      2014-02-22T14:33:59.285735-03:00 thiago bumblebeed[1467]: [ 36.146089] [WARN]No switching method available. The dedicated card will always be on.

    7. This only happens after a fresh install without the latest kernel update, obviously.

    8. If someone is running a non-standard kernel, then step 5 ("install the devel_kernel pattern") might not be effective. I don't know this for sure, but the devel_kernel pattern may install kernel sources for the standard kernels only, regardless of which kernel is actually running. If the sources of the running kernel are not installed, "zypper in -f dkms-bbswitch" will not do what is expected, and the result (after reboot) will be non-functional bumblebee.

    9. Ah, now I understand. If the user is running a freshly-installed system, without updates, they might see this "kernel source for this kernel does not seem to be installed" error. When they install the devel_kernel pattern, they get the source for the latest standard kernel, but the latest kernel itself might not be installed. After reboot, they are still running the old kernel.

    10. I added a "make sure you have your system fully updated" step at the beginning. Good catch, Thiago.

  17. I find 'Error in checksums' when installing software from Overman79's repository . Can you help me ? https://forums.opensuse.org/showthread.php/495160-problem-of-bumblebee-in-13-1-x86_64

    1. See my reply there: https://forums.opensuse.org/showthread.php/495160-problem-of-bumblebee-in-13-1-x86_64?p=2623771#post2623771

  18. Thanks a lot for this description. Following these steps, bumblebee has worked out of the box on a new OpenSUSE 13.1 installation (Thinkpad T420, NVS4200M). Btw, in this way I have first met VirtualGL, and this is also really great. Now I can run CUDA applications with GL visualization remotely from my notebook (admittedly, this is a rare use case, but nevertheless nice to have). I only wonder for now why OpenCL applications require the "-b none" option of optirun; this might hurt if combining OpenCL and OpenGL in one application.

    Nevertheless, overall this is really great and I never expected that bumblebee would be so easy to install and use (even sleep and hibernate still work :-) ).

  19. Hi all. What if I always want to run my NVidia card? Is there a way to make linux boot always with NVidia card going?

    1. Hi Antonio. That sounds like it would be easy. Just install openSUSE and it will use the open-source nouveau driver. If you don't like that, then install the proprietary nvidia driver.

    2. would you by chance have a detailed write-up on how to properly do that? The last time I tried to install the proprietary driver, my computer tanked and I had to reinstall Opensuse. I would like to avoid that :) Thanks!

    3. Nope. But you can always ask at the openSUSE forums http://forums.opensuse.org

    4. I thought that If its an Optimus card i would need to use bumblebee?

    5. Yes. You might as well install it, as that will likely be the first thing the forum folks will recommend. Once you have bumblebee installed and working, I guess it should be possible to set up bumblebee to keep the discrete adapter on all the time. But I've never done that.

  20. Thanks for this wonderful guide!

    I recently switched my laptop to Suse 13.1, I'm used to using Debian but it didn't work very well on the laptop.

    I followed the guide to the letter, everything worked but when I try to run

    $ optirun /opt/cxoffice/bin/crossover

    It says 'error cannot access secundary GPU ... NVIDIA: ...'

    cat /var/log/messages shows me failed to load module "nvidia", no driver available, no screens found.

    lspci | grep 'VGA' outputs 2 lines:
    00:02.0 VGA etc Intel
    01:00.0 VGA NVIDIA etc

    In /etc/bumblebee/xorg.conf.nvidia it mentions PCI bus ID, I uncommented it and tried:
    BusID "PCI:01:00:0" <-- this was default, but commented out.
    BusID "PCI:01:00.0"
    BusID "01:00.0"

    These didn't help ...

    I checked whether Nvidia stuff was installed:
    $ zypper se nvidia
    i dkms-nvidia
    i x11-video-nvidia

    I'm not sure what to check next. Oh ... I'm member of the video and bumblebee groups. Bumbleed.service is running, I checked with
    # systemctl status bumblebeed.service

    I'd appreciate some help with this, gaming doesn't work very well on the Intel ;).


    1. Hi Goe, you need to take your question to forums.opensuse.org -- this site is primary intended for my own personal use as a memory aid, and I am only interested in disabling the discrete graphics card. (Somehow, Dell forgot to include an option for that in the BIOS setup of my laptop.) My guess is that you're experiencing a version mismatch between Bumblebee and the NVIDIA proprietary driver. Certain versions of Bumblebee only work with certain versions of the NVIDIA driver, and vice versa.

  21. Hi all. I'm having this problem after updating my nvidia drivers:

    ➜ ~ optirun glxgears
    [ 227.203006] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) NVIDIA(0): Failed to initialize the NVIDIA kernel module. Please see the

    [ 227.203040] [ERROR]Aborting because fallback start is disabled.

    it was working before the update. Any ideas how to fix this?


    1. Hi osa1, have you posed this question on forums.opensuse.org? My guess is that you're experiencing a version mismatch between Bumblebee and the NVIDIA proprietary driver. IIRC certain versions of Bumblebee only work with certain versions of the NVIDIA driver, and vice versa.

  22. Hi, I have the same problem as osa1...

    ls /proc/acpi/bbswitch

    ls: cannot access /proc/acpi/bbswitch: No such file or directory

  23. HURRAY !!!!!!!!!!!! worked for my Laptop as well:
    DELL XPS L502X
    64 bit
    OpenSUSE 13.1

    Thank you for making life easier :-)

  24. hi there,
    i am now able to run my wm (as root) by using optirun startx and get my screen on my hdmi tv.
    is there any way that i can use optirun to run my wm as default? may be by tweaking somewhere in sysconfig?
    or just run optirun startx as normal user.. my goal is to be able to use hdmi tv as 1 of my output..

  25. Sorry, this is not a support page. Please post your questions to forums.opensuse.org

  26. I came here from opensuse Wiki... am I wrong or http://download.opensuse.org/repositories/home:/Overman79:/Laptop/openSUSE_13.1/ doesn't work anymore?

    1. It works for me. What do you see when you point your browser to that URL?

    2. The repository has been moved to: http://download.opensuse.org/repositories/X11:/Bumblebee/openSUSE_13.1/
      Thanks for this excellent tutorial!

  27. Hi many thanks for all the very very good very very detailed and very easy written and very easy to understand instructions how to do that with me on my MSI GE70i760M287B I7-3630QM Gamer Läppi it läft properly supiiiiiiiiiiiiiiiiiii that with the rules of the Intel graphics card and deeer Nvidia graphics card
    supiiiiiiiii many time many thanks good
    grüssle from germany

  28. I tried installing Bumblebee on openSUSE 13.1 and it was a partial success. My power consumption is down to 12 - 14 W (from 20+ W), however I get the following error when using optirun or primusrun:

    primus: fatal: broken GLX on main X display

    So my discrete card is OFF...but I cannot optionally turn it on. I have a full description of my problem at:


  29. Desktop effects also seem not to work anymore. Applications with dependencies on OpenGL also do not work anymore (for example FreeCAD).

  30. worked like a charm on my Acer V571-g with nvidia geforce 640M on openSUSE 13.2, kernel 3.16.
    bbswitch didnt work on kernel 3.18 tho

  31. It works great for my laptop
    Dell XPS L502X
    OpenSUSE 13.2
    Thank you