microsoft / wslg

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
MIT License
10.26k stars 310 forks source link

rviz/Gazebo Not Rendering 3d Space on Intel Laptop #455

Open kneave opened 3 years ago

kneave commented 3 years ago

Environment

Windows build number: Microsoft Windows NT 10.0.22000.0
Your Distribution version: Ubuntu 20.04
Your WSLg version: 1.0.26

Steps to reproduce

  1. Install ROS Noetic
  2. run an instance of roscore in one terminal
  3. run rosrun rviz rviz or rosrun gazebo_sim gazebo
  4. UI is displayed for the two applications but not the 3d rendered space.

WSL logs:

weston.log pulseaudio.log

versions.txt: WSLg ( x86_64 ): 1.0.19+Branch.main.Sha.2a47bf20c239b523d7413f315cbc9ee60dfde831 Mariner: VERSION="1.0.20210224" FreeRDP: 5f083fa0b97d433d6204985f6047886e29c1c61e weston: 16de531f00aa3dfd17e0de74c8f49e9fd7cec617 pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5 mesa:

Expected behavior

The applications should render the robot/simulation or at least the 3d grid.

Actual behavior

Gazebo: image

rviz: image

This works fine on my intel/nvidia based machine but on my Intel laptop it consistently shows this behaviour where previously it worked fine.

CPU: Intel Core i7-8565U GPU: Intel UHD Graphics 620

I've tried with the latest Intel drivers which claim to support WSLg and the newer beta drivers with the same behaviour.

anup-das commented 3 years ago

I have the same issue on Intel UHD graphics 630 on my core i7 9700k system. Blank output in glxgears. Works fine on my another system having discrete nvidia 1650 super card. Tried using latest Intel DCH drivers and old ones too. Latest os build 194 and wslg 1.0.26

anilzeybek commented 3 years ago

I also have the same problem

anup-das commented 3 years ago

For me arch seems to work on same setup. https://github.com/yuk7/ArchWSL

anilzeybek commented 3 years ago

it is probably using software rendering in arch wsl, so it is not distro specific: https://github.com/microsoft/wslg/issues/482#issuecomment-957014827

westonNexben commented 2 years ago

I have the same problem, but new tidbit of information: Software rendering, after installing the generic Intel driver but before I installed the updated Mesa, didn't display any GUI windows at all.

Dell XPS 7590 (also has a dedicated Nvidia GPU, but apparently we want integrated for WSLg) Windows 11 Intel Driver: 30.0.101.1069 Ubuntu 20.04

cat /mnt/wslg/versions.txt

WSLg ( x86_64 ): 1.0.26+Branch.main.Sha.26ce2c09b86442f3c7f4f6462f770ed2afa76a25
Mariner: VERSION="1.0.20210224"
FreeRDP: b05321cd4e6a862aef76163a69db4e1910245736
weston: 46756d0e77e5c01b5995fbbee6f3ab0db9b30612
pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
mesa:

glxgears -info

GL_RENDERER   = D3D12 (Intel(R) UHD Graphics 630)
GL_VERSION    = 3.1 Mesa 21.3.1 - kisak-mesa PPA
GL_VENDOR     = Microsoft Corporation
westonNexben commented 2 years ago

I think the title of this bug should be made more generic to clarify acceleration is not working on Intel UHD. Seems like a fairly important thing to fix.

valinet commented 2 years ago

@westonNexben Well, as mentioned in #334, I also happen to be facing the same problem. Furthermore, I also happen to have it on the same platform as you, similarly a Dell XPS 15 7590, with the UHD 630 and GTX 1650 GPU as well. Hopefully a solution is found.

KiloNovemberDelta commented 2 years ago

Hello everyone, I confirm, I have exactly the same issue. Gazebo is working well on WSL2 on my other computer with Nvidia, but showing a black screen with my main computer using Intel(R) Iris(R) Xe Graphics. Even though the drivers are all up to date, as it is asked for running wslg. Still trying to find a solution, good luck in your research !

KiloNovemberDelta commented 2 years ago

Regarding Gazebo, I have set "export LIBGL_ALWAYS_SOFTWARE=1" and then run gazebo, and I get now the GUI working well. I hope it may help people who had the same issue.

