-
Notifications
You must be signed in to change notification settings - Fork 269
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
No camera/render on ubuntu (WSLg + vGPU) #920
Comments
There is a similar problem when trying to run ignition gazebo 6.0.0 (installed via apt) on WSL2 with X server (no WSLg). I tried with both I wonder if it may be worth to open an issue also in https://github.com/microsoft/wslg for this issue. |
By the way, did you tested with Citadel? I just read in #1066 (comment) that @0smile was able to run Ign Gazebo in WSLg with Citadel, but has a crash with Fortress. |
@traversaro Good point; I have not tested Citadel. Mainly because gym-ignition targets the latest ign-gazebo, so it wouldn't do much for my use-case. I will give it a try next week (currently at a conference) and report back on how it goes. |
@traversaro I just tried Citadel with WSLg (binary build). It doesn't render
So it could simply be that the light sources are not working and, because of that, I only ever see a gray screen. Here is the full log for reference in case that is interesting: full log
|
Cool, thanks! I wonder if this problem is related to Wayland that is used by WSLg, not sure if anyone ever tested Ignition Gazebo on actual Linux install using Wayland instead of using X. |
@traversaro I agree, there could be a high chance that it is a Wayland vs X problem. After my current project finishes, I will hard-reset my Linux machine at work. I'll use that as an opportunity to get a clean bare-bones Ubuntu 20.04 + Wayland. Let's see what happens then. |
one thing to try on Fortress is to launch ign-gazebo with the |
I've been trying to use ign-gazebo on WSLg with WIndows 11 also and tried with the headless command |
@blakermchale , what version of Ignition and Ogre 2 do you have installed? Are you able to get Ogre logs when running with headless rendering? |
@chapulina, when I run Here are my ogre logs from Ogre2 Log
|
Is there any progress on this? I'm struggling with the same issue here. Currently adding |
If you compile from source, disabling anti-aliasing, it works.
|
Has there been any progress on this? I am stuck using Gazebo 11 since that works fine. Considering all future versions will be based on Ignition-Gazebo, I don't want to have to compile from source each time and disable anti-aliasing to get this working. |
I am not sure that is the case. That workaround works for a problem that occurs with Mesa software rendering, i.e. According to my tests, when using
Basically, the problem is that |
Someone may want to contact the maintainer of the d3d12 driver to implement The maintainer is probably referring to the difficulty other GL 4.3 features that have nothing to do with |
I checked on https://mesamatrix.net/, and as of today apparently |
Since #1116 was fixed and landed in a release, a workaround for this issue is to set the env variable |
Interestingly @bperseghetti noted that at least on mesa 22/23
So, a possible thing to check is to use the function defined by the The code was already committed commented back when that code was introduced, see OGRECave/ogre-next@22dc290 . However, it is probably relatively easy to fix the commented code by copying the arguments passed to Another interesting question (that perhaps it is more appropriate for the mesa issue tracker) is: if |
Found it out from @PetervdPerk-NXP who is using our simulation on WSL. |
Hi! Enabling that path in OgreNext should be easy and straightforward. It seems the commented out code is now out of date, so it probably should have the same function signature as its It would need testing though.
A quick eye glance over the specs suggest * Compressed format reinterpretation is when e.g. |
From @PetervdPerk-NXP:
I could spin up a WSL2 instance and test it. I just only use Ubuntu and Docker usually. But I guess I could add un-official support for our CogniPilot native install to work on WSL2 and that would give me the excuse to do it I suppose. Might be a week or so before I can invest that time though. |
I tested it in WSL2 with Ubuntu 22.04 and it has been working well! Also tested it in a Docker image on WSL2. The only note I would make is that ROS2 packages like |
@blakermchale Did you install ros-humble-desktop-full? If you did, you should install ros-humble-desktop and instead of using the ros ppa use the gazebo ppa to install the ros-humble-ros-gz(garden/harmonic)-sim This might help you: https://github.com/CogniPilot/helmet/blob/9518b50d865f4a5b674f12ec6ae7f4e77af4986b/install/scripts/gazebo.sh#L5-L20 |
Installing ros-humble-ros-gzgarden-sim fixed the issue. It also works in WSL2. Thanks for the help 👍 |
This seems to work for me with Garden in WSL2 (when running PX4 autopilot with current main). I still get the error |
With which Ubuntu distro? |
Ubuntu 22.04.2. This is the highest version of Ubuntu on which PX4 works. Garden is the current supported simulator version. |
Thanks! |
Given the report of this working fine, I think we can close this issue @FirefoxMetzger @azeey (I do not have the permission to do it myself). As mentioned in https://community.gazebosim.org/t/wslg-with-gpu-support-available-on-latest-version-of-gazebo-garden-and-harmonic, new WSLg problems should be discussed in new dedicated issues. |
your desires are my commands |
Poor issue, at least it had a nice long full discussion life. |
BTW, any thoughts on This is what renders if I do And when I close my window I get a seg fault
What I'm after here is confirmation whether this is a PX4 issue or a Gazebo issue. |
There is more info in gazebosim/gz-rendering#587. Long story short, it's harmless but we haven't found a way to prevent printing that msg yet. The segfault is likely due to something else. |
It's recommended that you make sure you've got your latest gpu drivers installed and if possible a recent version of mesa so that most opengl features get emulated. Also it seems Microsoft is close in supporting Opengl 4.3 which would help in compatibility as well. |
FYI, I installed the Kika mesa as recommended by @PetervdPerk-NXP and that went away. Thank you all for the help (Peter, I will update the PX4 docs with a note). |
If you have an NVIDIA card, perhaps it was related to microsoft/wslg#715 . |
I do. However I updated to the latest Geoforce game ready driver and installed kika mesa and the error went away. For PX4 docs I'll just add a note that using latest drivers and installing kika mesa can improve compatibility. People can then choose to follow those if they want. |
Interestingly, just after we fixed compatibility with the missing functionalities of
So hopefully we should see less problems like this one even if ogre-next changes again as soon as Mesa 24 is used. |
Hi, when I update the mesa driver, I get a test_user@z6-fgw:~$ dpkg -l | grep mesa
ii libegl-mesa0:amd64 23.3.2~kisak1~j amd64 free implementation of the EGL API -- Mesa vendor library
ii libgl1-mesa-dri:amd64 23.3.2~kisak1~j amd64 free implementation of the OpenGL API -- DRI modules
ii libglapi-mesa:amd64 23.3.2~kisak1~j amd64 free implementation of the GL API -- shared library
ii libglu1-mesa:amd64 9.0.2-1 amd64 Mesa OpenGL utility library (GLU)ii libglu1-mesa-dev:amd64 9.0.2-1 amd64 Mesa OpenGL utility library -- development files
ii libglx-mesa0:amd64 23.3.2~kisak1~j amd64 free implementation of the OpenGL API -- GLX vendor library
ii mesa-utils 8.4.0-1ubuntu1 amd64 Miscellaneous Mesa utilities -- symlinks
ii mesa-utils-bin:amd64 8.4.0-1ubuntu1 amd64 Miscellaneous Mesa utilities -- native applications
ii mesa-va-drivers:amd64 23.3.2~kisak1~j amd64 Mesa VA-API video acceleration drivers
ii mesa-vdpau-drivers:amd64 23.3.2~kisak1~j amd64 Mesa VDPAU video acceleration drivers
ii mesa-vulkan-drivers:amd64 23.3.2~kisak1~j amd64 Mesa Vulkan graphics drivers test_user@z6-fgw:~$ glxinfo -B
name of display: :0
WARNING: dzn is not a conformant Vulkan implementation, testing use only.
WARNING: Some incorrect rendering might occur because the selected Vulkan device (Microsoft Direct3D12 (NVIDIA T1000)) doesn't support base Zink requirements: feats.features.logicOp have_EXT_custom_border_color have_EXT_line_rasterization
glx: failed to create drisw screen
failed to load driver: zink
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Microsoft Corporation (0xffffffff)
Device: D3D12 (NVIDIA T1000) (0xffffffff)
Version: 23.3.2
Accelerated: yes
Video memory: 11992MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.2
Max compat profile version: 4.2
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA T1000)
OpenGL core profile version string: 4.2 (Core Profile) Mesa 23.3.2 - kisak-mesa PPA
OpenGL core profile shading language version string: 4.20
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.2 (Compatibility Profile) Mesa 23.3.2 - kisak-mesa PPA
OpenGL shading language version string: 4.20
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 23.3.2 - kisak-mesa PPA
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
Segmentation fault |
@hellototoro please avoid commenting closed issue, it is highly probable people will not see your comments. For this kind of problems, please open new issues or questions in Robotics StackExchange. In particular, your problem seems to be related to microsoft/wslg#715, that is quite independent from gz-sim . |
It is 9/4/2024, still seeing this issue, and with newest MESA and newest other packages.
Using ROS2 official jazzy and corresponding Gazebo pazkages:
I tried using kisak MESA, does not work, shows:
I might consider switching to an older set of everything, anyone got any suggestions on any versions that work with WSL2? |
Can you open a new separate issue following the template? Thanks! |
New issue created, #2595. Thank you! |
I am trying to set up Ignition on a Ubuntu VM (WSL2) that has GPU hardware acceleration for both rendering and computation (via the new WSLg). It works almost fine; I get a window that is rendered, responsive and GPU accelerated; however, I don't seem to be able to render the main camera's view (which instead remains black). The same setup using
llvmpipe
as a (CPU-based) renderer works without issue.I remember having encountered a similar situation when I tried to install ignition on bare Windows, but I can't find the issue just now (perhaps someone else knows and can link it :) ).
There is another issue that the entire VM crashes whenever I close the GUI while a simulation is running (does not happen with other GUI windows), but that one is secondary for now.
Environment
Rendering plugin: ogre2
Generally, mention all circumstances that might affect rendering capabilities:
Rendering system info:
On Linux, provide the outputs of the following commands:
command output
Please, attach the ogre.log or ogre2.log file from
~/.ignition/rendering
: ogre2.logDescription
shapes.sdf
andlights.sdf
load correctly and the GUI camera renders the scene.Steps to reproduce
ign shapes.sdf -v3
The text was updated successfully, but these errors were encountered: