Open Ryanf55 opened 2 months ago
Ironically, running inside a VSode docker devcontainer solves it:
Here's the stripped version with all the random platform-specific stuff removed. To me, "LIBGL_ALWAYS_SOFTWARE": "1",
is very suspicious that our devcontainer doesn't use the GPU and that's why it works.
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
"name": "Development Container",
"build": {
"context": "..",
"dockerfile": "../.docker/Dockerfile",
"target": "dev",
"args": {
"DOCKER_GID": "${localEnv:DOCKER_GID}",
}
},
"mounts": [
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind",
"source=${localEnv:HOME}/.ssh/config,target=/home/user1/.ssh/config,type=bind",
"source=${localEnv:HOME}/.ssh/known_hosts,target=/home/user1/.ssh/known_hosts,type=bind"
],
"workspaceMount": "source=${localWorkspaceFolder},target=/ws,type=bind",
"workspaceFolder": "/ws",
"runArgs": [
"--network=host",
"--cap-add=SYS_PTRACE",
"--security-opt=seccomp:unconfined",
"--security-opt=apparmor:unconfined",
"--volume=/tmp/.X11-unix:/tmp/.X11-unix",
"--ipc=host",
],
"containerEnv": {
"DISPLAY": "${localEnv:DISPLAY}", // Needed for GUI try ":0" for windows
"WAYLAND_DISPLAY": "${localEnv:WAYLAND_DISPLAY}",
"XDG_RUNTIME_DIR": "${localEnv:XDG_RUNTIME_DIR}",
"PULSE_SERVER": "${localEnv:PULSE_SERVER}",
"LIBGL_ALWAYS_SOFTWARE": "1", // Needed for software rendering of opengl
"DOCKER_GID": "${localEnv:DOCKER_GID}",
"ARCH": "${localEnv:ARCH}"
},
// Set *default* container specific settings.json values on container create.
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.profiles.linux": {
"bash": { "path": "/bin/bash" }
}
}
}
}
}
Of other note, running gazebo in WSL2 (with wslg) is much more performant than VMWare. Likely because it's using GPU. For other reasons, WSL2 is not usable for development.
I'm not sure what to try.
I guess this is also related to https://github.com/gazebosim/gz-sim/issues/1492, in particular https://github.com/gazebosim/gz-sim/issues/1492#issuecomment-1146663381#issuecomment-1146663381 . I think it would be useful if you could check the test mentioned in that comment to understand which OpenGL extension are available in VmWare GPU's driver. If the problem is indeed the missing extensions, I guess you can try to use ogre
instead of ogre2
rendering engine. For debugging, it would also be useful to report the ogre2.log
file from ~/.gz/rendering
.
Can you try setting QT_QPA_PLATFORM=xcb
? (from https://github.com/ros2/rviz/issues/847#issuecomment-1506502560)
Can you try setting
QT_QPA_PLATFORM=xcb
? (from ros2/rviz#847 (comment))
No change in behavior
I guess this is also related to gazebosim/gz-sim#1492, in particular gazebosim/gz-sim#1492 (comment) . I think it would be useful if you could check the test mentioned in that comment to understand which OpenGL extension are available in VmWare GPU's driver. If the problem is indeed the missing extensions, I guess you can try to use
ogre
instead ofogre2
rendering engine. For debugging, it would also be useful to report theogre2.log
file from~/.gz/rendering
.
$ glxinfo | grep GL_ARB_shading_language_420pack
glxinfo | grep GL_ARB_texture_storage
# Optional but really good to have
glxinfo | grep GL_ARB_buffer_storage
glxinfo | grep GL_ARB_texture_buffer_range
glxinfo | grep GL_ARB_base_instance
# misc, just in case. In fact it may be better if this one returns nothing
glxinfo | grep GL_ARB_multi_draw_indirect
GL_ARB_shader_texture_lod, GL_ARB_shading_language_420pack,
GL_ARB_shading_language_420pack, GL_ARB_shading_language_include,
GL_ARB_texture_storage, GL_ARB_texture_storage_multisample,
GL_ARB_texture_stencil8, GL_ARB_texture_storage,
GL_ARB_texture_storage_multisample, GL_ARB_texture_swizzle,
GL_ARB_blend_func_extended, GL_ARB_buffer_storage,
GL_ARB_buffer_storage, GL_ARB_clear_buffer_object, GL_ARB_clear_texture,
GL_ARB_texture_buffer_range, GL_ARB_texture_compression_bptc,
GL_ARB_texture_buffer_range, GL_ARB_texture_compression,
GL_ARB_ES3_compatibility, GL_ARB_arrays_of_arrays, GL_ARB_base_instance,
GL_ARB_arrays_of_arrays, GL_ARB_base_instance, GL_ARB_blend_func_extended,
GL_ARB_map_buffer_range, GL_ARB_multi_bind, GL_ARB_multi_draw_indirect,
GL_ARB_map_buffer_range, GL_ARB_multi_bind, GL_ARB_multi_draw_indirect,
A lot of extensions indeed are missing. Can you report the full output of glxinfo
?
A lot of extensions indeed are missing. Can you report the full output of
glxinfo
?
here you are: glxinfo.txt
Actually the extensions are there, I misunderstood your output. Also the GL_ARB_copy_image
extension that was missing for WSLg (https://github.com/gazebosim/gz-sim/issues/920#issuecomment-1470925812) is present. At this point, it could be really useful to also get the ogre2.log
file that could contain information on the missing extension, if a missing extension is indeed the problem.
Actually the extensions are there, I misunderstood your output. Also the
GL_ARB_copy_image
extension that was missing for WSLg (gazebosim/gz-sim#920 (comment)) is present. At this point, it could be really useful to also get theogre2.log
file that could contain information on the missing extension, if a missing extension is indeed the problem.
I see in your logs
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
What was the error log after doing export QT_QPA_PLATFORM=xcb
and running gz sim
?
Just to tackle another lead, the ogre2.log
contains some interesting errors:
15:17:16: OGRE EXCEPTION(3:RenderingAPIException): Fixed Function pipeline is no longer allowed nor supported. The material scene::Material(65518) must use shaders in HlmsLowLevel::calculateHashFor at ./OgreMain/src/OgreHlmsLowLevel.cpp (line 160)
15:17:16: OGRE EXCEPTION(3:RenderingAPIException): Fixed Function pipeline is no longer allowed nor supported. The material scene::Material(65518) must use shaders in HlmsLowLevel::calculateHashFor at ./OgreMain/src/OgreHlmsLowLevel.cpp (line 160)
15:17:16: Couldn't apply datablock '[Hash 0x1dc5a795]' to this renderable. Using default one. Check previous log messages to see if there's more information.
15:17:16: OGRE EXCEPTION(3:RenderingAPIException): Fixed Function pipeline is no longer allowed nor supported. The material scene::Material(65518) must use shaders in HlmsLowLevel::calculateHashFor at ./OgreMain/src/OgreHlmsLowLevel.cpp (line 160)
15:17:16: OGRE EXCEPTION(3:RenderingAPIException): Fixed Function pipeline is no longer allowed nor supported. The material scene::Material(65518) must use shaders in HlmsLowLevel::calculateHashFor at ./OgreMain/src/OgreHlmsLowLevel.cpp (line 160)
15:17:16: Couldn't apply datablock '[Hash 0x1dc5a795]' to this renderable. Using default one. Check previous log messages to see if there's more information.
15:17:16: Can't assign material scene::Material(65466) because this Material does not exist. Have you forgotten to define it in a .material script?
15:17:16: OGRE EXCEPTION(3:RenderingAPIException): Fixed Function pipeline is no longer allowed nor supported. The material Default/TransGreen must use shaders in HlmsLowLevel::calculateHashFor at ./OgreMain/src/OgreHlmsLowLevel.cpp (line 160)
15:17:16: OGRE EXCEPTION(3:RenderingAPIException): Fixed Function pipeline is no longer allowed nor supported. The material Default/TransGreen must use shaders in HlmsLowLevel::calculateHashFor at ./OgreMain/src/OgreHlmsLowLevel.cpp (line 160)
15:17:16: Couldn't apply datablock '[Hash 0x1a9fb58f]' to this renderable. Using default one. Check previous log messages to see if there's more information.
15:17:16: Vertex Shader: 100000001VertexShader_vs
Fragment Shader: 100000001PixelShader_ps
GLSL validation result :
active samplers with a different type refer to the same texture image unit
15:17:16: WARNING: Deleting mapped buffer without having it unmapped. This is often sign of a resource leak or a bad pattern. Umapping the buffer for you...
15:17:16: WARNING: Deleting mapped buffer without having it unmapped. This is often sign of a resource leak or a bad pattern. Umapping the buffer for you...
15:17:16: WARNING: Deleting mapped buffer without having it unmapped. This is often sign of a resource leak or a bad pattern. Umapping the buffer for you...
15:17:16: WARNING: Deleting mapped buffer without having it unmapped. This is often sign of a resource leak or a bad pattern. Umapping the buffer for you...
Just to double check, can you report also the ogre2.log
when running with LIBGL_ALWAYS_SOFTWARE=1
, so we can diff them?
export QT_QPA_PLATFORM=xcb
ogre2_QT_QPA_PLATFORM_xcb .txt
export LIBGL_ALWAYS_SOFTWARE=1
ogre2_LIBGL_ALWAYS_SOFTWARE_1.txt
I was hoping to get the logs of gz sim -v4 shapes.sdf
since the issue might be with Qt.
Here's the console log for each scenario. console_QT_QPA_PLATFORM_xcb .txt console_LIBGL_ALWAYS_SOFTWARE_1.txt
Environment
Source or binary build? Binary - Harmonic
Rendering system info:
On Linux, provide the outputs of the following commands:
dxdiag
and report the GPU-related information.system_profiler SPDisplaysDataType
. Copy the output here.~/.gz/rendering
Description
Steps to reproduce
gz sim shapes.sdf
Output
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.