anilzeybek commented 2 years ago

Regarding Gazebo, I have set "export LIBGL_ALWAYS_SOFTWARE=1" and then run gazebo, and I get now the GUI working well. I hope it may help people who had the same issue.

yes but in this case you are not utilizing gpu, and since gazebo requires gpu to perform well, it is not that useful

KiloNovemberDelta commented 2 years ago

Yes indeed, I have checked, CPU is very high and GPU not used. I hope a fix will be delivered soon.

svetoslavenchev commented 2 years ago

Looks like the latest Intel Graphics Driver 30.0.101.1404, 2022-03-08 finally fixes the issue. Tested on latest Windows 11, Ubuntu 20.04, Mesa 21.3.7 (kisak-mesa stable PPA).

williamnavaraj commented 2 years ago

Any fix for Nvidia?

julien-robot commented 2 years ago

Looks like the latest Intel Graphics Driver 30.0.101.1404, 2022-03-08 finally fixes the issue. Tested on latest Windows 11, Ubuntu 20.04, Mesa 21.3.7 (kisak-mesa stable PPA).

I tested it on Windows 11, Ubuntu 20.04, Intel 630. Indeed 30.0.101.1404 finally brings something new. Gazebo works great now (fast and smooth and GPU usage about 70%). However Rviz is not fully ok for me. The grid and axes are displayed now but my robot is not showing with GPU acceleration on. I tried with Mesa 21.0.3, 21.2.6 and kisak (turtle) 21.3.7 (same as suggested by svetoslavenchev) but same result: grid and axes displayed but not my robot (while it is correctly displayed with GPU off: GALLIUM_DRIVER=llvmpipe).

julien-robot commented 2 years ago

I changed my laptop and upgraded to an Nvidia MX450 GPU. Result is identical in Rviz (and Gazebo). In fact, I realized that there is already an issue raised for Rviz addressing this specific problem (wslg issue 554). So, I would say that the original problem on Intel chipsets is now solved (Intel GPUs are now correctly supported) and I would recommend to close this issue.

tank104 commented 2 years ago

I have intel Iris Xe, and upgrade to: Intel Graphics Driver 30.0.101.1404 and stil had not luck. Even tried the later version than that. Still get blank screen

Tested on latest Windows 11, Ubuntu 20.04, Mesa 21.3.8

giulioturrisi commented 2 years ago

Same problem on my dell xps 13 9310 with intel iris xe and n. driver 30.0.101.1660

julien-robot commented 2 years ago

Since my new laptop has both an Nvidia MX450 and an Iris Xe, I had a try with the Iris Xe. I confirm that Gazebo remains black/empty with the Iris Xe (while it worked ok on my older laptop with same driver and Intel UHD 630). However, glxgears is working ok (gears are displayed and GPU acceleration provided by Iris Xe). Rviz is showing as well (but impacted by the global problem I mentionned earlier - STLs not being displayed). So now, It looks more like a Gazebo - Intel Iris problem only.

tank104 commented 2 years ago

Does anyone with Intel Iris happen to dual boot Linux is I see if it’s just a WSL issue or in both environments?

giulioturrisi commented 2 years ago

Does anyone with Intel Iris happen to dual boot Linux is I see if it’s just a WSL issue or in both environments?

Here! I don't have this problem on the linux partition

rmorassi commented 2 years ago

Edit: The latest Intel Graphics Driver 30.0.101.1960 does not fix the issue. The information in the message below is incorrect.

Original message: Hello everyone, Looks like the latest Intel Graphics Driver 30.0.101.1960 (10th May 2022) fixes the issue for the Intel(R) Iris(R) Xe. Rviz and Gazebo are working well and I don't have any black screens on WSL2.

julien-robot commented 2 years ago

