GLFW.jl icon indicating copy to clipboard operation
GLFW.jl copied to clipboard

No matching fbConfigs or visuals found

Open ufechner7 opened this issue 3 years ago • 3 comments

Using Julia 1.6.1 on Ubuntu 18.04 the following code fails:

julia> using GLFW; GLFW.Window()
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
ERROR: GLFWError (VERSION_UNAVAILABLE): GLX: Failed to create context: BadMatch
Stacktrace:
 [1] _ErrorCallbackWrapper(code::Int32, description::Cstring)
   @ GLFW ~/.julia/packages/GLFW/BWxfF/src/callback.jl:43
 [2] CreateWindow(width::Int64, height::Int64, title::String, monitor::GLFW.Monitor, share::GLFW.Window)
   @ GLFW ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:499
 [3] GLFW.Window(; name::String, resolution::Tuple{Int64, Int64}, debugging::Bool, major::Int64, minor::Int64, windowhints::Vector{Tuple{UInt32, Int64}}, contexthints::Vector{Tuple{UInt32, Integer}}, visible::Bool, focus::Bool, fullscreen::Bool, monitor::Nothing, share::GLFW.Window)
   @ GLFW ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:344
 [4] GLFW.Window()
   @ GLFW ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:316
 [5] top-level scope
   @ REPL[1]:1

julia> 

OpenGL 4.4 is available:

ufechner@TUD277255:~$ glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL core profile version string: 4.4.0 NVIDIA 340.108
OpenGL core profile shading language version string: 4.40 NVIDIA via Cg compiler
OpenGL version string: 4.4.0 NVIDIA 340.108
OpenGL shading language version string: 4.40 NVIDIA via Cg compiler
OpenGL ES profile version string: OpenGL ES 3.1 NVIDIA 340.108 340.108
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
    GL_EXT_separate_shader_objects, GL_EXT_shader_implicit_conversions, 
ufechner@TUD277255:~$ 

I attached the output of "strace -o strace.log julia".

strace.log

Any idea how to debug this? It used to work on the same hardware before, but since an update it doesn't any more.

ufechner7 avatar Apr 25 '21 10:04 ufechner7

Running: "LIBGL_DEBUG=verbose julia" gives the following output:

julia> using GLFW; GLFW.Window()
libGL: screen 0 does not appear to be DRI2 capable
libGL: MESA-LOADER: dlopen(/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so)
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/ufechner/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/ufechner/.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
ERROR: GLFWError (VERSION_UNAVAILABLE): GLX: Failed to create context: BadMatch
Stacktrace:
 [1] _ErrorCallbackWrapper(code::Int32, description::Cstring)
   @ GLFW ~/.julia/packages/GLFW/BWxfF/src/callback.jl:43
 [2] CreateWindow(width::Int64, height::Int64, title::String, monitor::GLFW.Monitor, share::GLFW.Window)
   @ GLFW ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:499
 [3] GLFW.Window(; name::String, resolution::Tuple{Int64, Int64}, debugging::Bool, major::Int64, minor::Int64, windowhints::Vector{Tuple{UInt32, Int64}}, contexthints::Vector{Tuple{UInt32, Integer}}, visible::Bool, focus::Bool, fullscreen::Bool, monitor::Nothing, share::GLFW.Window)
   @ GLFW ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:344
 [4] GLFW.Window()
   @ GLFW ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:316
 [5] top-level scope
   @ REPL[1]:1

julia> 

ufechner7 avatar Apr 25 '21 10:04 ufechner7

Some more background info: https://forums.developer.nvidia.com/t/multiple-glx-client-libraries-in-the-nvidia-linux-driver-installer-package/41308

But I still don't understand WHICH .so files are actually needed for GLFW.jl to work.

ufechner7 avatar Apr 25 '21 15:04 ufechner7

The same problem with Julia 1.8.2 on Ubuntu 22.04.

Ossifragus avatar Oct 25 '22 13:10 Ossifragus