Setup bumblebee and primus in openSUSE 12.3

Hello, I would like to know how can I setup bumblebee and primus for openSUSE 12.3? I have tried before but with no luck… Also, please excuse me for insisting, but I would like to play some games on steam using my discrete nvidia card. A huge thanks in advance!

Hi,

Here’s how I did it:

I added these repos:
Index of /repositories/home:/Overman79/openSUSE_12.3
Index of /repositories/home:/Bumblebee-Project:/nVidia:/313.18/openSUSE_12.3
through Yast’s repo manager.

Then started the software manager and installed

From the Overman79 repo:
VirtualGL
VirtualGL32bit
bbswitch-kmp-desktop
bumblebee
(dkms)
dkms-bbswitch
libturbojpeg
primus
primus-32bit
From the NVIDIA repo
(dkms)
dkms-nvidia
nvidia-compute
nvidia-compute-32bit
x11-video-nvidia
x11-video-nvidia-32bit

Next, I created symlinks


su -
ln -s /usr/lib/nvidia /usr/lib/nvidia-bumblebee
ln -s /usr/lib64/nvidia /usr/lib64/nvidia-bumblebee


Next I added myself to the bumblebee and the video group, using Yast - Security and Users - Users and Groups

Next I did:

su -c 'systemctl enable bumblebeed.service && systemctl start bumblebeed.service'

Now it’s time for a reboot. Login on the desktop, all should be well now.

Next I run, as the normal user:

primusrun glxinfo2 | grep OpenGL

. Now the output is

knurpht-laptop:~> primusrun glxinfo2 | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 610M/PCIe/SSE2
OpenGL version string: 4.3.0 NVIDIA 313.18
OpenGL shading language version string: 4.30 NVIDIA via Cg compiler
OpenGL extensions:



To run Google Earth on the NVIDIA card, I use

vblank_mode=0 primusrun google-earth

HI, I did as instructed however:

  1. primusrun glxinfo | grep OpenGL produces the following output:
miniclip22@linux-nbfl:~> primusrun glxinfo | grep OpenGL
/usr/bin/primusrun: line 35: exec: glxinfo: not found

  1. optirun glxspheres does not show anything:
miniclip22@linux-nbfl:~> optirun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x21
NVIDIA: could not open the device file /dev/nvidiactl (Permission denied).
[VGL] WARNING: The OpenGL rendering context obtained on X display
[VGL]    :8 is indirect, which may cause performance to suffer.
[VGL]    If :8 is a local X display, then the framebuffer device
[VGL]    permissions may be set incorrectly.
Context is Indirect
OpenGL Renderer: GeForce GT 630M/PCIe/SSE2
111.398609 frames/sec - 95.312650 Mpixels/sec
116.743470 frames/sec - 99.885713 Mpixels/sec



  1. Primusrun uses my Intel graphics HD 4000 card instead of my Nvidia 630M one.
miniclip22@linux-nbfl:~> primusrun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x21
Xlib:  extension "NV-GLX" missing on display ":0".
Context is Indirect
OpenGL Renderer: Mesa DRI Intel(R) Ivybridge Mobile 
58.498067 frames/sec - 50.050947 Mpixels/sec
43.555067 frames/sec - 37.265716 Mpixels/sec

I am running openSUSE 12.3, KDE 4.10, 64 bits system. Any help is appreciated!


ME TO Please

Followed it all correctly.

linux-ur4v:/home/user # primusrun glxinfo | grep OpenGL
Xlib: extension “NV-GLX” missing on display “:0”.
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile
OpenGL version string: 1.4 (3.0 Mesa 9.0.2)
OpenGL extensions:

This has a blank screen

user@linux-ur4v:~> optirun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x21
NVIDIA: could not open the device file /dev/nvidiactl (Permission denied). - that file was there but now its not :S
[VGL] WARNING: The OpenGL rendering context obtained on X display
[VGL] :8 is indirect, which may cause performance to suffer.
[VGL] If :8 is a local X display, then the framebuffer device
[VGL] permissions may be set incorrectly.
Context is Indirect
OpenGL Renderer: GeForce GT 540M/PCIe/SSE2

user@linux-ur4v:~> primusrun glxinfo
name of display: :0
Xlib: extension “NV-GLX” missing on display “:0”.
display: :0 screen: 0
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_create_context, GLX_ARB_create_context_profile,
GLX_ARB_multisample, GLX_EXT_create_context_es2_profile,
GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info,
GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, GLX_OML_swap_method,
GLX_SGI_swap_control, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_INTEL_swap_event
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
GLX_EXT_visual_rating, GLX_EXT_import_context, GLX_SGI_video_sync,
GLX_NV_swap_group, GLX_NV_video_out, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
GLX_SGI_swap_control, GLX_EXT_swap_control, GLX_EXT_swap_control_tear,
GLX_EXT_buffer_age, GLX_ARB_create_context,
GLX_ARB_create_context_profile, GLX_NV_float_buffer,
GLX_ARB_fbconfig_float, GLX_EXT_fbconfig_packed_float,
GLX_EXT_texture_from_pixmap, GLX_EXT_framebuffer_sRGB,
GLX_NV_present_video, GLX_NV_copy_image, GLX_NV_multisample_coverage,
GLX_NV_video_capture, GLX_EXT_create_context_es_profile,
GLX_EXT_create_context_es2_profile, GLX_ARB_create_context_robustness
GLX version: 1.4
GLX extensions:
GLX_ARB_create_context, GLX_ARB_create_context_profile,
GLX_ARB_multisample, GLX_EXT_create_context_es2_profile,
GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info,
GLX_EXT_visual_rating, GLX_SGI_swap_control, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_ARB_get_proc_address
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile
OpenGL version string: 1.4 (3.0 Mesa 9.0.2)
OpenGL extensions:

