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?
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…
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.
To add on, the steps above didn’t fixed the issue that I had.
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
but running this command help resolve the issue and I was able to use mrview after the installation is completed. Just dropping this solution, cause it was hard to find and hope it helps others too.