Preamble about my situation:

Argh... so I fell for the trap again and updated from 42.2 to 42.3. Once again, it has broken my optimus/nvidia setup (MSI GE70 with intel/GeForce 660M), and my google-fu has failed me in finding an answer. The closest I came was this chap, who has the exact opposite problem I do:

I pre-preemptively purged the nvidia drivers prior to the upgrade in anticipation. They were v. 335 from the old special bumblebee script that would make a custom build from the nvidia .run package.

I then proceeded to follow these steps: and tried both the G03 and G04 variants with no success. Both modules are blacklisted in modprobe.d automatically.

No errors, everything went fine. But now when running anything that tries to make GL calls, I simply get:
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  22
  Current serial number in output stream:  23
Non-GL programs (and optirun nvidia-settings -c :8) work normally. And the latter behaves as one would expect when it is working, i.e. it sees the card, provides GL information, etc.)

There are no EE lines in the Xorg.log for console 8 apart from these, which are expected since card0 is in use by :0

Corei7-2400:~> grep EE /var/log/Xorg.8.log
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   497.593] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
[   498.500] (EE) kbd: <default keyboard>: failed to set us as foreground pgrp (Inappropriate ioctl for device)
[   498.519] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
There is little in the way of errors that more verbose output reveals... both with -vvv and LIBGL_DEBUG=verbose.

The Issue/Fix:

I stumbled on this by chance after peeking at the "tumbleweed" section of the SDB article above. I remembered the old nvidia driver installation used to pull the proper .run files and do a stealth compile of the modules instead of using the ready-made packages. Tumbleweed still has those for the latest (Currently 385) drivers: (nvidia-bumblebee and its -32bit cousin)

  • Purge any installs of the nvidia repo packages (G03, G04, etc). Leave your bumblebee/bbswitch installs alone, it should be fine.
  • Grab the above two RPMs. you'll need libelf-devel to install them, so
    zypper in libelf-devel
  • followed by
    rpm -ivh nvidia-bumblebee-384.98-2.1.x86_64.rpm
    rpm -ivh nvidia-bumblebee-32bit-384.98-2.1.x86_64.rpm
  • Wait.
  • Now run optirun glxinfo again. Tada!

name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions: