OpenGL error on startup - Blender 2.80 - bumblebee i can't open Blender 2.80 since it tells me that it requires OpenGL 3.3 to run.
Well, when i start it with my intel graphics adapter everything is fine, but it fails, if i want to start it via optirun / primusrun with my nvidia graphics card, although it supports OpenGL 3.3.  

Output:

Read prefs: /home/daniel/.config/blender/2.80/config/userpref.blend
AL lib: (EE) GetLoadedHrtf: Invalid header in /usr/share/openal/hrtf/default-44100.mhr: "MinPHR02"
AL lib: (EE) GetLoadedHrtf: Failed to load /usr/share/openal/hrtf/default-44100.mhr
AL lib: (EE) GetLoadedHrtf: Invalid header in /usr/share/openal/hrtf/default-48000.mhr: "MinPHR02"
AL lib: (EE) GetLoadedHrtf: Failed to load /usr/share/openal/hrtf/default-48000.mhr
Error! Blender requires OpenGL 3.3 to run. Try updating your drivers.


Here are some (maybe usefull) outputs:  

1.) glxinfo | grep OpenGL

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.2.2
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 18.2.2
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.2.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:


2.) optirun glxinfo | grep OpenGL

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 840M/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 410.57
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 410.57
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:


3.) mhwd -l -d
    --------------------------------------------------------------------------------


  PCI Device: /devices/pci0000:00/0000:00:1c.4/0000:03:00.0 (0302:10de:1341)
      Display controller nVidia Corporation GM108M [GeForce 840M]
      --------------------------------------------------------------------------------
  INSTALLED:


NAME:   video-hybrid-intel-nvidia-bumblebee
ATTACHED:   PCI
VERSION:    2018.08.09
INFO:   Hybrid bumblebee solution for NVIDIA Optimus Technology - Closed source NVIDIA driver &amp; open source intel driver.
PRIORITY:   8
FREEDRIVER: false
DEPENDS:    -
CONFLICTS:  video-intel video-nvidia video-nvidia-304xx video-nvidia-340xx video-nvidia-390xx video-hybrid-intel-nvidia-390xx-bumblebee video-hybrid-intel-nouveau-bumblebee 
CLASSIDS:   0300 0302 0300 
VENDORIDS:  10de 8086 

&gt; AVAILABLE:
...


If i try to force the version to 3.3 (for whatever reason) with MESA_GL_VERSION_OVERRIDE=3.3 and MESA_GLSL_VERSION_OVERRIDE=330 it still outputs version 4.6.  

A bit weird is that i was able to run blender some weeks ago, but changed some stuff in my linux configs which shouldn't have anything to do with my hardware / drivers / etc. The only difference is that i was using gnome on wayland and now i'm using i3 on Xorg.  

Suggestion to fix it are welcome.
Daniel
The issue is not openGL, but OpenAL (deals with sound rendering). Looks like hrtf function is enabled and can't be loaded. Disabling it in openAL configuration file alsoft.ini might help (hrtf=false). It is probably at /usr/share/, but you can look at source https://github.com/kcat/openal-soft/blob/master/alsoftrc.sample for details