haosulab / ManiSkill-Legacy

SAPIEN Manipulation Skill Benchmark (NeurIPS 2021 Track on Datasets and Benchmarks)
Apache License 2.0
150 stars 14 forks source link

rendering in VNC server #6

Closed hskAlena closed 3 years ago

hskAlena commented 3 years ago

Hello,

I'm trying to use 'viewer' for debugging, but when I uncomment env.render('human') in basic_example.py, I get RuntimeError: vk::PhysicalDevice::getSurfaceFormatsKHR: ErrorInitializationFailed when I do this on VNC server. The viewer works well on a local machine.

I guess the VNC server setting is not a problem since it can render other gym environments like 'Humanoid-v2'.

I installed vulkan-utils just in case, sudo apt install vulkan-utils. But things didn't change.

How can I fix this?

tongzhoumu commented 3 years ago

Hi hskAlena, can you provide more information about how you set up your VNC server? As far as I know, some VNC do not support vulkan.

hskAlena commented 3 years ago

I am using a tigervnc server with xfce4 and a realvnc viewer. Also it's ubuntu 18.04!

sudo apt update
sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils
sudo apt install tigervnc-standalone-server tigervnc-common

Thank you!

tongzhoumu commented 3 years ago

I guess xfce4 does not support vulkan. There is an alternative solution.

Let me know whether this works for you.

hskAlena commented 3 years ago

Sadly, it doesn't work for me. I get black screen everytime I try.

I have searched a lot, and those are what I've found out so far. Please correct me if I have something wrong.

  1. Changing 'tigervnc +xfce4' to 'tigervnc+ gnome flashback' didn't work with the vulkan thing. So, I guess vulkan doesn't work with X desktop.
  2. So I came back to x11vnc (which doesn't require X desktop according to wiki) and I've found out x11vnc -display :1 -auth guess works, not x11vnc -display :1. This is trivial tho.
  3. I changed gdm3 to lightdm, following the direction from youtube. But nothing changed.
  4. I connected the remote server with a physical display, since I saw black screen problem can be solved with HDMI dummy thing. However, it didn't work.
hskAlena commented 3 years ago

I finally found out that Vino vnc server works. Although it needs HDMI connection and seems to have weak security, it works. However, if you find x11vnc or other working, please let me know!

Thank you! :)

tongzhoumu commented 3 years ago

Good to see you have found a solution!

BTW, vulkan does work with X desktop and this is how I visualize on a remote server. Did you test vulkaninfo in the X desktop you create?

hskAlena commented 3 years ago

Sadly vulkaninfo doesn't work.

It works on local machine with a monitor on, but doesn't work on X desktop. The error message is /build/vulkan-tools-136mCR/vulkan-tools-1.1.126.0+dfsg1/vulkaninfo/vulkaninfo.h:816: failed with ERROR_INITIALIZATION_FAILED.

I've done the followings,

  1. export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json:/usr/share/vulkan/icd.d/nvidia_icd.json - didn't work
  2. modifying /lib/systemd/system/gdm3.service - didn't work
    [Service]
    ExecStartPre=/usr/bin/xinit /usr/share/gdm/generate-config
  3. echo $XDG_SESSION_TYPE prints out x11.

So,,, I guess I'm gonna stick to Vino server, not X desktop, if any other easy solution doesn't come out. :')