LEAP 42.1: optirun nvidia poor performance

Hi Guys ,
I have a Alienware laptop with dual video ( intel and nvidia ) .
Everything was working great with opensuse 13.1 , not problem at all switching between video cards with bumblebee and the performance was great .
Now , I updated to leap 42.1 ( clean installation ) and installed the bumblebee drivers from the SLE_12 repo ( baseurl=http://download.opensuse.org/repositories/X11:/Bumblebee/SLE_12/ ) .
The bumblebee is switching all right between videos cards but here is my issue :
Plasma 5 seems to be really slow running on intel video with the effects on , so i started to test my video cards performance .
Testing both of the video cards with glxsphere , I can see that both of them a realllllyy slow , poor performance :
here are the results :
user@Tux:/etc/zypp/repos.d> glxspheres
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x1a4
Context is Direct
OpenGL Renderer: Gallium 0.4 on llvmpipe (LLVM 3.7, 256 bits)
26.424927 frames/sec - 29.490218 Mpixels/sec
30.493835 frames/sec - 34.031120 Mpixels/sec
30.289832 frames/sec - 33.803452 Mpixels/sec
29.644794 frames/sec - 33.083590 Mpixels/sec
29.575693 frames/sec - 33.006473 Mpixels/sec

I use to get more than 50 frame/sec on opensuse 13.1

user@Tux:/etc/zypp/repos.d> optirun glxspheres
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x21
Context is Direct
OpenGL Renderer: GeForce GTX 765M/PCIe/SSE2
62.319111 frames/sec - 69.548128 Mpixels/sec
68.810007 frames/sec - 76.791968 Mpixels/sec
78.871256 frames/sec - 88.020322 Mpixels/sec
75.583205 frames/sec - 84.350857 Mpixels/sec
76.704634 frames/sec - 85.602371 Mpixels/sec

I use to get more than 300 frames/sec opensuse 13.1

If I try with primus , I got a segmentation fault :

user@Tux:/etc/zypp/repos.d> primusrun glxspheres
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x1a4
Segmentation fault

Any help will be much appreciate .
Cheers ,
GB

You are not using the Leap version of Bumblebee available here : any reason for that?
And it seems that your 13.1 results were obtained with the proprietary Nvidia driver installed, maybe you are using Nouveau now…

I can recommend as the sole repository for bumblebee, bbswitch etc. the repository

http://download.opensuse.org/repositories/X11:/Bumblebee/openSUSE_Leap_42.1/

I exclusively take packages from there, if available there, no mixing up with other repositories, even the main repository.

If you need a tutorial, I took this one for Leap 42.1:

https://forums.opensuse.org/showthread.php/505270-ultimate-tutorial-installing-Bumblebee-driver-for-SUSE

It worked well, apart from the fact, that one should rebuild the initrd with

mkinitrd

each time one changes the kernel modules concerning configuration files, like changing bbswitch.conf.

I didn’t respect the ‘add option “nouveau.modeset=0” to the end of boot loader option from “Yast–>boot loader–>Boot Loader option–>optional kernel command line parameter”’ advice though.

Looked everywhere and could not find this repo , thanks a lot .

Thanks mate , really appreciate your time .
I did everything as the tutorial but Unfortunately I have the exactly same result

glxsphere result :
** user@Tux:~> glxspheres **
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x1a4
Context is Direct
OpenGL Renderer: Gallium 0.4 on llvmpipe (LLVM 3.7, 256 bits)
29.971654 frames/sec - 33.448366 Mpixels/sec
30.679556 frames/sec - 34.238384 Mpixels/sec
30.703419 frames/sec - 34.265016 Mpixels/sec
31.759147 frames/sec - 35.443208 Mpixels/sec
31.188123 frames/sec - 34.805945 Mpixels/sec

optirun glxspheres:

**user@Tux:~> optirun glxspheres **
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x21
Context is Direct
OpenGL Renderer: GeForce GTX 765M/PCIe/SSE2
75.390625 frames/sec - 84.135938 Mpixels/sec
78.672045 frames/sec - 87.798003 Mpixels/sec
82.051430 frames/sec - 91.569396 Mpixels/sec
79.201195 frames/sec - 88.388533 Mpixels/sec

an still getting segmentation faulty with primus:

**user@Tux:~> primusrun glxspheres **
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x1a4
Segmentation fault

so , not sure what to do to improve the nvidia video card ? any help/ideas are welcome .
Cheers
GB

This looks like you were running in a Virtual machine: on bare metal the default driver for Intel integrated graphics should be the i915.
Try “lsmod”; I get:


bruno@LT_B:~> lsmod |grep i915
i915                 1212416  8 
i2c_algo_bit           16384  1 i915
drm_kms_helper        135168  1 i915
drm                   389120  11 i915,drm_kms_helper,nvidia
video                  36864  2 i915,asus_wmi
button                 16384  1 i915


bruno@LT_B:~> glxspheres
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0xb5
Context is Direct
OpenGL Renderer: Mesa DRI Intel(R) Haswell Mobile 

I haven’t installed LEAP on Optimus bare metal yet, but current Tumbleweed should not be far away and Leap install on my test laptop shows better results compared to 13.2 and similar to 13.1 IIRC.

For a few reference performances with virtualGL / OpenGL with several graphic chips you might check https://forums.opensuse.org/showthread.php/510130-Poor-performance-of-NVIDIA-driver-on-quot-Optimus-quot-laptop

It’s weird, that, in principle, your bumblebee installation is working, but running too slowly.
Usually either it is working or not.
So you have to check, whether there are any error messages at boot time and later when using the nvidia card with bumblebee.
Here are some tools to find out more about your graphics system:

What is the content of /etc/modprobe.d/50-bbswitch.conf?

nano /etc/modprobe.d/50-bbswitch.conf

Does it differ from:

options bbswitch load_state=-1 unload_state=1

Any changes of 50-bbswitch.conf, like all changes regarding the kernel modules, have to be followed by rebuilding the inital ramdisk with minitrd and rebooting before taking effect.

Which are your graphics cards?

/sbin/lspci | egrep 'VGA|3D'
hwinfo --gfxcard

Which kernel version are you using?

uname -a 

Which bumblebee packages are installed?

zypper info  bbswitch-kmp-default bbswitch bumblebee nvidia-bumblebee  nvidia-bumblebee-32bit primus primus-32bit dkms VirtualGL  VirtualGL-32bit

All should come from obs://build.opensuse.org/X11:Bumblebee and bbswitch-kmp-default should match your kernel version.

Any problems with bumblebee daemon?

systemctl status bumblebeed
optirun -vvv debug-bash

Problems while booting?

dmesg | grep NVRM
dmesg | grep bbswitch
dmesg | grep nvidia

Any error messages in Xorg logs?
For your intel graphics:

nano /var/log/Xorg.0.log

For the Nvidia card, activated by bumblebee/optirun:

nano /var/log/Xorg.8.log

Verify with

lsmod

, which graphics card modules are loaded.
Verify with

nano /etc/modprobe.d/50-blacklist.conf

, that nouveau is blacklisted. mkinitrd has to be executed to get the blacklisting respected on boot time.

For comparison my results:

 /sbin/lspci | egrep 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GK104M [GeForce GTX 670MX] (rev ff)

CPU: i7-3630QM

 optirun glxspheres
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce GTX 670MX/PCIe/SSE2
216.895516 frames/sec - 242.055396 Mpixels/sec
219.431779 frames/sec - 244.885866 Mpixels/sec
224.044705 frames/sec - 250.033891 Mpixels/sec
221.976026 frames/sec - 247.725245 Mpixels/sec
224.902490 frames/sec - 250.991179 Mpixels/sec
222.163892 frames/sec - 247.934903 Mpixels/sec
222.931762 frames/sec - 248.791846 Mpixels/sec
glxspheres
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0xb4
Context is Direct
OpenGL Renderer: Mesa DRI Intel(R) Ivybridge Mobile 
61.349584 frames/sec - 68.466136 Mpixels/sec
60.300014 frames/sec - 67.294815 Mpixels/sec
60.311594 frames/sec - 67.307739 Mpixels/sec
60.336066 frames/sec - 67.335049 Mpixels/sec
60.395992 frames/sec - 67.401927 Mpixels/sec

Thank you guys , after remove the **nomodeset **from the boot loader → kernel Parameters everything works good

user@Tux:~> optirun glxspheres
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce GTX 765M/PCIe/SSE2
288.121773 frames/sec - 321.543899 Mpixels/sec
286.128244 frames/sec - 319.319121 Mpixels/sec
295.221446 frames/sec - 329.467134 Mpixels/sec

user@Tux:~> glxspheres
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0xb3
Context is Direct
OpenGL Renderer: Mesa DRI Intel(R) Haswell Mobile
61.347119 frames/sec - 68.463384 Mpixels/sec
60.006932 frames/sec - 66.967736 Mpixels/sec
60.014290 frames/sec - 66.975948 Mpixels/sec
59.997894 frames/sec - 66.957649 Mpixels/sec

I’m back to DOTA !!!

Really appreciate the help.
GB