Hello, I did a quick test on driver 30.0.101.1960. For me, the situation has not changed on Iris Xe: Gazebo is still black (and the meshes are not displayed in Rviz but this is a separate issue). rmorassi, I would tend to think that you had not GPU acceleration enabled when you did your test. At least, Rviz cannot be fully ok for now when GPU acceleration is on (wslg issue https://github.com/microsoft/wslg/issues/554) - this is true for Intel Iris, Intel UHD and Nvidia MX at least (that I tested).

giulioturrisi commented 2 years ago

The same for me, the problem still persist with the new driver (dell xps 9310)

tank104 commented 2 years ago

Anyone had any luck getting this working in hardware mode?

oliveira-jeliel commented 2 years ago

Hey guys, I'm also with the same problem, glxgears works fine showing gears, but with driver Intel® Graphics Driver 31.0.101.3222/31.0.101.2111 on Windows 11 Intel Iris Xe, Gazebo just shows black screen, managed to get it working only on software mode export LIBGL_ALWAYS_SOFTWARE=1. Anyone had success?

duyipai commented 2 years ago

Hey guys, I'm also with the same problem, glxgears works fine showing gears, but with driver Intel® Graphics Driver 31.0.101.3222/31.0.101.2111 on Windows 11 Intel Iris Xe, Gazebo just shows black screen, managed to get it working only on software mode export LIBGL_ALWAYS_SOFTWARE=1. Anyone had success?

Same here. No success with 31.0.101.3222

biiigwang commented 2 years ago

My friends, when I use coppeliaSim, the same problem occurs🤷: some of the openGL based screens are black. Hope to repair it as soon as possible!🙏

WSL2:Ubuntu20.04 CPU:12th Gen Intel(R) Core(TM) i7-12700 GPU: Intel(R) UHD Graphics 770

giulioturrisi commented 1 year ago

Just to keep the issue alive, the problem is still here, not matter which kernel or driver I'm using!

gulerburak commented 1 year ago

I have i7-12700H, Iris Xe, latest version of Win11 and Ubuntu 20.04, and the latest driver 31.0.101.4032. Rviz2 works but gazebo is still black screen.

image

rosiakpiotr commented 1 year ago

Is there anything happening towards solution? Feeling like this has been dead for too long now, being crucial feature for WSLg users that develop robotic systems using Gazebo.

ZacZhangzhuo commented 1 year ago

Looks like the latest Intel Graphics Driver 30.0.101.1404, 2022-03-08 finally fixes the issue. Tested on latest Windows 11, Ubuntu 20.04, Mesa 21.3.7 (kisak-mesa stable PPA).

saved my life TWO times!!!! The other day windows updated the system, then I have to reinstall this driver...

Looks like the latest Intel Graphics Driver 30.0.101.1404, 2022-03-08 finally fixes the issue. Tested on latest Windows 11, Ubuntu 20.04, Mesa 21.3.7 (kisak-mesa stable PPA).

I tested it on Windows 11, Ubuntu 20.04, Intel 630. Indeed 30.0.101.1404 finally brings something new. Gazebo works great now (fast and smooth and GPU usage about 70%). However Rviz is not fully ok for me. The grid and axes are displayed now but my robot is not showing with GPU acceleration on. I tried with Mesa 21.0.3, 21.2.6 and kisak (turtle) 21.3.7 (same as suggested by svetoslavenchev) but same result: grid and axes displayed but not my robot (while it is correctly displayed with GPU off: GALLIUM_DRIVER=llvmpipe).

This also works on my issue! I think the reinstallation just reset the GPU off, but every time I restart my laptop, the issue still happens. export GALLIUM_DRIVER=llvmpipe is the ultimate solution for me.

plantroon commented 9 months ago

Laptop with 1235U Intel Xe, still no way to get accelerated graphics in WSL. llvmpipeis CPU rendering, not a solution at all. My 5 years old Galaxy phone with Dex can run llvmpipe and just like the laptop, it barely plays FullHD youtube in Firefox. With working graphics acceleration it should be an easy task.

zhangbaozhe commented 7 months ago

Ubuntu 20.04 & Windows 11 & Intel Ultra 9 185H with Arc graphics still not working. Gazebo even won't show up unless using export LIBGL_ALWAYS_SOFTWARE=1.

zhangbaozhe commented 7 months ago

Ubuntu 20.04 & Windows 11 & Intel Ultra 9 185H with Arc graphics still not working. Gazebo even won't show up unless using export LIBGL_ALWAYS_SOFTWARE=1.

After I type gazebo in the terminal, it gives me a D3D12: Removing Device. warning.

icyreq commented 1 week ago

I try everything ,finally export GALLIUM_DRIVER=llvmpipe work!!