OpenGL issues with mrtrix3's mrview utility

Issue reported:

mrview: [WARNING] unable to determine OpenGL version - operation may be unstable if actual version is less than 3.3

[xcb] Too much data requested from _XRead

[xcb] This is most likely caused by a broken X extension library

[xcb] Aborting, sorry about that.

mrview: …/…/src/xcb_io.c:736: _XRead: Assertion `!xcb_xlib_too_much_data_requested’ failed.

Aborted

Solution:

If connected to your workstation via x2go, you are using indirect rendering and the standard Ubuntu Mesa OpenGL version is old, try this:

(export LD_PRELOAD=/opt/nvidia/nsight-systems/2021.1.3/host-linux-x64/Mesa/libGL.so && /opt/mrtrix3/bin/mrview $SomeImage.nii)

if connected via nomachine, you will be using direct rendering and using the OpenGL version provided by the NVIDIA driver and that should meet the OpenGL requirement.