Mrview not working

I cannot get mrview to work. I do not receive an error message, but nothing happens in my terminal. I am less inclined to say it is an issue with OpenGL, as shview works perfectly fine.

When I type "mrview -debug’, I get
“mrview: [DEBUG] No config file found at “/etc/mrtrix.conf”
mrview: [DEBUG] No config file found at “/home/anna/.mrtrix.conf””

What should this config file look like and how can I generate it?

I’m working with Ubuntu 20.04.

Thank you for any help with this!

Hi @annamachado,

OK, that’s the first time I’ve come across an issue like this… Can you provide a bit more information, specifically:

  • are you running Ubuntu 20.04 directly on your system (bare metal), or via a Virtual Machine, or via the Windows Subsystem for Linux (WSL)?

  • is this the latest version of MRtrix? What does mrinfo -version report?

  • was MRtrix installed from source, or via Anaconda, or some other route?

  • does mrview -version or mrview -help work as expected? These should be terminal only.

  • does running with mrview -quiet make any difference?

  • does the command immediately terminate after this message? Does the terminal immediately return to the command prompt? Or does it hang there and require manual interruption?

  • what CPU & GPU is this running on?

  • what does shview report when run the -debug option?

  • There may be scope to inspect where it hangs using the debugger. If you have gdb installed, can you run gdb $(which mrview), then type r at the prompt, and bt when it hangs?

There are probably a bunch of other things to try, but that’s probably more than enough for now…


Hi Donald,

Thank you for your response!

  • I am running Ubuntu directly on my system.

  • I’m pretty sure it is the latest version. mrinfo prints == mrinfo 3.0.4-62-g325dcc12-dirty ==

  • mrview -version and mrview -help both work normally in the terminal

  • nothing happens when I type mrview -quiet (the same as when i type mrview)

  • the command hangs there and requires manual interruption

  • CPU: 12th Gen Intel(R) Core™ i7-12700
    GPU: NVIDIA ( Vendor: NVIDIA Corporation
    Device ID: 220a (for the VGA compatible controller)
    Subsystem: ASUSTeK Computer Inc.
    Kernel driver in use: nouveau)

  • shview -debug reports -

shview: [DEBUG] No config file found at "/etc/mrtrix.conf"
shview: [DEBUG] No config file found at "/home/anna/.mrtrix.conf"
shview: [INFO] GL renderer:  llvmpipe (LLVM 12.0.0, 256 bits)
shview: [INFO] GL version:   4.5 (Core Profile) Mesa 21.2.6
shview: [INFO] GL vendor:    Mesa/
shview: [DEBUG] loading font into OpenGL texture...
shview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec2 pos;
layout(location = 1) in vec2 font_pos;
uniform float scale_x;
uniform float scale_y;
out vec2 tex_coord;
void main () {
  gl_Position = vec4 (pos[0]*scale_x-1.0, pos[1]*scale_y-1.0, 0.0, 1.0);
  tex_coord = font_pos;

shview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
in vec2 tex_coord;
uniform sampler2D sampler;
uniform float red, green, blue;
out vec4 color;
void main () {
  color.ra = texture (sampler, tex_coord).rg;
  color.rgb = color.r * vec3 (red, green, blue);

shview: [DEBUG] font loaded
shview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec3 vertex_in;
layout(location = 1) in vec3 color_in;
uniform mat4 MVP;
uniform vec3 origin;
out vec3 color;
void main () {
  color = color_in;
  gl_Position = MVP * vec4(vertex_in + origin, 1.0);

shview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
in vec3 color;
out vec4 color_out;
void main () {
  color_out = vec4 (color, 1.0);

shview: [INFO] DWI renderer successfully initialised
  • Mrview appeared when I typed gdb $(which mrview) and then r, this was the output:
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/anna/mrtrix3/bin/mrview...
(No debugging symbols found in /home/anna/mrtrix3/bin/mrview)
(gdb) r
Starting program: /home/anna/mrtrix3/bin/mrview 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/".
[New Thread 0x7ffff2c90700 (LWP 5193)]
[New Thread 0x7ffff2444700 (LWP 5194)]
[New Thread 0x7ffff144a700 (LWP 5196)]
[New Thread 0x7ffff0c49700 (LWP 5197)]
[New Thread 0x7fffea474700 (LWP 5198)]
[New Thread 0x7fffe9c73700 (LWP 5199)]
[New Thread 0x7fffe9472700 (LWP 5200)]
[New Thread 0x7fffe8c71700 (LWP 5201)]
[New Thread 0x7fffde849700 (LWP 5202)]
[New Thread 0x7fffde048700 (LWP 5203)]
[New Thread 0x7fffdd847700 (LWP 5204)]
[New Thread 0x7fffdd046700 (LWP 5205)]
[New Thread 0x7fffdc845700 (LWP 5206)]
[New Thread 0x7fffb7fff700 (LWP 5207)]
[New Thread 0x7fffb77fe700 (LWP 5208)]
[New Thread 0x7fffb6ffd700 (LWP 5209)]
[New Thread 0x7fffb67fc700 (LWP 5210)]
[New Thread 0x7fffb5ffb700 (LWP 5211)]
[New Thread 0x7fffb57fa700 (LWP 5212)]
[New Thread 0x7fffb4ff9700 (LWP 5213)]
[New Thread 0x7fff93fff700 (LWP 5214)]
[New Thread 0x7fff937fe700 (LWP 5215)]
[New Thread 0x7fff92ffd700 (LWP 5216)]
[New Thread 0x7fff927fc700 (LWP 5217)]
[New Thread 0x7fff91ffb700 (LWP 5218)]
[New Thread 0x7fff917fa700 (LWP 5219)]
[New Thread 0x7fff90ff9700 (LWP 5220)]
[New Thread 0x7fff73fff700 (LWP 5221)]
[New Thread 0x7fff737fe700 (LWP 5222)]
[New Thread 0x7fff72ffd700 (LWP 5223)]
[New Thread 0x7fff727fc700 (LWP 5224)]
[New Thread 0x7fff71ffb700 (LWP 5225)]
[New Thread 0x7fff717fa700 (LWP 5226)]
[New Thread 0x7fff70ff9700 (LWP 5227)]
[New Thread 0x7fff4ffff700 (LWP 5228)]

What does this suggest?

Thank you so much for your continued help with this!


OK, I’m not sure exactly what the problem is, I am surprised to see literally no output from mrview even with the -debug flag. The gdb output is also not informative unfortunately – maybe if you press Ctrl-C to interrupt the process within the debugger, you’ll be able to issue the bt command and see which function it was stuck in. But given that mrview -help does work as expected, it’s clearly having trouble as soon as it tries to initialise the graphics somehow.

But regardless, no matter what the issue is, I would start by first switching drivers to the official NVIDIA ones. You’re currently using the open-source nouveau driver, which does its best, but you’re running a fairly recent NVIDIA RTX 3080 (as far as I can tell, that’s what ‘device 220A’ corresponds to), and I doubt it’ll be as capable or stable as the official drivers. Since you’re running Ubuntu, it should be relatively straightforward to switch: there’s a page dedicated to this step with all the instructions on there.

Hopefully that’ll fix the problem…


That fixed the issue! Thank you so much!

1 Like