You are not logged in.

#1 2016-09-02 10:23:15

fgao
Member
Registered: 2016-09-02
Posts: 3

[Solved] remote GLX error with nvidia-libgl

I am using the latest nvidia driver (370.23-1) for my Quadro K620 graphic card.

I have to use a software on a remote linux computer. I received the following report when I enter "export LIBGL_DEBUG=verbose & glxinfo" on the remote computer through ssh -X.

$ export LIBGL_DEBUG=verbose & glxinfo
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  27
  Current serial number in output stream:  30

This problem can be fixed by replacing nvidia-libgl with mesa-libgl, but I will have the same problem on my local machine.

I've try the solution on https://elrepo.org/bugs/view.php?id=610, but this doesn't work for me.

Does anybody have similar problem?

Many thanks,
Feng


Some information that may help:

$ lspci | grep VGA
03:00.0 VGA compatible controller: NVIDIA Corporation GM107GL [Quadro K620] (rev a2)

$ glxinfo | grep 'dir\|^Open'
direct rendering: Yes
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: Quadro K620/PCIe/SSE2
OpenGL core profile version string: 4.5.0 NVIDIA 370.23
OpenGL core profile shading language version string: 4.50 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
    GL_AMD_multi_draw_indirect, GL_AMD_seamless_cubemap_per_texture, 
    GL_ARB_direct_state_access, GL_ARB_draw_buffers, 
    GL_ARB_draw_indirect, GL_ARB_draw_instanced, GL_ARB_enhanced_layouts, 
    GL_ARB_half_float_vertex, GL_ARB_imaging, GL_ARB_indirect_parameters, 
    GL_ARB_multi_draw_indirect, GL_ARB_multisample, GL_ARB_multitexture, 
    GL_EXT_depth_bounds_test, GL_EXT_direct_state_access, 
    GL_NV_bindless_multi_draw_indirect, 
    GL_NV_bindless_multi_draw_indirect_count, GL_NV_bindless_texture, 
OpenGL version string: 4.5.0 NVIDIA 370.23
OpenGL shading language version string: 4.50 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
    GL_AMD_multi_draw_indirect, GL_AMD_seamless_cubemap_per_texture, 
    GL_ARB_direct_state_access, GL_ARB_draw_buffers, 
    GL_ARB_draw_indirect, GL_ARB_draw_instanced, GL_ARB_enhanced_layouts, 
    GL_ARB_half_float_vertex, GL_ARB_imaging, GL_ARB_indirect_parameters, 
    GL_ARB_multi_draw_indirect, GL_ARB_multisample, GL_ARB_multitexture, 
    GL_EXT_depth_bounds_test, GL_EXT_direct_state_access, 
    GL_NV_bindless_multi_draw_indirect, 
    GL_NV_bindless_multi_draw_indirect_count, GL_NV_bindless_texture, 
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 370.23
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
    GL_EXT_map_buffer_range, GL_EXT_multi_draw_indirect,

$ uname -a
Linux whirlpool 4.7.2-1-ARCH #1 SMP PREEMPT Sat Aug 20 23:02:56 CEST 2016 x86_64 GNU/Linux

Last edited by fgao (2016-09-06 14:19:02)

Offline

#2 2016-09-06 11:27:50

fgao
Member
Registered: 2016-09-02
Posts: 3

Re: [Solved] remote GLX error with nvidia-libgl

Finally I found a solution on https://bugzilla.gnome.org/show_bug.cgi?id=586777#c8.
This solution works perfectly for me.

The idea is to pass a "+iglx" argument to Xorg.

Mark Visser wrote:

To add to John's comment:

Recently, Xorg changed its behavior to disallow indirect GLX by default. This means that ssh -X no longer works with OpenGL applications, which is a pretty serious problem.

The only way to re-enable indirect GLX is to pass +iglx to Xorg. However, GDM has no way to pass arbitrary flags to Xorg.

The only workaround is to rename Xorg to Xorg.original and replace it with a wrapper that adds +iglx, e.g.:

#!/bin/bash
exec /usr/bin/Xorg.original "$@" +iglx

(for you kids at home, don't forget to sudo chmod +x /usr/sbin/Xorg)

This is, as John mentions, horrible.

Also, note that adding a ServerFlags section with AllowIndirectGLXProtocol doesn't work, as the default -iglx of Xorg takes precedent.

Many thanks

Offline

Board footer

Powered by FluxBB