Geant4 visualisation showing a blank screen, but can be interacted with

Hi all, trying to visualise my geometry with a G4 application and I see nothing in the window its just black, but I can click on stuff and it will tell me which piece of material I have clicked, I just can’t see it.

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Info in <TGeoManager::Import>: Reading geometry from file: ../output/a2mcApparatus_0.root
Info in <TGeoManager::CloseGeometry>: Geometry loaded from file...
Info in <TGeoManager::SetTopVolume>: Top volume is World. Master volume is World
Info in <TGeoNavigator::BuildCache>: --- Maximum geometry depth set to 100
Info in <TGeoManager::CloseGeometry>: Voxelization retrieved from file
Info in <TGeoManager::CountLevels>: max level = 3, max placements = 72
Info in <TGeoManager::CloseGeometry>: 201 nodes/ 59 volume UID's in Alpha2 Apparatus Geometry
Info in <TGeoManager::CloseGeometry>: ----------------modeler ready----------------
Info in <TGeoNodeMatrix::CheckOverlaps>: Checking overlaps for World and daughters within 0.01
Check overlaps:      [==========]  201 [100.00 %]           00:00
Info in <TGeoNodeMatrix::CheckOverlaps>: Number of illegal overlaps/extrusions : 0

This is the output I get. I am wondering if the

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

is the issue.

I tried googling (nvidia - Steam: libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast - Ask Ubuntu) but none of the solutions worked for me.

This is what I see:

But if I click randomly in the void (on the star):

You can see it selects my piece (oxford_mag) but I still can’t see it.

Any help appreciated. Cheers


Please read tips for efficient and successful posting and posting code

_ROOT Version:6.24
_Platform:ubuntu 20.04
Compiler: Not Provided


As it is a Geant4 question may be should should as Geant4 people ?

It seems that there’s something wrong with your mesa / libGL installation. Do you encounter the same problems if you run

$ glxinfo
# or
$ glxgears_fbconfig

?

Cheers,
J

Yup same error at the beggining:

name of display: 192.168.1.14:0.0
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
display: 192.168.1.14:0  screen: 0
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_OML_swap_method, GLX_SGIS_multisample,
    GLX_SGIX_fbconfig, GLX_SGIX_hyperpipe, GLX_SGIX_swap_barrier,
    GLX_SGI_make_current_read
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context,
    GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile,
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
    GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample,
    GLX_ATI_pixel_format_float, GLX_EXT_buffer_age,
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
    GLX_EXT_import_context, GLX_EXT_no_config_context, GLX_EXT_swap_control,
    GLX_EXT_swap_control_tear, GLX_EXT_texture_from_pixmap,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_INTEL_swap_event,
    GLX_MESA_copy_sub_buffer, GLX_MESA_multithread_makecurrent,
    GLX_MESA_query_renderer, GLX_MESA_swap_control, GLX_NV_float_buffer,
    GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGIS_multisample,
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
    GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.2
GLX extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_OML_swap_method,
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGI_make_current_read
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce RTX 2060/PCIe/SSE2
OpenGL version string: 1.2 (4.6.0 NVIDIA 512.78)
OpenGL extensions:
    GL_ARB_depth_texture, GL_ARB_imaging, GL_ARB_multitexture,
    GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_shadow,
    GL_ARB_texture_border_clamp, GL_ARB_texture_cube_map,
    GL_ARB_texture_env_add, GL_ARB_texture_env_combine,
    GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3,
    GL_ARB_texture_mirrored_repeat, GL_ARB_texture_rectangle,
    GL_ARB_transpose_matrix, GL_ARB_window_pos, GL_ATI_texture_mirror_once,
    GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, GL_EXT_blend_func_separate,
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_draw_range_elements,
    GL_EXT_fog_coord, GL_EXT_multi_draw_arrays, GL_EXT_packed_pixels,
    GL_EXT_point_parameters, GL_EXT_rescale_normal, GL_EXT_secondary_color,
    GL_EXT_separate_specular_color, GL_EXT_shadow_funcs,
    GL_EXT_stencil_two_side, GL_EXT_stencil_wrap, GL_EXT_texture3D,
    GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add,
    GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3, GL_EXT_texture_lod,
    GL_EXT_texture_lod_bias, GL_EXT_texture_object, GL_EXT_texture_rectangle,
    GL_EXT_vertex_array, GL_IBM_texture_mirrored_repeat,
    GL_INGR_blend_func_separate, GL_NV_blend_square, GL_NV_point_sprite,
    GL_NV_texgen_reflection, GL_NV_texture_rectangle, GL_SGIS_generate_mipmap,
    GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp,
    GL_SGIS_texture_lod, GL_SGIX_depth_texture, GL_SGIX_shadow,
    GL_SUN_multi_draw_arrays

