Open aramirezreyes opened 1 year ago
Can you try creating a window with GLFW.jl? https://www.glfw.org/docs/latest/window_guide.html#window_hints_ctx I'm not 100% sure how to put this together, but if you can create a GLFW window with those docs, we should be able to get GLMakie to run... It does look a bit like GLFW should just automatically use EGL if present?
Thanks, Simon!
So I did the following:
aramreye@perlmutter:login31:~/TestGLMakie> export DISPLAY=:99.0
aramreye@perlmutter:login31:~/TestGLMakie> Xvfb :99 -screen 0 640x480x24 &
[1] 261483
aramreye@perlmutter:login31:~/TestGLMakie> julia --project=@.
aramreye@perlmutter:login31:~/TestGLMakie> julia --project=@.
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.9.0-beta4 (2023-02-07)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using GLFW
julia> ch = GLFW.standard_context_hints(3,3)
4-element Vector{Tuple{UInt32, Integer}}:
(0x00022002, 3)
(0x00022003, 3)
(0x00022006, 1)
(0x00022008, 0x00032001)
julia> push!(ch,(GLFW.CONTEXT_CREATION_API,GLFW.EGL_CONTEXT_API))
5-element Vector{Tuple{UInt32, Integer}}:
(0x00022002, 3)
(0x00022003, 3)
(0x00022006, 1)
(0x00022008, 0x00032001)
(0x0002200b, 0x00036002)
julia> GLFW.Window(;contexthints=ch)
ERROR: GLFWError (API_UNAVAILABLE): EGL: Failed to get EGL display: Success
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] kwcall(::NamedTuple{(:contexthints,), Tuple{Vector{Tuple{UInt32, Integer}}}}, ::Type{GLFW.Window})
@ GLFW ~/.julia/packages/GLFW/BWxfF/src/glfw3.jl:302
[5] top-level scope
@ REPL[7]:1
Should I do something to manually point GLFW.jl
to the suggested libraries of the first post?
Wait, I probably tried the incorrect constructor. Doing
julia> window = GLFW.CreateWindow(640, 480, "GLFW.jl")
ERROR: GLFWError (FORMAT_UNAVAILABLE): EGL: Failed to find a suitable EGLConfig
Seems like it is going in the right direction...
You can draw directly in repl session via SixelTerm
using CairoMakie
using SixelTerm
One thing to note that you need terminal that suport sixel graphics
You seem to have the wrong window hints.
What does GLFW.Window()
actually do?
You can draw directly in repl session via SixelTerm
using CairoMakie using SixelTerm
One thing to note that you need terminal that suport sixel graphics
Thanks @Yaraslaut! I do use CairoMakie in this system. However, I a exploring the possibility of profiting from the gpus that it has!
You seem to have the wrong window hints. What does
GLFW.Window()
actually do?
By itself I get this:
julia> GLFW.Window()
ERROR: GLFWError (VERSION_UNAVAILABLE): GLX: Forward compatibility requested but GLX_ARB_create_context_profile is unavailable
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:302
[5] top-level scope
@ REPL[2]:1
Thanks for the patience, Simon. I know almost nothing about this. If I look here, it appears that this error comes from glx_context.c but there is another file egl_context.c, does it mean that we are not detecting the context correctly?
Now, if I set the context hints again I do get the weird error message of succes:
julia> using GLFW
julia> ch = GLFW.standard_context_hints(3,3)
4-element Vector{Tuple{UInt32, Integer}}:
(0x00022002, 3)
(0x00022003, 3)
(0x00022006, 1)
(0x00022008, 0x00032001)
julia> GLFW.Window(;contexthints=ch)
ERROR: GLFWError (API_UNAVAILABLE): EGL: Failed to get EGL display: Success
Stacktrace:
[1] _ErrorCallbackWrapper(code::Int32, description::Cstring)
@ GLFW ~/.julia/packages/GLFW/OAHhH/src/callback.jl:43
[2] CreateWindow(width::Int64, height::Int64, title::String, monitor::GLFW.Monitor, share::GLFW.Window)
@ GLFW ~/.julia/packages/GLFW/OAHhH/src/glfw3.jl:504
[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/OAHhH/src/glfw3.jl:344
[4] kwcall(::NamedTuple{(:contexthints,), Tuple{Vector{Tuple{UInt32, Integer}}}}, ::Type{GLFW.Window})
@ GLFW ~/.julia/packages/GLFW/OAHhH/src/glfw3.jl:302
[5] top-level scope
@ REPL[5]:1
Try just setting the egl windowhint before GLFW.Window(),theyre global state
Ah! Thanks!
I seem to understand that glfw does not support this kind of yet: https://github.com/glfw/glfw/issues/1882
There are two stale PRs:
https://github.com/glfw/glfw/pull/1608 https://github.com/glfw/glfw/issues/1592
Hi!
I would like to get some help here. I am trying to run GLMakie on the Perlmutter supercomputer. I want to profit from its GPUs to do some nice visualizations using GLMakie.
Two possibilities: One is on Jupyter through jupyterhub and one through ssh.
The catch: there is no X11 server and no
xvfb-run
. I opened a ticket with support and I got this answer back:From what I can see, GLFW does suppport the thing called EGL, and for python thought the library
moderngl
the way to use it would be like thisIs it possible to make GLMakie run with EGL?
Thanks.