Optimus is a kind of computer with an Intel video card backed for 3D computing by an NVIDIA video card. A real pain in the ass to configure. This one is on an ASUS N550 laptop.

On this page... (hide)

  1.   1.  Plain intel
  2.   2.  Optimus
  3.   3.  Starting from scratch
  4.   4.  Debugging
    1.   4.1  As user
    2.   4.2  As root
  5.   5.  Kernel
  6.   6.  Installing Bumblebee
  7.   7.  using forum

1.  Plain intel

If, at start, you install as default you get a not so bad 60 frames/s (glxspheres) display. Using optimus, you can hope to have up to 160 f/s. You can also hope to go from 1366x768 display to the full HD 1920x1080 that is on the machine (hopefully).

Intel basic is x86-video-intel package in YaST.

2.  Optimus

The tool to use optimus is "bumblebee" with the commands "optirun" and "primusrun".

The openSUSE page on the subject is only validated for Leap 42.2, may be it's why I had problems:

https://en.opensuse.org/SDB:NVIDIA_Bumblebee

What is kinda difficult is than as this is not immediate, you have to make several test iterations and this may keep in the system unwanted trash that prevent correct working.

First thing is that I could very well accept to have the Nvidia graphic adapter to run constantly, but I couldn't get it. Only the Intel one provide display...

I didn't create a snapshot, anyway no of my present snapshot accept to boot...

On Leap 42.3, Bumblebee is standard in the repos, no need to add an other one

3.  Starting from scratch

After some time of fiddling, you may be lost on what you have running. Here some steps you can do to go back bare bone.

In Yast, you may have a repository "nvidia". Select the repository view, right click in the package windows, "all in this list", "remove all". This is the only way to really remove the nvidia drivers (if you deselect only one, an other is automatically selected). Validate.

Go to /etc/X11/xorg.conf.d/ as root, then "grep nvidia *" and comment out any info. The bare files have only comments, so comment all what could have been added manually.

also remove /etc/X11/xorg.conf if any (or rename it to keep the content.

Then reboot, you should (hopefully) get a minimal graphical login.

If ever you don't get any usable screen, restart the computer and go to the grub menu. As soon as the grub menu come, press "e" (the key "E"), this lead you to the grub editor.

With the cursor arrows, go to the "linux..." line. The "end" key send you to the end of the line. remove all the options on right of the resume option, then add the number "3" (type 3, without quotes. Then F10 should boot you in console mode, where you can login and use yast or fix the problems.

4.  Debugging

There are lot of things you can do to debug. Some things like xrander have to be done from user graphical session, others like editing config files have to be done from root, eventually on terminal login.

Discussion on openSUSE forum

forum

4.1  As user

See here http://dodin.org/wiki/pmwiki.php?n=Doc.AddXResolution

You can also use glxspheres to compute frame speed and other xrandr options.

 glxinfo | grep OpenGL

> DRI_PRIME=1 glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
63058 frames in 5.0 seconds = 12611.530 FPS
65706 frames in 5.0 seconds = 13141.032 FPS
65580 frames in 5.0 seconds = 13116.000 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 390157 requests (390157 known processed) with 0 events remaining.
jdd@linux-owxt:~> glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
303 frames in 5.0 seconds = 60.443 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 1424 requests (1424 known processed) with 0 events remaining.

> DRI_PRIME=1 vblank_mode=0 glxspheres 
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
Visual ID of window: 0xcc
Context is Direct
OpenGL Renderer: Mesa DRI Intel(R) Haswell Mobile
278.135247 frames/sec - 310.398936 Mpixels/sec
236.548003 frames/sec - 263.987571 Mpixels/sec
228.816889 frames/sec - 236.956655 Mpixels/sec
244.373569 frames/sec - 213.934397 Mpixels/sec


vblank_mode=0 glxspheres
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
Visual ID of window: 0xcc
Context is Direct
OpenGL Renderer: Mesa DRI Intel(R) Haswell Mobile
289.221488 frames/sec - 322.771180 Mpixels/sec
248.459156 frames/sec - 277.280418 Mpixels/sec
241.233564 frames/sec - 269.216657 Mpixels/sec
248.060248 frames/sec - 276.835237 Mpixels/sec

4.2  As root

Use zypper to configure your system. It's often easier than YaST, because it allows copy/paste.

Edit the config files in /etc/X11 and under.

use VI or your preferred editor to edit.

Use ldconfig if you change something in the libraries (link to module...).

Use mkinitrd to rebuild the initrd boot system.

look at X logs:

 # less /var/log/Xorg.0.log

Look for "DDC" (https://en.wikipedia.org/wiki/Display_Data_Channel), EDID (https://en.wikipedia.org/wiki/Extended_Display_Identification_Data), vga...

install and use glmark2

5.  Kernel

Bumblebee is very much kernel dependent. Installing the very last kernel may make something work. Right now (september 27, 2017), KOTD saved my life with linux-owxt.suse 4.14.0-rc1-3.g6627c5a-default that made nouveau work with optirun.

6.  Installing Bumblebee

Go to yast, search for bumblebee, right clic, all in this list, install...

You can as well type or copy in a root terminal:

 zypper in bumblebee bbswitch

Then subscribe your user to video and bumblebee groups either with YaST or with:

 usermod -aG bumblebee <username>
 usermod -aG video <username>

(this will only be active at the next login)

Then validate the service, either with YaST, system, service manager or:

 systemctl enable bumblebeed
 systemctl start bumblebeed

(warning: don't miss the "d" at the end of bumblebee, for "daemon").

Blacklist nouveau that shouldn't be started before bumblebee:

 echo "blacklist nouveau" | tee -a /etc/modprobe.d/99-local.conf

or simply write "Blacklist nouveau" in the /etc/modprobe.d/99-local.conf file.

Then prepare the boot with

 mkinitrd

Check in /etc/bumblebee/bumblebee.conf if Driver=nouveau as it should.

7.  using forum

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

better use zypper se --installed-only nvidia, then remove all what is in the nvidia repo.

 # ll -R /etc/sysconfig/n* | grep nvidia

 # zypper in xf86-video-intel

bumblebee in now in main repo

nvidia-bumblebee do not exist anymore, trying OBS

don't works