Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 of 5 tasks
Ryanf55 opened this issue May 2, 2024 · 15 comments
Assignees
Labels
bug Something isn't working

Comments

@Ryanf55
Copy link

Ryanf55 commented May 2, 2024

Environment

  • OS Version: Ubuntu 22.04 running in VMWare on Windows 10
  • Source or binary build?
    Binary - Harmonic
    • Rendering plugin: [ ogre2].
      • Sensor rendering error.
      • GUI rendering error.
    • EGL headless mode:
      • Running in EGL headless mode
    • Generally, mention all circumstances that might affect rendering capabilities:
      • running in virtual machine
    • Rendering system info:
      • On Linux, provide the outputs of the following commands:
        LANG=C lspci -nn | grep VGA  # might require installing pciutils
        00:0f.0 VGA compatible controller [0300]: VMware SVGA II Adapter [15ad:0405]
        echo "$DISPLAY"
        :0
        LANG=C glxinfo -B | grep -i '\(direct rendering\|opengl\|profile\)'  # might require installing mesa-utils package
          direct rendering: Yes
              Preferred profile: core (0x1)
              Max core profile version: 4.3
              Max compat profile version: 4.3
              Max GLES1 profile version: 1.1
              Max GLES[23] profile version: 3.1
              OpenGL vendor string: VMware, Inc.
              OpenGL renderer string: SVGA3D; build: RELEASE;  LLVM;
              OpenGL core profile version string: 4.3 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
              OpenGL core profile shading language version string: 4.30
              OpenGL core profile context flags: (none)
              OpenGL core profile profile mask: core profile
              OpenGL version string: 4.3 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
              OpenGL shading language version string: 4.30
              OpenGL context flags: (none)
              OpenGL profile mask: compatibility profile
              OpenGL ES profile version string: OpenGL ES 3.1 Mesa 23.2.1-1ubuntu3.1~22.04.2
              OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
        
        ps aux | grep Xorg
            ryan        3996  0.0  0.0   9080  2432 pts/0    S+   00:04   0:00 grep --color=auto Xorg
        
        sudo env LANG=C X -version  # if you don't have root access, try to tell the version of Xorg e.g. via package manager
          X.Org X Server 1.21.1.4
          X Protocol Version 11, Revision 0
          Current Operating System: Linux ub22d17 6.5.0-28-generic #29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr  4 14:39:20 UTC 2 x86_64
          Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.5.0-28-generic root=UUID=4e184a09-a38b-4a10-a09f-cf3f949d586c ro find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US quiet splash
          xorg-server 2:21.1.4-2ubuntu1.7~22.04.10 (For technical support please see http://www.ubuntu.com/support) 
          Current version of pixman: 0.40.0
      • On Windows, run dxdiag and report the GPU-related information.
      • On Mac OS, open a terminal and type system_profiler SPDisplaysDataType. Copy the output here.
    • Please, attach the ogre.log or ogre2.log file from ~/.gz/rendering

Description

  • Expected behavior: I can launch shapes.sdf
  • Actual behavior: It launched but did not render shapes - it instead had a flashy rendering window, and a console error.
    If I set

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 Ryanf55 added the bug Something isn't working label May 2, 2024
@Ryanf55
Copy link
Author

Ryanf55 commented May 2, 2024

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
Copy link
Author

Ryanf55 commented May 2, 2024

Relates to gazebosim/gz-sim#1841

@traversaro
Copy link
Contributor

I guess this is also related to gazebosim/gz-sim#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
Copy link
Contributor

azeey commented May 6, 2024

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

@azeey azeey self-assigned this May 6, 2024
@Ryanf55
Copy link
Author

Ryanf55 commented May 6, 2024

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

No change in behavior

@Ryanf55
Copy link
Author

Ryanf55 commented May 6, 2024

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
Copy link
Contributor

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

@Ryanf55
Copy link
Author

Ryanf55 commented May 6, 2024

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

here you are:
glxinfo.txt

@traversaro
Copy link
Contributor

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.

@Ryanf55
Copy link
Author

Ryanf55 commented May 6, 2024

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
Copy link
Contributor

azeey commented May 7, 2024

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
Copy link
Contributor

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
Copy link
Author

Ryanf55 commented May 9, 2024

export QT_QPA_PLATFORM=xcb
ogre2_QT_QPA_PLATFORM_xcb .txt

export LIBGL_ALWAYS_SOFTWARE=1
ogre2_LIBGL_ALWAYS_SOFTWARE_1.txt

@azeey
Copy link
Contributor

azeey commented May 9, 2024

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

@Ryanf55
Copy link
Author

Ryanf55 commented May 10, 2024

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

@azeey azeey moved this from Inbox to In progress in Core development May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In progress
Development

No branches or pull requests

3 participants