Slicer on WSL2 exited when opening Extension Manager

I’m trying to run Slicer 5.6.2 on WSL2 Ubuntu 22.04. It was installed using tar xzvf. However, whenever I tried to open Extension Manager, Slicer just crashed. Does Slicer not support WSL2 or should I build it instead? Thanks!

Here is the message printed out on the terminal when I opened a Slicer:

Switch to module:  "Welcome"
Sandboxing disabled by user.
An OpenGL Core Profile was requested, but it is not supported on the current platform. Falling back to a non-Core profile. Note that this might cause rendering issues.
error: [/home/chz31/Slicer-5.6.2-linux-amd64/bin/SlicerApp-real] exit abnormally - Report the problem.

Chi,
Running Slicer over WSL2 is not a very good experience. Is there a specific reason you want to do that? In fact if you do have to use WSL2, probably it would be better to use a dockerized version (i.e., run docker from WSL2).

As for the error, it is complaining about openGl. Did you make sure you install the proper WSL2/CUDA driver to support 3D graphics? I only managed to do that with recent Nvidia GPUs. This might help some: CUDA on WSL

Thanks, Murat! You are probably right. Rendering did not use the GPU.

I did not have access to Linux currently and was not sure if my old gaming laptop was compatible with Ubuntu, so I tested it in WSL2. I should probably try JetStream.

I believe I had the driver properly installed. WSL2 actually just used the Nvidia driver installed on Windows. I could install cuda toolkit in WSL2 and trained a deep learning model using the GPU (I used nerfstudio to run our photogrammetry data. I could not figure out how to export a proper 3D model though).

I forgot to attach the error log. It probably did not tell anything useful:

