vydd/sketch

Get `GLX visual` problem in Arch Linux, SBCL 1.3.6

liuxueyang opened this issue ยท 10 comments

In Arch Linux, SBCL 1.3.6. Installed SDL2 successfully. Get errors in the hello-world examples:
sketch-screenshot
Any help? Thank you. ;-)

+1 same problem here, Arch Linux and SBCL.

vydd commented

Thanks for reporting. No way to test this now though, so I'll leave the issue open.

Same problem on Fedora 27 and SBCL

It seems that using optirun after deactivating SELinux fixed the problem.
Here are some things that work and don't:

glxgears # it works
optirun glxgears # SDL Error: Couldn't find matching GLX visual
sbcl --load test.lisp # SDL Error: Couldn't find matching GLX visual
optirun sbcl --load test.lisp # SDL Error: Couldn't find matching GLX visual

sudo setenforce permissive # as the Bumblebee package I use has a wrong SELinux policy
glxgears # it works
optirun glxgears # it works
sbcl --load test.lisp # SDL Error: Couldn't find matching GLX visual
optirun sbcl --load test.lisp # it works

To conclude, everything work at the end except running sketch on my Intel GPU (but work on the nvidia one). It seems to be closely linked with the loaded library.

xivh commented

I am having the same problem.

server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
Max core profile version: 3.3
Max compat profile version: 3.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0
OpenGL core profile version string: 3.3 (Core Profile) Mesa 19.1.0 - padoka PPA
OpenGL core profile shading language version string: 3.30
OpenGL version string: 3.1 Mesa 19.1.0 - padoka PPA
OpenGL shading language version string: 1.40
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 19.1.0 - padoka PPA
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

Setting export SDL_VIDEO_X11_VISUALID= changes the error to SDL Error: Could not create GL context.

gbrls commented

image
Same issue in Manjaro, cl-sdl2 works.

vydd commented

Sorry, I still have no idea how to fix this :(

Could you guys maybe edit your posts to include information about which GPUs you're using with which drivers?

gbrls commented

I'm on wayland running on intel skylake. I want to make this work, let me know if you need more information.

Here's what I did on Debian stable:

# set variable to nothing
export SDL_VIDEO_X11_VISUALID=

rlwrap ros run   # I'm using roswell, but this could have been vanilla sbcl too

(ql:quickload :sketch-examples)
(make-instance 'sketch-examples:hello-world)

And that did it.

I followed the advice found on this stackoverflow post

Hope that helps. I ended up having an additional error too, but it was because my system didn't support OpenGL 3.3 when I first tried, and was unrelated to this issue.

I get the "GLX visual" error on Fedora 32 (on wayland) but setting the environment variable SDL_VIDEODRIVER to wayland seems to make things work.

(ql:quickload '(:sketch-examples :uiop))
(setf (uiop:getenv "SDL_VIDEODRIVER") "wayland")
(make-instance 'sketch-examples:hello-world)

Setting SDL_VIDEO_X11_VISUALID didn't seem to work on my system.

Discussion here might be relevant: 3b/cl-opengl#30

If I remember correctly, the problem was a broken /usr/lib/libGL.so symlink. Reinstalling video drivers might help, or maybe fix the link by hand if that is the problem and you can tell what it should be.
-- 3b