Should i just try reinstalling?

Okay Reinstalled and Followed it again.

I DID the add group thing in YAST but everytime i run optirun i get a black screen and this

user@linux-ur4v:~> optirun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x21
NVIDIA: could not open the device file /dev/nvidiactl (Permission denied). - that file was there but now its not :S
[VGL] WARNING: The OpenGL rendering context obtained on X display
[VGL] :8 is indirect, which may cause performance to suffer.
[VGL] If :8 is a local X display, then the framebuffer device
[VGL] permissions may be set incorrectly.
Context is Indirect
OpenGL Renderer: GeForce GT 540M/PCIe/SSE2

but ive logged into root now and

suse:~ # optirun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x21
Context is Direct
OpenGL Renderer: GeForce GT 540M/PCIe/SSE2

NO WORRIES why isnt the group working?

but still as root when i run primusrum its intel only

suse:~ # primusrun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x21
Xlib: extension “NV-GLX” missing on display “:3”.
Context is Indirect
OpenGL Renderer: Mesa DRI Intel(R) Sandybridge Mobile
suse:~ #

I can make do as is but is there a way to fix this ive been at it all day?

Cheers

Hi all,

Sorry you experienced trouble getting it to work. I’ll try to point out a couple of things:

  1. Found this morning on a clean install + new users that users need to be in the “video” as well
  2. Read “glxinfo2” where the post said “glxinfo”. I’ll edit the post

Please post output of

systemctl status bumblebeed.service

Mind, testing glxgears is no use until the output shows that primusrun is using the NVIDIA.

Hello,

I’m also trying to get working the nvidia device, following your instruction.

  1. Found this morning on a clean install + new users that users need to be in the “video” as well
  2. Read “glxinfo2” where the post said “glxinfo”. I’ll edit the post

done

systemctl status bumblebeed.service

delivers:


bumblebeed.service - Bumblebee C Daemon
          Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled)
          Active: active (running) since Thu, 2013-03-14 13:22:48 CET; 2min 48s ago
        Main PID: 654 (bumblebeed)
          CGroup: name=systemd:/system/bumblebeed.service
                  └ 654 /usr/sbin/bumblebeed

output of

primusrun glxinfo2 | grep OpenGL

is


Xlib:  extension "NV-GLX" missing on display ":0".
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile 
OpenGL version string: 1.4 (3.0 Mesa 9.0.2)
OpenGL extensions:

thanks in advance for your assistance!

I am having the exact same problem as you, maybe something in the repo’s aren’t working? As root optirun runs well, I think it’s strange some of us are having the exact same problem with these repos… Thanks for all your assistance, please note I have been trying for over a week to setup bumblebee with this particular problem! Thanks!

user@suse:~> systemctl status bumblebeed.service
bumblebeed.service - Bumblebee C Daemon
Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled)
Active: active (running) since Thu, 2013-03-14 22:43:32 EST; 8min ago
Main PID: 557 (bumblebeed)
CGroup: name=systemd:/system/bumblebeed.service
└ 557 /usr/sbin/bumblebeed

user@suse:~> primusrun glxinfo2 | grep OpenGL
Xlib: extension “NV-GLX” missing on display “:0”.
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile
OpenGL version string: 1.4 (3.0 Mesa 9.0.2)
OpenGL extensions:

user@suse:~> primusrun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x21
Xlib: extension “NV-GLX” missing on display “:0”.
Context is Indirect
OpenGL Renderer: Mesa DRI Intel(R) Sandybridge Mobile
61.788580 frames/sec - 60.356380 Mpixels/sec

groups are in check now didnt notice the video one but primsrun is broken somewhere.

how would it go with out it just plain old nvidia?

thankyou so much for looking into it

how would it go with out it just plain old nvidia?

Unfortunatly that will only work if your system has a mux, i.e. has an entry in the BIOS for switching graphics device, few systems has that feature.
Now bumblebee for 12.3 is under development, it will take some time until it works on all systems, meanwhile, if your system doesn’t provide a mux, you might try another approach, in order to prolong your battery life time and make your system run cooler.

Here’s howto:

Uninstall all but dkms in the nvidia.bumblebee repo, keep the repo. you might return to it.
Uninstall all but dkms and dkms-bbswitch in the bumblebee repo, keep the repo.
Blacklist nouveau in /etc/modprobe.d/50-blacklist.conf
Add the following lines to /etc/init.d/boot.local

