unified-hmi / remote-virtio-gpu

A UnifiedHMI project to provide a client-server based rendering engine.
Other
21 stars 14 forks source link

I tried to run rvgpu renderer using 'gem' and encountered some issues. can you tell me how to run it? #12

Closed Vizdl closed 1 year ago

Vizdl commented 1 year ago

I run the following command on the first window : sudo rvgpu-renderer -g /dev/dri/card0 -b 800x600@0,0 -p 55667

Run the following command in the second window

su
modprobe virtio-gpu
modprobe virtio_lo
mkdir -p /run/user/4 && \
export XDG_RUNTIME_DIR=/run/user/4 && \
rvgpu-proxy -s 800x600@0,0 -n 127.0.0.1:55667 &

export LD_LIBRARY_PATH=/usr/lib/mesa-virtio  && glmark2-es2

The following prompt appears in the first window

rvgpu-renderer: Connector 36, resolution 2358x1278, vsync 60
libinput info: event0  - Power Button: is tagged by udev as: Keyboard
libinput info: event0  - Power Button: device is a keyboard
libinput info: event4  - VMware VMware Virtual USB Mouse: is tagged by udev as: Mouse
libinput info: event4  - VMware VMware Virtual USB Mouse: device is a pointer
libinput info: event1  - AT Translated Set 2 keyboard: is tagged by udev as: Keyboard
libinput info: event1  - AT Translated Set 2 keyboard: device is a keyboard
libinput info: event3  - VirtualPS/2 VMware VMMouse: is tagged by udev as: Mouse
libinput info: event3  - VirtualPS/2 VMware VMMouse: device is a pointer
libinput info: event2  - VirtualPS/2 VMware VMMouse: is tagged by udev as: Mouse
libinput info: event2  - VirtualPS/2 VMware VMMouse: device is a pointer
gl_version 0 - compat profile
WARNING: running without ARB/KHR robustness in place may crash
rvgpu-renderer: ../src/dispatch_common.c:863: epoxy_get_proc_address: Assertion `0 && "Couldn't find current GLX or EGL context.\n"' failed.

The second window displays using software rendering

gbm: failed to open any driver (search paths /usr/lib/mesa-virtio/dri)
gbm: Last dlopen error: /usr/lib/mesa-virtio/dri/vmwgfx_dri.so: cannot open shared object file: No such file or directory
failed to load driver: vmwgfx
=======================================================
    glmark2 2021.02
=======================================================
    OpenGL Information
    GL_VENDOR:     VMware, Inc.
    GL_RENDERER:   llvmpipe (LLVM 16.0, 128 bits)
    GL_VERSION:    OpenGL ES 3.0 Mesa 18.2.0
=======================================================
FumiyaKohzu commented 1 year ago

Thank you for your comment.

It seems that the initialization of OpenGLES is failing according to the rvgpu-renderer log. Can you launch glmark2 without using remote-virtio-gpu?

Additionally, remote-virtio-gpu supports Ubuntu 20.04 LTS AMD64. Please let me know your operating environment.

Thank you.

Vizdl commented 1 year ago

感谢您的评论。

根据 rvgpu-renderer 日志,OpenGLES 的初始化似乎失败。您可以在不使用remote-virtio-gpu的情况下启动glmark2吗

此外,remote-virtio-gpu 支持 Ubuntu 20.04 LTS AMD64。请告知您的运行环境。

谢谢。

My environment is as follows

root@ubuntu:~$ uname -a
Linux ubuntu 5.15.0-79-generic #86~20.04.2-Ubuntu SMP Mon Jul 17 23:27:17 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

I used vmware to run it. this seems to cause the call to eglcreatecontext to fail. If you modify the version of 'ctxattr', you can successfully create a context, but there will still be other issues. eg : from

EGLint ctxattr[] = { 
  EGL_CONTEXT_MAJOR_VERSION_KHR, 3,
  EGL_CONTEXT_MINOR_VERSION_KHR, 0, 
  EGL_NONE
};

to

EGLint ctxattr[] = { 
  EGL_CONTEXT_MAJOR_VERSION_KHR, 2,
  EGL_CONTEXT_MINOR_VERSION_KHR, 0, 
  EGL_NONE
};

run glmark2 and output as follows

root@ubuntu:~/Desktop$ glmark2 
=======================================================
    glmark2 2021.02
=======================================================
    OpenGL Information
    GL_VENDOR:     VMware, Inc.
    GL_RENDERER:   SVGA3D; build: RELEASE;  LLVM;
    GL_VERSION:    4.1 (Compatibility Profile) Mesa 21.2.6
=======================================================
[build] use-vbo=false:

thank you for your help!

FumiyaKohzu commented 1 year ago

We have tested the operation of remote-virtio-gpu on native Ubuntu, but we have not verified its performance on VMware. Therefore, we cannot guarantee that remote-virtio-gpu will work on VMware.

RVGPU requires OpenGLES 3.0 or higher, but since the glmark2 results show "OpenGL 4.1," it seems that you cannot use OpenGLES 3.0 in your environment. Even if you execute the sudo apt install libgles2-mesa-dev command mentioned in the README, if you still cannot use OpenGLES 3.0, there is a possibility that VMware does not support OpenGLES 3.0. In that case, we kindly ask you to prepare an environment where OpenGLES 3.0 can be utilized through alternative means.

Thank you.

Vizdl commented 1 year ago

We have tested the operation of remote-virtio-gpu on native Ubuntu, but we have not verified its performance on VMware. Therefore, we cannot guarantee that remote-virtio-gpu will work on VMware.

RVGPU requires OpenGLES 3.0 or higher, but since the glmark2 results show "OpenGL 4.1," it seems that you cannot use OpenGLES 3.0 in your environment. Even if you execute the sudo apt install libgles2-mesa-dev command mentioned in the README, if you still cannot use OpenGLES 3.0, there is a possibility that VMware does not support OpenGLES 3.0. In that case, we kindly ask you to prepare an environment where OpenGLES 3.0 can be utilized through alternative means.

Thank you.

I have run smoothly using the physical machine environment, and perhaps I need to do some adaptation operations on vmware. Thank you for your answer!