32 GLX Visuals
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x022 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x023 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0  0  0 16 16 16 16  0 0 None
0x024 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0  0  8  0  0  0  0  0 0 None
0x025 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0  0  8 16 16 16 16  0 0 None
0x026 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x027 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0  0  0 16 16 16 16  0 0 None
0x028 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0  0  8  0  0  0  0  0 0 None
0x029 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0  0  8 16 16 16 16  0 0 None
0x02a 24 tc  1  24  0 r  . .   8  8  8  0 .  .  2  0  0  0  0  0  0  0 0 None
0x02b 24 tc  1  24  0 r  . .   8  8  8  0 .  .  2  0  0 16 16 16 16  0 0 None
0x02c 24 tc  1  24  0 r  . .   8  8  8  0 .  .  2  0  8  0  0  0  0  0 0 None
0x02d 24 tc  1  24  0 r  . .   8  8  8  0 .  .  2  0  8 16 16 16 16  0 0 None
0x02e 24 tc  1  24  0 r  y .   8  8  8  0 .  .  2  0  0  0  0  0  0  0 0 None
0x02f 24 tc  1  24  0 r  y .   8  8  8  0 .  .  2  0  0 16 16 16 16  0 0 None
0x030 24 tc  1  24  0 r  y .   8  8  8  0 .  .  2  0  8  0  0  0  0  0 0 None
0x031 24 tc  1  24  0 r  y .   8  8  8  0 .  .  2  0  8 16 16 16 16  0 0 None
0x032 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0 24  0  0  0  0  0  0 0 None
0x033 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0 24  0 16 16 16 16  0 0 None
0x034 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x035 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0 24  8 16 16 16 16  0 0 None
0x036 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0 24  0  0  0  0  0  0 0 None
0x037 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0 24  0 16 16 16 16  0 0 None
0x038 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x039 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16 16  0 0 None
0x03a 24 tc  1  24  0 r  . .   8  8  8  0 .  .  2 24  0  0  0  0  0  0 0 None
0x03b 24 tc  1  24  0 r  . .   8  8  8  0 .  .  2 24  0 16 16 16 16  0 0 None
0x03c 24 tc  1  24  0 r  . .   8  8  8  0 .  .  2 24  8  0  0  0  0  0 0 None
0x03d 24 tc  1  24  0 r  . .   8  8  8  0 .  .  2 24  8 16 16 16 16  0 0 None
0x03e 24 tc  1  24  0 r  y .   8  8  8  0 .  .  2 24  0  0  0  0  0  0 0 None
0x03f 24 tc  1  24  0 r  y .   8  8  8  0 .  .  2 24  0 16 16 16 16  0 0 None
0x040 24 tc  1  24  0 r  y .   8  8  8  0 .  .  2 24  8  0  0  0  0  0 0 None
0x041 24 tc  1  24  0 r  y .   8  8  8  0 .  .  2 24  8 16 16 16 16  0 0 None

