gazebosim / gz-gui

Builds on top of Qt to provide widgets which are useful when developing robotics applications, such as a 3D view, plots, dashboard, etc, and can be used together in a convenient unified interface.
https://gazebosim.org
Apache License 2.0
66 stars 39 forks source link

VMWare Ubuntu: Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. #618

Open Ryanf55 opened 2 months ago

Ryanf55 commented 2 months ago

Environment

Description

Steps to reproduce

  1. Install VMWare 17 on WIndows 10 with Ubunut 22.04 guest
  2. Install gazebo harmonic per the standard method 3.Run gz sim shapes.sdf

Output

image

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.

ryan@ub22d17:~/ryan.friedman$ echo $QT_QPA_PLATFORM

ryan@ub22d17:~/ryan.friedman$ gz sim shapes.sdf
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
^Ccontext mismatch in svga_surface_destroy
context mismatch in svga_surface_destroy
context mismatch in svga_surface_destroy
context mismatch in svga_surface_destroy
context mismatch in svga_surface_destroy
context mismatch in svga_surface_destroy
ryan@ub22d17:~/ryan.friedman$ export QT_QPA_PLATFORM=wayland
ryan@ub22d17:~/ryan.friedman$ gz sim shapes.sdf
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.

Stack trace (most recent call last):
#31   Object "gz sim gui", at 0x617d470b817e, in 
#30   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7e089bea8e19, in ruby_run_node
#29   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7e089bea5317, in 
#28   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7e089c03a33c, in rb_vm_exec
#27   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7e089c034cc6, in 
#26   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7e089c031ff5, in 
#25   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7e089c02fc64, in 
#24   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7e089bf7ba4e, in 
#23   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7e089bea69ac, in rb_protect
#22   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7e089c03ec91, in rb_yield
#21   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7e089c03a33c, in rb_vm_exec
#20   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7e089c034cc6, in 
#19   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7e089c031ff5, in 
#18   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7e089c02fc64, in 
#17   Object "/usr/lib/x86_64-linux-gnu/ruby/3.0.0/fiddle.so", at 0x7e089b9ed44b, in 
#16   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x7e089bffd0b8, in rb_nogvl
#15   Object "/usr/lib/x86_64-linux-gnu/ruby/3.0.0/fiddle.so", at 0x7e089b9ecd6b, in 
#14   Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x7e089b996492, in 
#13   Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x7e089b999e2d, in 
#12   Object "/usr/lib/x86_64-linux-gnu/libgz-sim8-gz.so.8.3.0", at 0x7e0897e66865, in runGui
#11   Object "/lib/x86_64-linux-gnu/libgz-sim8-gui.so.8", at 0x7e0897071595, in gz::sim::v8::gui::runGui(int&, char**, char const*, char const*, int, char const*, char const*)
#10   Object "/lib/x86_64-linux-gnu/libgz-sim8-gui.so.8", at 0x7e089706f341, in gz::sim::v8::gui::createGui(int&, char**, char const*, char const*, bool, char const*, int, char const*, char const*)
#9    Object "/lib/x86_64-linux-gnu/libgz-gui8.so.8", at 0x7e0896f98e0b, in gz::gui::Application::Application(int&, char**, gz::gui::WindowType, char const*)
#8    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7e0895371cec, in QApplicationPrivate::init()
#7    Object "/lib/x86_64-linux-gnu/libQt5Gui.so.5", at 0x7e0893f3bb6f, in QGuiApplicationPrivate::init()
#6    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7e0895cc0b16, in QCoreApplicationPrivate::init()
#5    Object "/lib/x86_64-linux-gnu/libQt5Gui.so.5", at 0x7e0893f38c07, in QGuiApplicationPrivate::createEventDispatcher()
#4    Object "/lib/x86_64-linux-gnu/libQt5Gui.so.5", at 0x7e0893f38712, in QGuiApplicationPrivate::createPlatformIntegration()
#3    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7e0895a90ba2, in QMessageLogger::fatal(char const*, ...) const
#2    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7e089ba287f2, in abort
#1    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7e089ba42475, in raise
#0    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7e089ba969fc, in pthread_kill
Aborted (Signal sent by tkill() 321749 1000)
yan@ub22d17:~$ gz sim -v 3 shapes.sdf
[Msg] Gazebo Sim GUI    v8.3.0
[Msg] Received world [shapes.sdf] from the GUI.
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[Msg] Gazebo Sim Server v8.3.0
[Msg] Loading SDF world file[/usr/share/gz/gz-sim8/worlds/shapes.sdf].
[Msg] Serving entity system service on [/entity/system/add]
[Msg] Loaded level [3]
[Msg] No systems loaded from SDF, loading defaults
[Msg] Create service on [/world/shapes/create]
[Msg] Remove service on [/world/shapes/remove]
[Msg] Pose service on [/world/shapes/set_pose]
[Msg] Pose service on [/world/shapes/set_pose_vector]
[Msg] Light configuration service on [/world/shapes/light_config]
[Msg] Physics service on [/world/shapes/set_physics]
[Msg] SphericalCoordinates service on [/world/shapes/set_spherical_coordinates]
[Msg] Enable collision service on [/world/shapes/enable_collision]
[Msg] Disable collision service on [/world/shapes/disable_collision]
[Msg] Material service on [/world/shapes/visual_config]
[Msg] Material service on [/world/shapes/wheel_slip]
[Msg] Serving world controls on [/world/shapes/control], [/world/shapes/control/state] and [/world/shapes/playback/control]
[Msg] Serving GUI information on [/world/shapes/gui/info]
[Msg] World [shapes] initialized with [default_physics] physics profile.
[Msg] Serving world SDF generation service on [/world/shapes/generate_world_sdf]
[Msg] Serving world names on [/gazebo/worlds]
[Msg] Resource path add service on [/gazebo/resource_paths/add].
[Msg] Resource path get service on [/gazebo/resource_paths/get].
[Msg] Resource path resolve service on [/gazebo/resource_paths/resolve].
[Msg] Resource paths published on [/gazebo/resource_paths].
[Msg] Server control service on [/server_control].
[GUI] [Msg] Loading config [/home/ryan/.gz/sim/8/gui.config]
[GUI] [Msg] Added plugin [3D View] to main window
[GUI] [Msg] Loaded plugin [MinimalScene] from path [/usr/lib/x86_64-linux-gnu/gz-gui-8/plugins/libMinimalScene.so]
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Msg] Added plugin [Entity Context Menu] to main window
[GUI] [Msg] Loaded plugin [EntityContextMenuPlugin] from path [/usr/lib/x86_64-linux-gnu/gz-sim-8/plugins/gui/libEntityContextMenuPlugin.so]
[GUI] [Msg] Added plugin [Scene Manager] to main window
[GUI] [Msg] Loaded plugin [GzSceneManager] from path [/usr/lib/x86_64-linux-gnu/gz-sim-8/plugins/gui/libGzSceneManager.so]
[GUI] [Msg] Camera view controller topic advertised on [/gui/camera/view_control]
[GUI] [Msg] Camera reference visual topic advertised on [/gui/camera/view_control/reference_visual]
[GUI] [Msg] Camera view control sensitivity advertised on [/gui/camera/view_control/sensitivity]
[GUI] [Msg] Added plugin [Interactive view control] to main window
[GUI] [Msg] Loaded plugin [InteractiveViewControl] from path [/usr/lib/x86_64-linux-gnu/gz-gui-8/plugins/libInteractiveViewControl.so]
[GUI] [Msg] Added plugin [Camera tracking] to main window
[GUI] [Msg] Loaded plugin [CameraTracking] from path [/usr/lib/x86_64-linux-gnu/gz-gui-8/plugins/libCameraTracking.so]
[GUI] [Msg] Listening to stats on [/world/shapes/stats]
[GUI] [Msg] Added plugin [Marker Manager] to main window
[GUI] [Msg] Loaded plugin [MarkerManager] from path [/usr/lib/x86_64-linux-gnu/gz-gui-8/plugins/libMarkerManager.so]
[GUI] [Msg] Added plugin [Select entities] to main window
[GUI] [Msg] Loaded plugin [SelectEntities] from path [/usr/lib/x86_64-linux-gnu/gz-sim-8/plugins/gui/libSelectEntities.so]
[GUI] [Msg] Added plugin [Spawn] to main window
[GUI] [Msg] Loaded plugin [Spawn] from path [/usr/lib/x86_64-linux-gnu/gz-sim-8/plugins/gui/libSpawn.so]
[GUI] [Msg] View as transparent service on [/gui/view/transparent]
[GUI] [Msg] View as wireframes service on [/gui/view/wireframes]
[GUI] [Msg] View center of mass service on [/gui/view/com]
[GUI] [Msg] View inertia service on [/gui/view/inertia]
[GUI] [Msg] View collisions service on [/gui/view/collisions]
[GUI] [Msg] View joints service on [/gui/view/joints]
[GUI] [Msg] View frames service on [/gui/view/frames]
[GUI] [Msg] Added plugin [Visualization capabilities] to main window
[GUI] [Msg] Loaded plugin [VisualizationCapabilities] from path [/usr/lib/x86_64-linux-gnu/gz-sim-8/plugins/gui/libVisualizationCapabilities.so]
[GUI] [Msg] Using world control service [/world/shapes/control]
[GUI] [Msg] Listening to stats on [/world/shapes/stats]
[GUI] [Msg] Added plugin [World control] to main window
[GUI] [Msg] Loaded plugin [WorldControl] from path [/usr/lib/x86_64-linux-gnu/gz-gui-8/plugins/libWorldControl.so]
[GUI] [Msg] Listening to stats on [/world/shapes/stats]
[GUI] [Msg] Added plugin [World stats] to main window
[GUI] [Msg] Loaded plugin [WorldStats] from path [/usr/lib/x86_64-linux-gnu/gz-gui-8/plugins/libWorldStats.so]
[GUI] [Msg] Added plugin [Shapes] to main window
[GUI] [Msg] Loaded plugin [Shapes] from path [/usr/lib/x86_64-linux-gnu/gz-sim-8/plugins/gui/libShapes.so]
[GUI] [Msg] Added plugin [Lights] to main window
[GUI] [Msg] Loaded plugin [Lights] from path [/usr/lib/x86_64-linux-gnu/gz-sim-8/plugins/gui/libLights.so]
[GUI] [Msg] Added plugin [Transform control] to main window
[GUI] [Msg] Loaded plugin [TransformControl] from path [/usr/lib/x86_64-linux-gnu/gz-sim-8/plugins/gui/libTransformControl.so]
[GUI] [Msg] Screenshot service on [/gui/screenshot]
[GUI] [Msg] Added plugin [Screenshot] to main window
[GUI] [Msg] Loaded plugin [Screenshot] from path [/usr/lib/x86_64-linux-gnu/gz-gui-8/plugins/libScreenshot.so]
[GUI] [Msg] Added plugin [Copy/Paste] to main window
[GUI] [Msg] Loaded plugin [CopyPaste] from path [/usr/lib/x86_64-linux-gnu/gz-sim-8/plugins/gui/libCopyPaste.so]
[Msg] Found no publishers on /stats, adding root stats topic
[Msg] Found no publishers on /clock, adding root clock topic
[Msg] Serving scene information on [/world/shapes/scene/info]
[Msg] Serving graph information on [/world/shapes/scene/graph]
[Msg] Serving full state on [/world/shapes/state]
[Msg] Serving full state (async) on [/world/shapes/state_async]
[Msg] Publishing scene information on [/world/shapes/scene/info]
[Msg] Publishing entity deletions on [/world/shapes/scene/deletion]
[Msg] Publishing state changes on [/world/shapes/state]
[Msg] Publishing pose messages on [/world/shapes/pose/info]
[Msg] Publishing dynamic pose messages on [/world/shapes/dynamic_pose/info]
[Wrn] [Model.hh:69] Skipping serialization / deserialization for models with //pose/@relative_to attribute.
[Wrn] [Model.hh:69] Skipping serialization / deserialization for models with //pose/@relative_to attribute.
[Wrn] [Component.hh:144] Trying to serialize component with data type [N3sdf3v145WorldE], which doesn't have `operator<<`. Component will not be serialized.
[GUI] [Msg] Added plugin [Component inspector] to main window
[GUI] [Msg] Loaded plugin [ComponentInspector] from path [/usr/lib/x86_64-linux-gnu/gz-sim-8/plugins/gui/libComponentInspector.so]
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityTree/EntityTree.qml:148:7: QML ToolButton: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Msg] Added plugin [Entity tree] to main window
[GUI] [Msg] Loaded plugin [EntityTree] from path [/usr/lib/x86_64-linux-gnu/gz-sim-8/plugins/gui/libEntityTree.so]
[GUI] [Msg] Using server control service [/server_control]
[GUI] [Wrn] [Component.hh:189] Trying to deserialize component with data type [N3sdf3v145WorldE], which doesn't have `operator>>`. Component will not be deserialized.
[GUI] [Wrn] [Model.hh:98] Unable to deserialize sdf::Model
[GUI] [Wrn] [Model.hh:98] Unable to deserialize sdf::Model
[GUI] [Wrn] [Model.hh:98] Unable to deserialize sdf::Model
[GUI] [Wrn] [Model.hh:98] Unable to deserialize sdf::Model
[GUI] [Wrn] [Model.hh:98] Unable to deserialize sdf::Model
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityTree/EntityTree.qml:148:7: QML ToolButton: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/WorldStats/WorldStats.qml:53:3: QML RowLayout: Binding loop detected for property "x"
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:52:3: QML RenderWindowOverlay: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Wrn] [Application.cc:908] [QT] file::/EntityContextMenuPlugin/EntityContextMenuPlugin.qml:67:3: QML EntityContextMenu: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[GUI] [Msg] Loading plugin [gz-rendering-ogre2]
[GUI] [Msg] Move to service on [/gui/move_to]
[GUI] [Msg] Follow service on [/gui/follow]
[GUI] [Msg] Move to pose service on [/gui/move_to/pose]
[GUI] [Msg] Camera pose topic advertised on [/gui/camera/pose]
[GUI] [Msg] Follow offset service on [/gui/follow/offset]
Ryanf55 commented 2 months ago

