Genesis icon indicating copy to clipboard operation
Genesis copied to clipboard

black window while running in wsl2

Open Controlist20 opened this issue 1 year ago • 12 comments

Hi I was trying to run the simplest example that you shared in Hello Genesis. It is running but it is a black window. I tested my opengl with another simple script, it was running without any issue.

image

image

Controlist20 avatar Dec 19 '24 20:12 Controlist20

Try:

export PYOPENGL_PLATFORM=glx

urish avatar Dec 19 '24 20:12 urish

This does not work for me can you share which version of PYOPENGL and PyOpenGL_accelerate are you running? @urish Thanks!

orioljim1 avatar Dec 19 '24 21:12 orioljim1

$ pip freeze | grep -i pyopengl
PyOpenGL==3.1.7

about PyOpenGL_accelerate - I don't think I have it installed

urish avatar Dec 19 '24 21:12 urish

Try:

export PYOPENGL_PLATFORM=glx

Thanks for quick response. Initially opengl did not work at all. I created launch file for export PYOPENGL_PLATFORM=gle. Then it started running but the window was black as I shared. I decrease the max FPS. It is running now but not efficient. I will try it on my other pc with nvidia gpu.

Controlist20 avatar Dec 20 '24 00:12 Controlist20

I meet this problem too, in VMware ubuntu20. but in the black window, it shows "[i] show keyboard instructions", which i can triger by keyboad and shows menus.

meijie-jesse avatar Dec 20 '24 03:12 meijie-jesse

I also encountered the same problem in WSL2, and the window remained black.

RRGGZZ avatar Dec 20 '24 05:12 RRGGZZ

I met with the same problem with black window when running the hello_genesis, on ubuntu22.

chenqiguo avatar Dec 20 '24 10:12 chenqiguo

I met with the same problem with black window when running the hello_genesis, on ubuntu22.

Decreasing the max_FPS to 30 or 20 solve the problem but very inefficient

chenqiguo avatar Dec 20 '24 11:12 chenqiguo

I met with the same problem with black window when running the hello_genesis, on ubuntu22.

Decreasing the max_FPS to 30 or 20 solve the problem but very inefficient

Thanks, I tried 40、30、20 but it not work. I successfully run it by switching to the physical machine, not vmware or wsl2.

meijie-jesse avatar Dec 20 '24 11:12 meijie-jesse

This project does not appear to run properly in the virtual machine

RRGGZZ avatar Dec 20 '24 12:12 RRGGZZ

image Very, very slow, very stuck

AgentOfLyra avatar Dec 20 '24 20:12 AgentOfLyra

Same here. It runs, and the debug says it's at ~60 FPS, but the GUI is super slow at ~1 FPS. It's the same on CPU or CUDA/GPU. Interestingly, it was fine before the latest commit.

image image

aidinism avatar Dec 23 '24 22:12 aidinism

hi, guys. I met same problems in my New year holidays. Finally I found a solution in my case. (llvmpipe error I guess)

situation : tutorial / hello_genesis.py running in docker on wsl2. HW : laptop ryzen 7 (with AMD Grafic card) and Geforce RTX 3050 : two graphic card cause a problem in wsl2/docker.

  1. Library linker is complex in new wsl2, if driver was instaled in Windows 11.
    Nvidia driver lay in /usr/lib/wsl/lib, not installed in default settings. Add drivers link in LD_LIBRARY_PATH.
  2. Dockerfile in Genesis doesn't refer previous directory, so that you should add volume link in the Dockerfile.
  3. Genesis uses mesa library but it's difficult to find nvidia driver if there are two graphic library.
    Add MESA_D3D12_DEFAULT_ADAPTER_NAME="NVIDIA"
docker run --gpus all --rm -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix -v $PWD:/workspace -v /usr/lib/wsl:/usr/lib/wsl genesis
export LD_LIBRARY_PATH=/usr/lib/wsl/lib:LD_LIBRARY_PATH
export MESA_D3D12_DEFAULT_ADAPTER_NAME="NVIDIA"
python examples/tutorials/hello_genesis.py
  1. check settings using mesa-utils.

Following status is correct. Extended renderer info (GLX_MESA_query_renderer): Vendor: Microsoft Corporation (0xffffffff) Device: D3D12 (NVIDIA GeForce RTX 3050 Laptop GPU) (0xffffffff)

apt update && apt install mesa-utils
glxinfo -B

Reference
https://github.com/microsoft/WSL/issues/7507#issuecomment-1698412148 https://qiita.com/matttchan/items/5d6eb8f54640e01b9154

Sincerely

myamazum avatar Jan 05 '25 09:01 myamazum

I met same issue. I do need export PYOPENGL_PLATFORM=glx to get it work.

However, export LD_LIBRARY_PATH=/usr/lib/wsl/lib is a workaround solution. The root issue is incorrect driver got installed in WSL2 causing this device not found issue. I posted the detail at https://stackoverflow.com/a/79357542/2000548

hongbo-miao avatar Jan 17 '25 06:01 hongbo-miao