Saturday, March 23, 2013

openSUSE 12.3: How to install 'bumblebee' for NVIDIA Optimus VGA

Note: This historical post was intended for me as a memory aid. If you decide to imitate the steps described, know that you are doing so at your own risk.

Bumblebee, etc. is still officially unsupported in openSUSE, but it is possible to get it working in openSUSE 12.3. However, openSUSE 12.3 itself is also history. Nowadays, I am running openSUSE 13.1 with Bumblebee on my Optimus laptop, and there is a new blog entry:

Table of Contents

Installation Procedure
  1. This procedure will install the proprietary NVIDIA driver and Bumblebee. To begin with, make sure I have the right version of openSUSE installed:
    # cat /etc/SuSE-release
    openSUSE 12.3 (x86_64)
    VERSION = 12.3
    CODENAME = Dartmouth
  2. Also make sure I haven't done any weird, non-standard things to the installation. Check. (This is very important because non-standard repositories can contain conflicting versions of the packages I am going to install.)
  3. To reiterate: I need to remove all packages and repositories relating to any previous installation, or attempted installation, of the proprietary NVidia driver, Bumblebee, dkms, etc.
  4. In BIOS settings, make sure "Optimus" is ON (at least on my Dell Latitude E6430 laptop, it gets turned off just by running "zypper up")
  5. Make sure I have the Kernel Development Pattern installed (Yast -> Software Management)
  6. Install the 'kernel_devel' pattern
    # zypper in -t pattern kernel_devel
    (or, alternatively, use Yast -> Software Management) (See also the blog entry on manipulating patterns without Yast)
  7. Make sure my user account is a member of the bumblebee and video groups:
    # groupadd bumblebee
    groupadd: group 'bumblebee' already exists
    # groupadd video
    groupadd: group 'video' already exists
    # usermod -a -G bumblebee,video smithfarm
    For more information on adding users to groups, see the "openSUSE: Add user to group" blog entry on this site.
  8. Reboot just to be sure. Check.
  9. As my user account, check to make sure I am a member of the video and bumblebee groups:
    smithfarm@machine:~> groups
    users wheel video vboxusers bumblebee
  10. Add Overman79's repository
    # zypper ar Overman79
  11. Install dkms, dkms-nvidia (proprietary NVIDIA driver), and dkms-bbswitch packages (downloading the proprietary NVIDIA driver in particular may take an excruciatingly long time, and there's no progress bar, so I have to be patient here):
    # zypper in dkms
    # zypper in dkms-nvidia 
    # zypper in dkms-bbswitch
  12. Install the remaining packages from Overman79's repository:
    # zypper in bumblebee primus x11-video-nvidia
  13. Enable the dkms and bumblebee services:
    # systemctl enable dkms
    # systemctl enable bumblebeed
  14. Reboot and pray
  15. Try glxspheres:
    smithfarm@wilbur:~> primusrun glxspheres
    Polygons in scene: 62464
    Visual ID of window: 0xcd
    Context is Direct
    OpenGL Renderer: NVS 5200M/PCIe/SSE2
    61.096760 frames/sec - 66.138465 Mpixels/sec
    59.909029 frames/sec - 64.852722 Mpixels/sec
    59.904287 frames/sec - 64.847589 Mpixels/sec
    59.902248 frames/sec - 64.845382 Mpixels/sec
    smithfarm@wilbur:~> optirun glxspheres
    Polygons in scene: 62464 
    Visual ID of window: 0x21
    Context is Direct
    OpenGL Renderer: NVS 5200M/PCIe/SSE2
    149.925632 frames/sec - 162.297496 Mpixels/sec
    162.674810 frames/sec - 176.098735 Mpixels/sec
    161.700929 frames/sec - 175.044490 Mpixels/sec
    161.484454 frames/sec - 174.810151 Mpixels/sec
    If you were wondering why primusrun gets poorer performance (I was), here's an answer kindly provided by etam1024 -- reproduced here with thanks!
    Because app running with primusrun is synced with vblank. If your monitor has refresh rate 60 Hz, then application will generate no more than 60 fps. There's no need to have more fps, because monitor will not display them anyway.

    Optirun does not sync with vblank, so app generates as much fps as possible. (again: doing more than monitors refresh rate, is just a waste of power).

  16. The remaining instructions are for disabling Optimus completely (to save power, run cooler, etc.)
    Install the 'powertop' package:
    # zypper in powertop
    and run it while on battery power to see how much power your laptop is dissipating.
  17. Remove nvidia module:
    # rmmod nvidia
    # lsmod | grep nvidia
  18. Turn off discrete graphics:
    # tee /proc/acpi/bbswitch <<<OFF
  19. Configure modules:
    # cd /etc/modprobe.d
    # ls *nvidia*
    # cat 50-nvidia.conf
    blacklist nvidia
    # ls *bbswitch*
    # cat 50-bbswitch.conf
    options bbswitch load_state=0 unload_state=0
  20. Configure initrd by editing /etc/sysconfig/kernel and removing all mentions of 'nvidia':
    # vim /etc/sysconfig/kernel
    # grep nvidia /etc/sysconfig/kernel
  21. Make a new initrd:
    # mkinitrd
  22. Reboot and pray
  23. Verify that discrete graphics is OFF:
    smithfarm@machine:~> optirun --status
    Bumblebee status:  Ready (3.1). X inactive. Discrete video card is off.
  24. Run powertop again and compare results with the "before" reading.

Usage notes:
So far, it seems to be working worse than under 12.2 :-( I couldn't get bbswitch to automatically turn the discrete graphics off on boot-up. It tries to, but fails:
[   41.226491] bbswitch: disabling discrete graphics
[   41.236942] pci 0000:01:00.0: Refused to change power state, currently in D0
[   41.537534] pci 0000:01:00.0: power state changed by ACPI to D3cold

So I put this in my .bash_profile:
sudo /sbin/rmmod nvidia
sudo tee /proc/acpi/bbswitch <<<OFF
optirun --status

I can sleep the laptop to RAM and recover OK, if it hasn't slept too long (?) - if I leave it sleeping overnight, in the morning it wakes up, but both monitors remain black no matter what keys I press. This is weird, but has happened several times already so it's probably reproducible. I've been shutting the machine down for the night as a workaround. (This problem disappeared quite some time ago, after an update.)

I'd like to try getting rid of the nvidia driver and using Bumblebee and bbswitch with nouveau - seems like that's now an option, at least as of Bumblebee 3.1. (This is now possible -- I don't have nvidia installed at all nowadays.)

Keep in mind that my only motivation for running Bumblebee is to turn the discrete graphics card OFF and leave it OFF. I don't need it, and I sure as heck don't need the additional noise and heat. I'm not very impressed that Dell "forgot" to include a "Disable discrete graphics adapter" selection in the BIOS setup!

Another problem that has been getting rarer: occasionally when I sleep/resume the laptop too frequently, it gets into a state where it runs hot. Bumblebee is usually alive and bbswitch always reports that discrete graphics is OFF, yet somehow, somewhere something is wrong. The CPU load is very low, idling. But the laptop is warmer to the touch than normal and the temperature meter reads 10, 15, or even 20 degrees Celsius higher than normal. So far, the only solution I've found when this happens is restart/power cycle.



  1. dkms-nvidia-313.26-3.1 failed:
    (with - nodeps - force) Error: Subprocess failed. Error: RPM failed: Error in checksums 922991034 2470291870
    error:% pre (dkms-nvidia-313.26-3.1.x86_64) scriptlet failed, exit status 254
    error: dkms-nvidia-313.26-3.1.x86_64: install failed

    1. It means your "/usr/src/" is not downloaded completely

      Just try remove it and reinstall dkms-nvidia :)


      If you want to make sure that the download progress of nvidia driver running correctly
      just download "dkms-nvidia-313.26-3.1.x86_64.rpm" file
      then install it through 'rpm -i'


      ~regardz abz

  2. Thanks a lot - I have managed to install the bumblewee. Since I have two monitors attached with my notebook through a docking station. It somehow fails to detect the DVI monitor, however gets the power and comes out from the standby. Whereas the analog monitor works without any problems. Do you have any idea how to resolve this???

    1. No idea, though I admit a three-monitor setup does sound interesting.

    2. Even DVI alone (without being connected analog) doesn't work at all.

  3. in your tutorial, you use nouveau driver not nvidia proprietary driver?

    1. Hi Marc. Good question. The answer is I'm using the NVIDIA proprietary driver for now, and I've edited the blog entry to make that clear. That said, however, since I personally am not using the driver for anything except to disable the discrete graphics adapter, I'm planning to test if Bumblebee/bbswitch now works with the nouveau driver (it didn't before IIRC).

    2. dkms-nvidia size, it's only a few kb... so it will download something?

      because when i check in this repository

      nvidia driver it's a few meg...

  4. Awesome post! I am new to OpenSuSE and was using Linux Mint for the past 2 years. Still learning opensuse, but its a lot smoother on my laptop.

    Thanks for helping me install bumblebee. (though this was easier on my previous distro).

    Can you suggest anything from where I can learn a little more about the commands of opensuse.

    1. Hi Abhishek! Glad you liked it. Here are some links for further reading:

      Also, I've found simple Google searches, like "opensuse foo" or "bar", can produce useful information.

  5. hello:

    I've finished well for the intial 12 steps. Now when I try to test it with command in step 13:

    primusrun glxspheres

    my screen become something messy.....and I got the following messgaes:

    Polygons in scene: 62464
    Visual ID of window: 0x130
    Segmentation fault

    when I run step 15:

    tee /proc/acpi/bbswitch <<<OFF

    it said:

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

    I also found:

    sudo modprobe bbswitch
    FATAL: Error inserting bbswitch (/lib/modules/3.7.10-1.1-desktop/kernel/drivers/acpi/bbswitch.ko): No such device

    1. I haven't the slightest idea what you might be doing wrong, sorry. When/if you find out what the problem is, feel free to post here your proposed update to the steps.

  6. After upgrade to bumblebee 3.2.1 I have a big unresolved problem: i cant use optirun or primusrun because it reports that the nvidia driver (dkms-nvidia) does not support my card (680M), but it should support since it is specified in app A of nvidia driver readme file. The problem did not appear for bumblebee 3.1, I want to revert back to previous version but I cannot find it anywhere ...

    1. Thanks for your comment. You might stand a better chance of getting an answer if you ask your question at

    2. SOLVED. I had to remove dkms-bbswitch and set in bumblebee.conf PM Method to none for nvidia driver. Now the nvidia card is always on and works perfectly. Problem existed both for Opensuse 12.2 and 12.3

  7. Hi!
    this is my results:
    linux-X53SV:~ # primusrun glxspheres
    Polygons in scene: 62464
    Visual ID of window: 0x9f
    Context is Direct
    OpenGL Renderer: GeForce GT 540M/PCIe/SSE2
    46.658883 frames/sec - 41.078481 Mpixels/sec
    47.365559 frames/sec - 41.700638 Mpixels/sec
    47.188409 frames/sec - 41.544675 Mpixels/sec
    46.801465 frames/sec - 41.204010 Mpixels/sec
    46.706712 frames/sec - 41.120589 Mpixels/sec
    linux-X53SV:~ # optirun glxspheres
    Polygons in scene: 62464
    Visual ID of window: 0x21
    Context is Direct
    OpenGL Renderer: GeForce GT 540M/PCIe/SSE2
    47.213554 frames/sec - 41.566813 Mpixels/sec
    47.664938 frames/sec - 41.964211 Mpixels/sec
    42.381706 frames/sec - 37.312854 Mpixels/sec
    46.339894 frames/sec - 40.797642 Mpixels/sec
    48.530799 frames/sec - 42.726515 Mpixels/sec
    47.652612 frames/sec - 41.953360 Mpixels/sec

    it's normally

    1. Thanks for your comment. You might stand a better chance of getting an answer if you ask your question at

  8. > "No idea why primusrun gets slower performance"

    Because app running with primusrun is synced with vblank. If your monitor has refresh rate 60 Hz, then application will generate no more than 60 fps. There's no need to have more fps, because monitor will not display them anyway.

    Optirun does not sync with vblank, so app generates as much fps as possible. (again: doing more than monitors refresh rate, is just a waste of power).

    1. Wow -- thanks, etam1024! Your explanation makes perfect sense. I have taken the liberty of including it in the description.

  9. The performance of my Nvidia is way better with primus than with optimus. I wrote a ste-by-step tutorial of the installation process. You can check it here:

  10. Hello Smithfarm!

    Thanks for your article, it helped me to get my bumblebee working in openSUSE Tumbleweed x64.

    One thing though: I managed to get bbswitch turn off the descrete card on startup, maybe that works for you (and others) too:

    1) blacklist nvdidia in 50-nvidia.conf as you already did (Im not sure if thats neccessary but it doesnt hurt ;)

    2) edit /etc/modprobe.d/bbswitch.conf --> options bbswitch load_state=0 unload_state=0
    ATTENTION to all Lenovo users (like me): At least the models T410s and T410 also require the option skip_optimus_dsm=1. (The bbswitch README only mentions T410s so it took me a while to figure that out for me T410. So maybe other Lenovos require that too....)

    3) Here is what finally did it for me. Edit /etc/sysconfig/kernel: Not only remove the nvidia entry but also add the bbswitch module --> INITRD_MODULES="bbswitch".

    After a mkinitrd and a reboot, discrete card was off ;)


    1. what kernel have you used?

      on my lenovo i can select intel or optimus system

    2. I just did an update to kernel


      After that, discrete graphics were ON again after restart.

      "nvidia" was back in /etc/sysconfig/kernel--> INITRD_MODULES="bbswitch nvidia"

      I deleted "nvidia" and did a
      # mkinitrd

      That did the job.


    3. On my Dell Latitude E6430, typically after an update not only will the discrete card be "on" again, but Optimus will be turned off in the BIOS settings (!). This never fails to astound me.

  11. Hi, have you fixed your problem with "sleeping over night"? I just noticed that my laptop does the same. It wakes up in the morning, something flashes on the screen and than the laptop goes immediately down. Sleeping for shorter periods of time works flawlessly. It had started even before I installed bumblebee but since we both have the same problem, it might be optimus related.

    1. Ok, it turned out that my problem was completely different. For anyone having the same problem:

  12. This fails at step 11.

    # systemctl enable dkms

    fails with:

    Failed to issue method call: No such file or directory

    1. Sounds like you don't have the dkms package installed, or something's amiss on your system. Have you tried asking on

    2. dkms was from the packman repository and not from Overman79. Packman has higher priority. Let's see what happens after the reboot.

    3. Good point. I just edited steps 2 and 3 to reflect this.

  13. Muchas gracias, excelente procedimiento.

    Dell N5110 15R i7-2670 QM

    tkto@linux-h91g:~> optirun glxspheres
    Polygons in scene: 62464
    Visual ID of window: 0x21
    Context is Direct
    OpenGL Renderer: GeForce GT 525M/PCIe/SSE2
    152.635543 frames/sec - 170.341266 Mpixels/sec
    152.941420 frames/sec - 170.682625 Mpixels/sec
    154.165411 frames/sec - 172.048599 Mpixels/sec
    151.737481 frames/sec - 169.339029 Mpixels/sec
    152.451240 frames/sec - 170.135584 Mpixels/sec
    154.310694 frames/sec - 172.210735 Mpixels/sec


  14. Thanks for the great post.

    I'm using openSUSE 12.3 on a Dell XPS 15 (L521X) trying to get an external monitor to work.

    This laptop has an nVidia 640M chip in it and the external display port and hdmi port are wired into the discrete graphics.

    I'd like to just use the Intel HD 4000 graphics build into the CPU, not sure if that's possible though? Assuming it's not possible, I imagine I need either nouveau or nVidia drivers, but I can't seem to get the display port to be detected.

    Here's the output of xrandr when I have a monitor connected:

    Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
    LVDS1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
    1920x1080 60.0*+ 40.0
    1400x1050 60.0
    1280x1024 60.0
    1280x960 60.0
    1024x768 60.0
    800x600 60.3 56.2
    640x480 59.9
    VGA1 disconnected (normal left inverted right x axis y axis)
    HDMI1 disconnected (normal left inverted right x axis y axis)
    DP1 disconnected (normal left inverted right x axis y axis)

    Any tips?


    1. Suggest you post your questions to

  15. Hello,
    I get this error when I want to use primusrun or optirun:

    [ 980.445614] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) Failed to load module "nvidia" (module does not exist, 0)

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

    I carefully followed the instructions, but didn't nvidia driver install at zypper in dkms-nvidia?

    1. I don't doubt you tried to follow, but please note that what I posted here is not "instructions", but merely a description of what I did. Nothing more.

      Possible hint: take another look at step 2. That means I started from a clean, vanilla, fully updated installation of openSUSE 12.3.

  16. Hi,

    thanks for the instructions.

    I am fairly new to Linux (Open Suse 12.3) so this question might seem silly...

    Where can I find the .bash_profile to add the commands to disable the discreet graphics? Or do I have to create it?

    Please let me know



    1. Hi Ivan: Yes, you probably have to create it, and it has to be in the home directory of the user you log in as. This is very easy if you know how to use an editor. Alternatively, you can use this trick:

      $ cd # change directory to your home
      $ ls .bash_profile # make sure it doesn't already exist
      $ cat >.bash_profile # start capturing typed characters
      ...cut-and-paste the lines...
      ...then press CTRL-d (signals "End Of File")...
      $ # get back to the bash prompt

      Hope this helps.

  17. hi
    thanks for help,
    at point 13 i have :
    glxspheres: libglfork.cpp:244: PrimusInfo::PrimusInfo(): Assertion `ncfg' failed.
    any suggestions?
    when i try to run paraview i have:
    ERROR: In /home/sergio/rpmbuild/BUILD/ParaView-3.12.0/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 609
    vtkXOpenGLRenderWindow (0x24447e0): GLX not found. Aborting.

    1. Suggest you post your questions to

  18. Hi, Thanks for your post. I already have bumblebee (optimus/primus) running in my laptop (Thinkpad W520). But, how can I have turned on a second screen attached to my discrete nvdida card?

  19. i still have at point 13
    glxspheres: libglfork.cpp:244: PrimusInfo::PrimusInfo(): Assertion `ncfg' failed.
    and at point 16
    linux-dgf5:/etc/modprobe.d # cat 50-nvidia.conf
    options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=33 NVreg_DeviceFileMode=0660
    linux-dgf5:/etc/modprobe.d # ls *bbswitch*
    linux-dgf5:/etc/modprobe.d # cat bbswitch.conf
    options bbswitch load_state=0 unload_state=1

    what can i do to make glx running... paraview need it???
    thanks for help

  20. i reboot, didn't pray and now paraview is working!!! so good, thanks to all

  21. Hi, I have an HP envy 15 notebook PC

    Using fresh fully updated Opensuse 12.3 Linux kernel 3.7.10-1.16-desktop x86_64 GNU/Linux

    Under step 11 I got this error message:

    linux-1phe:~ # zypper in dkms-nvidia
    Loading repository data...
    Reading installed packages...
    Resolving package dependencies...

    The following NEW package is going to be installed:

    1 new package to install.
    Overall download size: 6.5 KiB. After the operation, additional 513.0 B will be
    Continue? [y/n/?] (y): y
    (1/1) Installing: dkms-nvidia-331.20-7.1 ................................[error]
    Installation of dkms-nvidia-331.20-7.1 failed:
    (with --nodeps --force) Error: Subprocess failed. Error: RPM failed: Error in checksums 3171180529 3635253084
    error: %pre(dkms-nvidia-331.20-7.1.x86_64) scriptlet failed, exit status 254
    error: dkms-nvidia-331.20-7.1.x86_64: install failed

    Abort, retry, ignore? [a/r/i] (a):

    Any thougts? Have I missed something?

  22. Hello. I know this article wasn't meant to be used as a tutorial about how to get this stuff working and nobody has got to provide any help but I'd be extremely grateful if you helped me.

    I'm stuck at point #15. "primusrun glxspheres" results in:
    "primus: fatal: Bumblebee daemon reported: error: [XORG] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA GPU at PCI:1:0:0. Please" - it looks exactly that way; probably after "please" should be given a possible solution to that issue... but it's not. I looked through the internet and didn't find anything suitable.

    Thanks in advance!

    1. No idea what the problem might be. To get the entire log message, try this: "grep -i please /var/log/Xorg.0.log". If you have nothing to lose, you might also try my procedure for returning to a clean slate.

  23. Thanks. Great tutorial.

    openSUSE 13.1 (x86_64)
    OpenGL Renderer: GeForce GT 640M/PCIe/SSE2

    primusrun glxspheres64: 61.941718 frames/sec - 69.126957 Mpixels/sec
    optirun glxspheres64: 233.487280 frames/sec - 260.571804 Mpixels/sec

  24. Hi, I bought a dell inspiron 7537 laptop. and I can't get the nvidia gt 750M driver working. I installed the same driver like at the beginning of this post, with the same result. Can you help me with this ? In the bios is no option to me to turn up the optimus technology. I installed opensuse in legacy boot mode, and I formated my harddrive, and deleted windows 8, it's urgent, thanks..

  25. Hi there. Suggest you ask your question at

    1. Thanks, I have dona that to.. I'am waiting for reply now..

  26. Hi there,
    i've followed your notes n it works great. i can use optirun and primusrun.
    the only thing i would like to know is, will it start the WM in nvidia? if not, how? i am using gnome 3.

    the nvidia-setting told me that i am not running nvidia

    glxinfo | grep OpenGL
    OpenGL vendor string: Intel Open Source Technology Center
    OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile
    OpenGL core profile version string: 3.1 (Core Profile) Mesa 9.2.3
    OpenGL core profile shading language version string: 1.40
    OpenGL core profile context flags: (none)
    OpenGL core profile extensions:
    OpenGL version string: 3.0 Mesa 9.2.3
    OpenGL shading language version string: 1.30
    OpenGL context flags: (none)

    i have tried the, but no info i can use yet...

    -all the best-

    1. Right. When the discrete adapter is turned off by Bumblebee/bbswitch, the nvidia driver is not loaded. This can be confirmed with the command 'lsmod | grep nvidia' -- it will not give any output. However, when you do, e.g., 'primusrun glxgears' and in another window run the same command, it will give output. See 'man lsmod' for details. This proves that Bumblebee is working properly by loading/unloading the nvidia driver on demand. As for 'nvidia-settings', I don't know anything about it. Thanks for the feedback.

  27. This comment has been removed by the author.

  28. Hello, I purchased a Dell Inspiron 757 laptop. The Nvidia GT 750M driver is not working for me. I tried the same driver that was at the beginning of the post and got the same results. Could you please help me? I cannot turn up the best technology in the bios. I installed Opens use in legacy mode and formatted my hard disk and deleted Windows 8. It's urgent.pcseekers