Ironically, running inside a VSode docker devcontainer solves it: image

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.

Ryanf55 commented 2 months ago

Relates to https://github.com/gazebosim/gz-sim/issues/1841

traversaro commented 2 months ago

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.

azeey commented 2 months ago

Can you try setting QT_QPA_PLATFORM=xcb? (from https://github.com/ros2/rviz/issues/847#issuecomment-1506502560)

Ryanf55 commented 2 months ago

Can you try setting QT_QPA_PLATFORM=xcb? (from ros2/rviz#847 (comment))

No change in behavior

Ryanf55 commented 2 months ago

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 of ogre2 rendering engine. For debugging, it would also be useful to report the ogre2.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,
traversaro commented 1 month ago

A lot of extensions indeed are missing. Can you report the full output of glxinfo?

Ryanf55 commented 1 month ago

A lot of extensions indeed are missing. Can you report the full output of glxinfo?

here you are: glxinfo.txt

traversaro commented 1 month ago

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.

Ryanf55 commented 1 month ago

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 the ogre2.log file that could contain information on the missing extension, if a missing extension is indeed the problem.

ogre2_log.txt

azeey commented 1 month ago

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?

traversaro commented 1 month ago

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?

Ryanf55 commented 1 month ago

export QT_QPA_PLATFORM=xcb ogre2_QT_QPA_PLATFORM_xcb .txt

export LIBGL_ALWAYS_SOFTWARE=1 ogre2_LIBGL_ALWAYS_SOFTWARE_1.txt

azeey commented 1 month ago

I was hoping to get the logs of gz sim -v4 shapes.sdf since the issue might be with Qt.

Ryanf55 commented 1 month ago

Here's the console log for each scenario. console_QT_QPA_PLATFORM_xcb .txt console_LIBGL_ALWAYS_SOFTWARE_1.txt