[DEBUG][Qt] 01.07.2024 17:03:05 [] (unknown:0) - Session start time .......: 20240701_170305
[DEBUG][Qt] 01.07.2024 17:03:05 [] (unknown:0) - Slicer version ...........: 5.6.2 (revision 32448 / f10cd8c) linux-amd64 - installed release
[DEBUG][Qt] 01.07.2024 17:03:05 [] (unknown:0) - Operating system .........: Linux / 5.15.153.1-microsoft-standard-WSL2 / #1 SMP Fri Mar 29 23:14:13 UTC 2024 / UTF-8 - 64-bit
[DEBUG][Qt] 01.07.2024 17:03:05 [] (unknown:0) - Memory ...................: 7867 MB physical, 2048 MB virtual
[DEBUG][Qt] 01.07.2024 17:03:05 [] (unknown:0) - CPU ......................: GenuineIntel Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 6 cores, 12 logical processors
[DEBUG][Qt] 01.07.2024 17:03:05 [] (unknown:0) - VTK configuration ........: OpenGL2 rendering, TBB threading
[DEBUG][Qt] 01.07.2024 17:03:05 [] (unknown:0) - Qt configuration .........: version 5.15.2, with SSL, requested OpenGL 3.2 (core profile)
[DEBUG][Qt] 01.07.2024 17:03:05 [] (unknown:0) - Internationalization .....: disabled, language=
[DEBUG][Qt] 01.07.2024 17:03:05 [] (unknown:0) - Developer mode ...........: enabled
[DEBUG][Qt] 01.07.2024 17:03:05 [] (unknown:0) - Application path .........: /home/chz31/Slicer-5.6.2-linux-amd64/bin
[DEBUG][Qt] 01.07.2024 17:03:05 [] (unknown:0) - Additional module paths ..: /home/chz31/extensions/SlicerMorph/SkyscanReconImport, /home/chz31/extensions/SlicerMorph/MeshDistanceMeasurement, /home/chz31/extensions/SlicerMorph/ImportSurfaceToSegment, /home/chz31/extensions/SlicerMorph/SlicerMorphSampleData, /home/chz31/extensions/SlicerMorph/Animator, /home/chz31/extensions/SlicerMorph/MarkupEditor, /home/chz31/extensions/SlicerMorph/ImportFromURL, /home/chz31/extensions/SlicerMorph/MorphologikaLMConverter, /home/chz31/extensions/SlicerMorph/ExportAs, /home/chz31/extensions/SlicerMorph/GPA, /home/chz31/extensions/SlicerMorph/VolumeToModel, /home/chz31/extensions/SlicerMorph/IDAVLMConverter, /home/chz31/extensions/SlicerMorph/MorphoSourceImport, /home/chz31/extensions/SlicerMorph/ProjectSemiLM, /home/chz31/extensions/SlicerMorph/ExportMorphoJLandmarkFile, /home/chz31/extensions/SlicerMorph/ALPACA, /home/chz31/extensions/SlicerMorph/CreateSemiLMPatches, /home/chz31/extensions/SlicerMorph/SegmentEndocranium, /home/chz31/extensions/SlicerMorph/FastModelAlign, /home/chz31/extensions/SlicerMorph/OBJFile, /home/chz31/extensions/SlicerMorph/ImageStacks, /home/chz31/extensions/SlicerMorph/QuickAlign, /home/chz31/extensions/SlicerMorph/FormatMarkups, /home/chz31/extensions/SlicerMorph/HiResScreenCapture, /home/chz31/extensions/SlicerMorph/PseudoLMGenerator, /home/chz31/extensions/SlicerMorph/MorphPreferences, /home/chz31/extensions/SlicerMorph/GEVolImport, /home/chz31/extensions/SlicerMorph/PlaceSemiLMPatches, /home/chz31/extensions/SlicerMorph/MergeMarkups
[WARNING][Qt] 01.07.2024 17:03:12 [] (unknown:0) - libpng warning: iCCP: profile 'ICC Profile': 'CMYK': invalid ICC profile color space
[WARNING][Qt] 01.07.2024 17:03:12 [] (unknown:0) - libpng warning: iCCP: known incorrect sRGB profile
[DEBUG][Python] 01.07.2024 17:03:13 [Python] (/home/chz31/Slicer-5.6.2-linux-amd64/lib/Slicer-5.6/qt-scripted-modules/SubjectHierarchyPlugins/AbstractScriptedSubjectHierarchyPlugin.py:39) - Scripted subject hierarchy plugin registered: SegmentEditor
[DEBUG][Python] 01.07.2024 17:03:13 [Python] (/home/chz31/Slicer-5.6.2-linux-amd64/lib/Slicer-5.6/qt-scripted-modules/SubjectHierarchyPlugins/AbstractScriptedSubjectHierarchyPlugin.py:39) - Scripted subject hierarchy plugin registered: SegmentStatistics
[DEBUG][Qt] 01.07.2024 17:03:13 [] (unknown:0) - Switch to module:  "Welcome"
[DEBUG][Python] 01.07.2024 17:03:14 [Python] (/home/chz31/Slicer-5.6.2-linux-amd64/lib/Slicer-5.6/qt-scripted-modules/SubjectHierarchyPlugins/AbstractScriptedSubjectHierarchyPlugin.py:39) - Scripted subject hierarchy plugin registered: ExportAs
[DEBUG][Python] 01.07.2024 17:03:14 [Python] (/home/chz31/Slicer-5.6.2-linux-amd64/lib/Slicer-5.6/qt-scripted-modules/SubjectHierarchyPlugins/AbstractScriptedSubjectHierarchyPlugin.py:39) - Scripted subject hierarchy plugin registered: FormatMarkups
[INFO][Python] 01.07.2024 17:03:14 [Python] (<string>:3) - Adding SlicerMorph Volume Rendering Presets

Maybe try this and see if other less complex GUI applications launch?

The Extension Manager uses Chromium to let users browse the Extensions Catalog website. Maybe Chromium has some issues on WSL2.

Can you try if you can use Google Chrome browser (that is also based on Chromium) in your WSL2?

@lassoan @muratmaga

Sorry for the late response. I might mess my WSL2 up when I reinstall a different version of cudatoolkit. I somehow could not install Chrome. I’ll reinstall WSL2 and post the update soon.

