Install Mrtrix3 via conda successufly but fail to open in Ubuntu 22.04.3

Hi experts,

I have used mrtrix3 for a while. Recently, I tried to install Mrtrix3 in a new PC with Ubuntu 22.04.3. I created a new conda environment with python 3.11 and execute the following code without any errors:

conda install -c mrtrix3 mrtrix3

However, when I opened a new terminal window and type “mrview”, I got the following errors:

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
libGL error: MESA-LOADER: failed to open nouveau: /usr/lib/dri/nouveau_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: nouveau
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
QOpenGLWidget: Failed to create context
qt.qpa.backingstore: composeAndFlush: QOpenGLContext creation failed
qt.qpa.backingstore: composeAndFlush: makeCurrent() failed
qt.qpa.backingstore: composeAndFlush: makeCurrent() failed
qt.qpa.backingstore: composeAndFlush: makeCurrent() failed
qt.qpa.backingstore: composeAndFlush: makeCurrent() failed

I have installed mrtrix3 in a laptop with Ubuntu 20.04 and a Macbook Pro M1 Pro with Sonoma successfully. But I don’t know how to solve this problem. Could you pls give me some advice. Thanks a lot in advance.

Best,
Roger

The new PC is a desktop computer with intel processor and Nvidia 1060gtx graphics card. Should I install a proper driver for it first? How to do it?

Hi @Roger1219,

Yes, you will need to get your OpenGL drivers set up correctly before mrview works. That’s quite an old card (released 2016), so you may find the latest nvidia drivers no longer support this model. But the nouveau driver should work, it might just need a tweak, such as installing the libglvnd package (this seems to be the way Ubuntu expects OpenGL to be bundled these days).

But if you also want access to CUDA (e.g. to speed up FSL’s eddy, as used in dwifslpreproc, you will probably want to install the official nvidia drivers. You’ll find instructions for that on the Ubuntu website. Note you may need to select an older version of the drivers for this to work with your card.

All the best,
Donald.

Hi @jdtournier,

Thank you for your help. I just checked and found the latest drivers for my graphics card in Ubuntu setting-software update-additional drivers, which should be the Nvidia official driver . I install it and open mrview successfully. However, I don’t know whether I have installed CUDA, while FSL is also needed for my data process. I will go to check it. Thanks again!

Best,
Roger