modprobe bbswitch
tee /proc/acpi/bbswitch <<<OFF

Reboot and confirm that cat /proc/acpi/bbswitch returns OFF. Running on battery check the output of cat /proc/acpi/battery/BAT0/state, switch on the Nvidia card with tee /proc/acpi/bbswitch <<<ON, check battery again. The last check shows what your system consumes without bbswitch. Now switch Nvidia off with tee /proc/acpi/bbswitch <<<OFF, run some tests glxgears a youtube video, maybe you’re pleased with the perfomance of the Intel graphics?

Well,I would really like to play Steam Source games on my openSUSE 12.3, as I have already ditched windows… Can you please provide us a timeframe? Or perhaps an explanation why isn’t this working on 12.3? I appreciate all your efforts, thank you very much!

[HR][/HR]I have also encountered the same issue.

# primusrun glxinfo2
name of display: :0
Xlib:  extension "NV-GLX" missing on display ":0".
display: :0  screen: 0
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
...
# primusrun glxinfo2 | grep OpenGL
Xlib:  extension "NV-GLX" missing on display ":0".
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile 
OpenGL version string: 1.4 (3.0 Mesa 9.0.2)
OpenGL extensions:

Also I have noticed that there are two symbolic links created under /usr/lib64/nvidia:
# ls -l libXvMCNVIDIA_dynamic.so*
lrwxrwxrwx 1 root root 23  Mar 14 23:17 libXvMCNVIDIA_dynamic.so -> libXvMCNVIDIA.so.313.18
lrwxrwxrwx 1 root root 23  Mar 14 23:17 libXvMCNVIDIA_dynamic.so.1 -> libXvMCNVIDIA.so.313.18

# ls -l libXvMCNVIDIA.so.313.18
ls: cannot access libXvMCNVIDIA.so.313.18: No such file or directory

However, the file libXvMCNVIDIA.so.313.18 does not exist. Since the packages download and install the code themselves, I am not sure which packages provide these files. Is it related to the issue we have encountered?

Well, same problem here, but I get it working under my 12.4 x64 installation with the Overman Repo enabled. I opened up /usr/bin/primusrun with my favourite texteditor as root and changed /enabled the following line (deleted # at the front of this line):

export PRIMUS_libGLd=${PRIMUS_libGLd:-'/usr/$LIB/libGL.so.1'}

which does mean the section “# “Displaying” libGL”.

64-Bit Application are working fine with this configuration, for e. g.

primusrun glxspheres

gives the following output:


Polygons in scene: 62464
Visual ID of window: 0xae
Context is Direct
OpenGL Renderer: GeForce GT 650M/PCIe/SSE2
60.769747 frames/sec - 67.819037 Mpixels/sec
60.136818 frames/sec - 67.112689 Mpixels/sec
60.123018 frames/sec - 67.097289 Mpixels/sec

but if I try to start a 32-Bit Application, for e. g. a game with WINE / Crossover. The program itself crashes and says:

primus: fatal: failed to load any of the libraries: /usr/$LIB/nvidia/libGL.so.1
libnvidia-tls.so.310.40: wrong ELF-Class: ELFCLASS64

When I’m trying to start the same application / Game with optirun, X crashes …
Well, primus-32bit is installed, so I don’t get where the problem actually is.

Any suggestions here?

Greetings

Funny noticing… On a clean install of openSUSE 12.3, after adding Overman79’s bumblebee repo, there are no libraries? Does anyone else have the same problem? Thanks in advance!

I think the Overman79’s bumblebee repo moved to:
Index of /repositories/home:/Overman79:/Laptop/openSUSE_12.3

That works for me!

Edit:
I have actually some errors… Yesterday everything was ok, after today’s update i have:

optirun -v glxinfo2
 3887.434483] [INFO]Configured driver: nvidia
 3887.456949] [INFO]Response: No - error: [XORG] (EE) Failed to load module "glamoregl" (module does not exist, 0)

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

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

and:

primusrun glxinfo2 | grep OpenG
Xlib:  extension "NV-GLX" missing on display ":0".
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile 
OpenGL version string: 1.4 (3.0 Mesa 9.0.2)
OpenGL extensions:

I would advice not to use that repo I posted before, it broke my bumblebee installation, the owner is changing the packages names and making other modifications, I think it’s in a sort of beta and not good for use for now!

Like Dreamer4235](https://forums.opensuse.org/members/dreamer4235.html) I also suggest not to use the repository. I ended up with a broken bumblebee installation by this.

Had some issues yesterday. A bumblebee update removed the bumblebee group and it’s members. Furthermore the need to be a “video” group member seems to come and go. A work in progress so to say.

So what repo shall I use? I have tried the above, and it broke my attempt of having bumblebee working… With the exam same error… So what repo shall I use and how shall I install bumblebee, or how long will it take to get it functional? Thanks in advance!

Use this article: Smithfarm - the Brain: openSUSE 12.2: How to install ‘bumblebee’ for NVIDIA Optimus VGA and replace references to Factory and 12.2 by 12.3. Tested this afternoon, works for me.