libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast

I am using openfoam for the first time. After installing openfoam, I get the following error while opening paraview 5.8.0-1: Can someone help me out with this?

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
(   1.299s) [paraview        ]vtkXOpenGLRenderWindow.:637    ERR| vtkXOpenGLRenderWindow (0x55935b9aa1e0): Cannot create GLX context.  Aborting.                          

Loguru caught a signal: SIGABRT
Stack trace:
32      0x55935a67489e paraview(+0x789e) [0x55935a67489e]                            
31      0x7f3e0a0ca023 __libc_start_main + 243                                       
30      0x55935a67459a paraview(+0x759a) [0x55935a67459a]                            
29      0x55935a6798fe paraview(+0xc8fe) [0x55935a6798fe]                            
28      0x55935a67576b paraview(+0x876b) [0x55935a67576b]                            
27      0x7f3e09f4696a pqParaViewBehaviors::pqParaViewBehaviors(QMainWindow*, QObject*) + 1098
26      0x7f3e09eb7b9c pqAlwaysConnectedBehavior::pqAlwaysConnectedBehavior(QObject*) + 332
25      0x7f3e09eb7a25 pqAlwaysConnectedBehavior::serverCheck() + 197
24      0x7f3e09236c89 pqObjectBuilder::createServer(pqServerResource const&, int) + 505
23      0x7f3e082f8a66 vtkSMSession::ConnectToSelf(int) + 134
22      0x7f3e07d69e5f vtkProcessModule::RegisterSession(vtkSession*) + 143
21      0x7f3e05e78932 /usr/bin/../lib/libvtkCommonCore-pv5.8.so.1(+0x4dc932) [0x7f3e05e78932]
20      0x7f3e05ceb839 vtkCallbackCommand::Execute(vtkObject*, unsigned long, void*) + 25
19      0x7f3e084042e9 /usr/bin/../lib/libvtkGUISupportQt-pv5.8.so.1(+0x3f2e9) [0x7f3e084042e9]
18      0x7f3e083ef63e /usr/bin/../lib/libvtkGUISupportQt-pv5.8.so.1(+0x2a63e) [0x7f3e083ef63e]
17      0x7f3e0878a540 /usr/bin/../lib/libQt5Core.so.5(+0x2db540) [0x7f3e0878a540]
16      0x7f3e091d246a /usr/bin/../lib/libpqCore-pv5.8.so.1(+0x7a46a) [0x7f3e091d246a]
15      0x7f3e091cd9e3 pqServerManagerObserver::connectionCreated(long long) + 67
14      0x7f3e0878a540 /usr/bin/../lib/libQt5Core.so.5(+0x2db540) [0x7f3e0878a540]
13      0x7f3e09286f1d pqServerManagerModel::onConnectionCreated(long long) + 797
12      0x7f3e091caa53 pqServerManagerModel::serverAdded(pqServer*) + 67
11      0x7f3e0878a540 /usr/bin/../lib/libQt5Core.so.5(+0x2db540) [0x7f3e0878a540]
10      0x7f3e09f07e65 pqDefaultViewBehavior::onServerCreation(pqServer*) + 85
9       0x7f3e08217cb2 vtkPVSessionCore::GatherInformation(unsigned int, vtkPVInformation*, unsigned int) + 50
8       0x7f3e08217ad6 vtkPVSessionCore::GatherInformationInternal(vtkPVInformation*, unsigned int) + 54
7       0x7f3e03cb1a6a vtkPVRenderingCapabilitiesInformation::CopyFromObject(vtkObject*) + 10
6       0x7f3e03cb1a3a vtkPVRenderingCapabilitiesInformation::GetLocalCapabilities() + 426
5       0x7f3e0779647d vtkOpenGLRenderWindow::SupportsOpenGL() + 989
4       0x7f3e0782eca3 vtkXOpenGLRenderWindow::WindowInitialize() + 19
3       0x7f3e078324a8 vtkXOpenGLRenderWindow::CreateAWindow() + 2696
2       0x7f3e0a0c8857 abort + 299
1       0x7f3e0a0dece5 gsignal + 325
0       0x7f3e0a0ded70 /usr/bin/../lib/libc.so.6(+0x3bd70) [0x7f3e0a0ded70]
(   1.299s) [paraview        ]                       :0     FATL| Signal: SIGABRT
[1]    282166 abort (core dumped)  paraview

Does glxgears work in the same environment? It looks like you’re missing video drivers that OpenGL can use.

Yes when I am typing glxgears, its working. How do I find what driver is need by OpenGL and how do I get it? I tried nvidea-smi, I have NVIDEA−SMI 340.108 installed right now

Hmm. This SO answer seems to indicate that there is a conflict with a mesa library. Are you on 16.04? We’ve had other reports of failures there that are fixed when using it on 18.04 if that’s a possible solution.

I am using Manjaro KDE plasma version 5.18.3. It doesn’t seem to conflict with mesa. But check the last command. Mesa is connected with libgl.

I tried few commands:

Command 1:

➜ ldd ./bin/paraview | grep -i glx.so
libGLX.so.0 => /./bin/…/lib/libGLX.so.0 (0x00007f6caf59b000)

Command 2:

➜ sudo ldconfig -p | grep -i gl.so
[sudo] password for shared1:
libwayland-egl.so.1 (libc6,x86-64) => /usr/lib/libwayland-egl.so.1
libwayland-egl.so.1 (libc6) => /usr/lib32/libwayland-egl.so.1
libwayland-egl.so (libc6,x86-64) => /usr/lib/libwayland-egl.so
libwayland-egl.so (libc6) => /usr/lib32/libwayland-egl.so
libQt5OpenGL.so.5 (libc6,x86-64) => /usr/lib/libQt5OpenGL.so.5
libQt5OpenGL.so (libc6,x86-64) => /usr/lib/libQt5OpenGL.so
libOpenGL.so.0 (libc6,x86-64) => /usr/lib/libOpenGL.so.0
libOpenGL.so.0 (libc6) => /usr/lib32/libOpenGL.so.0
libOpenGL.so (libc6,x86-64) => /usr/lib/libOpenGL.so
libOpenGL.so (libc6) => /usr/lib32/libOpenGL.so
libGL.so.1 (libc6,x86-64) => /usr/lib/nvidia/libGL.so.1
libGL.so.1 (libc6,x86-64) => /usr/lib/libGL.so.1
libGL.so.1 (libc6) => /usr/lib32/nvidia/libGL.so.1
libGL.so.1 (libc6) => /usr/lib32/libGL.so.1
libGL.so (libc6,x86-64) => /usr/lib/nvidia/libGL.so
libGL.so (libc6,x86-64) => /usr/lib/libGL.so
libGL.so (libc6) => /usr/lib32/nvidia/libGL.so
libGL.so (libc6) => /usr/lib32/libGL.so
libEGL.so.1 (libc6,x86-64) => /usr/lib/nvidia/libEGL.so.1
libEGL.so.1 (libc6,x86-64) => /usr/lib/libEGL.so.1
libEGL.so.1 (libc6) => /usr/lib32/nvidia/libEGL.so.1
libEGL.so.1 (libc6) => /usr/lib32/libEGL.so.1
libEGL.so (libc6,x86-64) => /usr/lib/nvidia/libEGL.so
libEGL.so (libc6,x86-64) => /usr/lib/libEGL.so
libEGL.so (libc6) => /usr/lib32/nvidia/libEGL.so
libEGL.so (libc6) => /usr/lib32/libEGL.so

Command 3:

➜ sudo ldconfig -p | grep -i mesa
libOSMesa.so.8 (libc6,x86-64) => /usr/lib/libOSMesa.so.8
libOSMesa.so.8 (libc6) => /usr/lib32/libOSMesa.so.8
libOSMesa.so (libc6,x86-64) => /usr/lib/libOSMesa.so
libOSMesa.so (libc6) => /usr/lib32/libOSMesa.so
libGLX_mesa.so.0 (libc6,x86-64) => /usr/lib/libGLX_mesa.so.0
libGLX_mesa.so.0 (libc6) => /usr/lib32/libGLX_mesa.so.0
libGLX_mesa.so (libc6,x86-64) => /usr/lib/libGLX_mesa.so
libGLX_mesa.so (libc6) => /usr/lib32/libGLX_mesa.so
libEGL_mesa.so.0 (libc6,x86-64) => /usr/lib/libEGL_mesa.so.0
libEGL_mesa.so.0 (libc6) => /usr/lib32/libEGL_mesa.so.0
libEGL_mesa.so (libc6,x86-64) => /usr/lib/libEGL_mesa.so
libEGL_mesa.so (libc6) => /usr/lib32/libEGL_mesa.so

Also, do you think its related to having nvidia-340-xx driver?? I had nvidia 390-xx originally but I am using nvidia-340 xx driver as the main software I am using is more compatible with nvidia 340-xx driver!!

It could be. I don’t think we test with such old versions of the nvidia driver.

Instead of using ParaView from OpenFOAM, can you try with :

Thank you for you replies. I tried switch back to nvidia 390-xx driver… Now it works… Maybe paraview 5.8.0 is not compatible with nvidia 340-xx driver

Thanks… But I am not sure it will make a difference… It seems like the problem was that paraview was not compatible with nvidia-340 xx driver

1 Like