Sorry for the late response. I could install and open Google Chrome browser in WSL2, but somehow Slicer still exited whenever I opened Extension Manager.

Did you apt install the required packages for Slicer?

https://slicer.readthedocs.io/en/latest/user_guide/getting_started.html#ubuntu-22-04-jammy-jellyfish-20-04-focal-fossa-debian-12-bookworm-debian-11-bullseye-debian-10-buster

Yes, I did that by running sudo apt-get install libglu1-mesa libpulse-mainloop-glib0 libnss3 libasound2 qt5dxcb-plugin libsm6 for Ubuntu 22.04, which is the version for WSL2.

I can install extensions via Extension Wizard, though. I would say it might be a Chromium issue in WSL2.

You can probably try to install chromium in wsl2 and test that: https://linuxconfig.org/ubuntu-22-04-chromium-browser-installation

1 Like

Yes, I can install and open chrominum-browser and use it with no problem.

I did get some warning messages printed out. but they seem to not disrupt the browser functions:

 2024/07/06 17:29:51.936431 cmd_run.go:1138: WARNING: cannot start document portal: dial unix /run/user/1000/bus: connect: no such file or directory
libpxbackend-1.0.so: cannot open shared object file: No such file or directory
Failed to load module: /home/chz31/snap/chromium/common/.cache/gio-modules/libgiolibproxy.so
libpxbackend-1.0.so: cannot open shared object file: No such file or directory
Failed to load module: /home/chz31/snap/chromium/common/.cache/gio-modules/libgiolibproxy.so
[221612:221825:0706/172954.448365:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[221612:221825:0706/172954.448471:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[221612:221825:0706/172954.448498:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[221612:221825:0706/172954.448518:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[221612:221825:0706/172954.786342:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[221612:221825:0706/172954.786475:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[221612:221822:0706/172955.007529:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[221612:221825:0706/172955.105509:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[221612:221825:0706/172955.105670:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[221612:221612:0706/172955.320720:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:
[221612:221823:0706/172955.320899:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[221612:221894:0706/172955.355699:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[221612:221894:0706/172955.356052:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[221612:221894:0706/172955.356425:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[221612:221612:0706/172955.384103:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:
[221612:221840:0706/172955.384537:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory

(chrome:221612): IBUS-WARNING **: 17:29:55.437: Failed to mkdir /home/chz31/snap/chromium/2905/.config/ibus/bus: Not a directory
[221612:221612:0706/172955.439434:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:
[221612:221823:0706/172955.439850:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[221612:221612:0706/172955.442239:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:
[221612:221823:0706/172955.442405:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/user/1000/bus: No such file or directory
[221612:221612:0706/172955.456367:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:
MESA: error: ZINK: failed to choose pdev
glx: failed to create drisw screen
[221846:221846:0706/172956.075811:ERROR:viz_main_impl.cc(166)] Exiting GPU process due to errors during initialization
[221882:7:0706/172956.236489:ERROR:command_buffer_proxy_impl.cc(132)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.

Hi Chi,
I am new to Slicer and I experienced the same error while I clicked the extension manager and Slicer crashed in the WSL.
May I ask how did you manage to install extensions via Extension Wizard?
Thank you!

Yes, I did manage to use Extension Wizard to install a git cloned extension.

@yuan_li Sorry, I did not see the detail of your question. Here is the tutorial: Extension Wizard — 3D Slicer documentation and https://www.youtube.com/watch?v=QsxzjQb05D4

You can go to a GitHub repository of an extension and download the zip or git clone it (for example, SlicerMorph), then you just go to the Extension Wizard and click “Select Extension” to select the downloaded folder.

No worries, thank you for your help! I manage to install the needed packages.
Thank you again for your time and help!

1 Like

Only those extensions can be installed from github repository zip archives that only contain Python scripted modules. If you want to install any Python extension then you can do it by a few lines Python commands, as shown in the script repository.

However, there are a couple of other issues with Slicer on WSL2. We don’t plan to work on them until we learn about use cases, but I’ve added an issue to track them anyway:

1 Like