32 GLXFBConfigs:
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x022 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x023 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0  0  0 16 16 16 16  0 0 None
0x024 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0  0  8  0  0  0  0  0 0 None
0x025 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0  0  8 16 16 16 16  0 0 None
0x026 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x027 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0  0  0 16 16 16 16  0 0 None
0x028 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0  0  8  0  0  0  0  0 0 None
0x029 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0  0  8 16 16 16 16  0 0 None
0x02a 24 tc  1  24  0 r  . .   8  8  8  0 .  .  2  0  0  0  0  0  0  0 0 None
0x02b 24 tc  1  24  0 r  . .   8  8  8  0 .  .  2  0  0 16 16 16 16  0 0 None
0x02c 24 tc  1  24  0 r  . .   8  8  8  0 .  .  2  0  8  0  0  0  0  0 0 None
0x02d 24 tc  1  24  0 r  . .   8  8  8  0 .  .  2  0  8 16 16 16 16  0 0 None
0x02e 24 tc  1  24  0 r  y .   8  8  8  0 .  .  2  0  0  0  0  0  0  0 0 None
0x02f 24 tc  1  24  0 r  y .   8  8  8  0 .  .  2  0  0 16 16 16 16  0 0 None
0x030 24 tc  1  24  0 r  y .   8  8  8  0 .  .  2  0  8  0  0  0  0  0 0 None
0x031 24 tc  1  24  0 r  y .   8  8  8  0 .  .  2  0  8 16 16 16 16  0 0 None
0x032 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0 24  0  0  0  0  0  0 0 None
0x033 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0 24  0 16 16 16 16  0 0 None
0x034 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x035 24 tc  1  24  0 r  . .   8  8  8  0 .  .  0 24  8 16 16 16 16  0 0 None
0x036 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0 24  0  0  0  0  0  0 0 None
0x037 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0 24  0 16 16 16 16  0 0 None
0x038 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x039 24 tc  1  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16 16  0 0 None
0x03a 24 tc  1  24  0 r  . .   8  8  8  0 .  .  2 24  0  0  0  0  0  0 0 None
0x03b 24 tc  1  24  0 r  . .   8  8  8  0 .  .  2 24  0 16 16 16 16  0 0 None
0x03c 24 tc  1  24  0 r  . .   8  8  8  0 .  .  2 24  8  0  0  0  0  0 0 None
0x03d 24 tc  1  24  0 r  . .   8  8  8  0 .  .  2 24  8 16 16 16 16  0 0 None
0x03e 24 tc  1  24  0 r  y .   8  8  8  0 .  .  2 24  0  0  0  0  0  0 0 None
0x03f 24 tc  1  24  0 r  y .   8  8  8  0 .  .  2 24  0 16 16 16 16  0 0 None
0x040 24 tc  1  24  0 r  y .   8  8  8  0 .  .  2 24  8  0  0  0  0  0 0 None
0x041 24 tc  1  24  0 r  y .   8  8  8  0 .  .  2 24  8 16 16 16 16  0 0 None

Are you doing X11 forwarding (via, e.g. ssh)? If so, the mesa DRI software rasterizer (swrast or llvmpipe) has to be installed in the machine where your libGL client is running (in this case where root runs).
Refer to the documentation of your GNU/Linux distribution for instructions on how to install the missing package.

Cheers,
J.

Not using X11 forwarding, this is on a local Ubuntu20 WSL2 build. I cannot find anything online that actually works in regards to removing that error, they all say that the package I am trying to install is already up to date. I have even tried reinstalling mesa-utils and libgl1-mesa-glx

Read this thread, maybe it can help:

Ah, fair enough, I was assuming a native GNU/Linux installation where the X11 control communication uses a UNIX socket.

In WSL, connection to the X server happens via a TCP socket (that’s why you see display: 192.168.1.14:0 screen: 0). This means that you probably need to always force indirect rendering (see nvidia - Win10 linux subsystem libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast - Ask Ubuntu).

Let me know if that makes the error go away (and if that actually generates some graphical output).

Cheers,
J.

Ah amazing, that does remove the error, but I still see nothing. I guess those errors were not the cause of the issue…

Hmm… it seems mesa was falling back to indirect rendering anyways.

Do you see any output if you run the command above, or just a black square?

Cheers,
J

I actually get a “command not found” I assume I’m missing that package

Wait I’m confused, isn’t that the same command as earlier in the thread? But also it doesn’t work now… it says command not found

You will have to install the mesa-utils package. Also note that, depending on the version of mesa, if might be glxgears (and not glxgears_fbconfig).

I think you ran glxinfo before.

Okay that was weird, but yes just did it and I see the gears…

That’s good, but then leaves us with the original problem of no GL output on mesa/WSL2, at least for that application and the input file that you are using.

Any chance that I can try to reproduce that locally (steps that you are following, input file, etc.)?

@bellenot, @agheata any other ideas?

Cheers,
J.

Ah I see, yes okay maybe I can create a zip with everything you need, give me a few moments.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.