I am using MakieGL on Ubuntu 18.04. It used to work fine, but
after an update it doesn’t work any more.
I updated:
Julia to 1.6.1
MakieGL to latest stable version
and Ubuntu updated the nvidea graphics drivers. The new drivers
did not work at all, so I re-selected the old drivers
(version 340.108).
Now Makie fails. Example code:
# shell> wget https://github.com/libigl/libigl-tutorial-data/raw/master/bumpy-cube.obj
using Makie, FileIO
shape = load("bumpy-cube.obj")
im1 = mesh(shape,color=:red,shading=true)
Error message:
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
┌ Warning: GLFW couldn't create an OpenGL window.
│ This likely means, you don't have an OpenGL capable Graphic Card,
│ or you don't have an OpenGL 3.3 capable video driver installed.
│ Have a look at the troubleshooting section in the GLMakie readme:
│ https://github.com/JuliaPlots/GLMakie.jl#troubleshooting-opengl.
Other opengl apps work fine, like FreeCAD, glxgears and glxspheres.
ufechner@TUD277255:~$ glxinfo | grep "OpenGL version"
OpenGL version string: 4.4.0 NVIDIA 340.108
Similar issue (unsolved): libGL error: failed to load driver: swrast · Issue #211 · JuliaGL/GLFW.jl · GitHub
Any idea?
You should try to google those libgl errors and see if there is a fix… They’re not Julia or Makie specific
Well, they are Makie specific because they appear only when using Makie, not with other OpenGL apps…
I found this link for example, but it doesn’t help:
http://www.codewhirl.com/2016/01/ubuntu-libgl-error-failed-to-load-driver-swrast/
It might be related with links to curtain libGL libraries. On my machine I can see:
ufechner@TUD277255:~$ ldconfig -p | grep libGL.so.1
libGL.so.1 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libGL.so.1
libGL.so.1 (libc6) => /usr/lib/i386-linux-gnu/libGL.so.1
What I find strange: Julia also installs these libraries:
/home/ufechner/.julia/artifacts/a84cc58d5161b950f268bb562e105bbbf4d6004a/lib/libGL.so.1
/home/ufechner/.julia/artifacts/a84cc58d5161b950f268bb562e105bbbf4d6004a/lib/libGL.so.1.7.0
Well, makie worked before as you said, so it doesn’t do anything wrong in general
It’s likely, that the other apps don’t require OpenGL 3.3, which may trigger different bugs in the os driver integration
Yeah, maybe the linking has changed, so in that sense it may be julia and Linux related what I meant to say is, that there is likely not much that can be done in Makie, since the error is thrown in GLFW + Libgl
Which package is installing
.julia/artifacts/a84cc58d5161b950f268bb562e105bbbf4d6004a/lib/libGL.so.1
?
I guess that gets raked in by GLFW.jl
Building GLFW succeeds, running it does not succeed. How can I find out which libraries are actually beeing used if I run:
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[2]:1
julia>