ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Win10/WSL: error displaying RVIZ---any ideas on what the issue would be?

asked 2020-02-25 03:40:16 -0600

sneibus gravatar image

updated 2022-01-22 16:10:22 -0600

Evgeny gravatar image

Hi I have install ROS in wsl and autoware yet not managing to display RVIZ. The error is

libGL failed to load driver: swarst
segmentation fault core dumped

Any ideas on how to tackle this error please and thank you

$ rosrun rviz rviz
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-sneibus'
[ INFO] [1582623498.116640600]: rviz version 1.13.7
[ INFO] [1582623498.117043500]: compiled against Qt version 5.9.5
[ INFO] [1582623498.117303800]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1582623498.123779300]: Forcing OpenGl version 0.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Segmentation fault (core dumped)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2020-03-20 20:12:33 -0600

LucasGoei gravatar image

If you are using VcXsrv on Win10 side. I found adding -nowgl VcXsrv parameters helps to get around some video card driver problems.

edit flag offensive delete link more



This worked for me with Windows 10 and ROS installed on WSL Ubuntu 18.04.

Valentin Barral gravatar image Valentin Barral  ( 2020-04-30 12:26:48 -0600 )edit

It helped to find a fix. I'm using Win10 WSL2 Docker to run rviz, for XServer I use MobaXTerm terminal. In MobaXTerm go to Settings -> Configuration -> X11 -> OpenGL acceleration and select Software (Hardware and None didn't work), now Rviz runs with GUI thanks

Combinacijus gravatar image Combinacijus  ( 2021-11-19 13:55:23 -0600 )edit

answered 2020-02-25 04:57:08 -0600

gvdhoorn gravatar image

Windows 10 does not come with an X-server. WSL does not provide one either.

By default, there is no support for running any X application in WSL.

You could try to install an X-server (such as VcXsrv or something else) and then making sure the LIBGL_ALWAYS_INDIRECT is not set.

See ros-visualization/rviz#1438 for what I believe is essentially a duplicate of your question.

edit flag offensive delete link more


Still same error with lauching Xlaunch

wsl cd export LIBGL_ALWAYS_INDIRECT=0 source install/setup.bash rosrun runtime_manager or rosrun rviz rviz

sneibus gravatar image sneibus  ( 2020-02-25 08:14:29 -0600 )edit

Well as I wrote: WSL is not meant for UI applications. Or at least: not the ones with OpenGL/Vulkan involved.

There are some ways to get some things to work, but it'll always be a bit work-around-y.

gvdhoorn gravatar image gvdhoorn  ( 2020-02-25 08:27:28 -0600 )edit

Question Tools

1 follower


Asked: 2020-02-25 03:40:16 -0600

Seen: 4,329 times

Last updated: Mar 20 '20