egl-wayland icon indicating copy to clipboard operation
egl-wayland copied to clipboard

issues with boxes and 3D accel

Open ryzendew opened this issue 11 months ago • 7 comments

Boxes.logs.txt can't use EGL and opengl in boxes

ryzendew avatar Mar 05 '24 22:03 ryzendew

Can you be more specific about what you're trying to run, and what it's doing?

A VM is going to provide its own virtualized graphics device, so nothing running in the VM is going to see the NVIDIA GPU.

kbrenneman avatar Mar 06 '24 00:03 kbrenneman

The "3D acceleration" switch in boxes tells QEMU to create a virtio-gpu device in the guest system. The virtio-gpu DRM driver pipes commands back to the host system using a custom protocol where they're translated to OpenGL calls by the virglrenderer library. I believe the term they use for this is "paravirtualization", it's an interesting approach.

Anyway, based on the logs, it looks like QEMU is failing to initialize EGL on the host system in this case.

Strangely, if I try it on my system, EGL does get initialized successfully. I see "gl_version 46 - core profile enabled" in my log. However the window itself remains blank. So something definitely seems wrong in both cases, but it's odd that the symptoms are different.

erik-kz avatar Mar 06 '24 01:03 erik-kz

Boxes has given up trying to fix the issue pretty much it’s nothing to do on their end and this only happens on Nvidia

ryzendew avatar Mar 06 '24 08:03 ryzendew

Can you be more specific about what you're trying to run, and what it's doing?

A VM is going to provide its own virtualized graphics device, so nothing running in the VM is going to see the NVIDIA GPU.

It uses the Nvidia GPU to accelerate the VM using open GL and this issue is only an Nvidia issue. There’s no issue on Amd. And it’s not anything wrong on boxes end this also happens in other applications like virt.

ryzendew avatar Mar 06 '24 08:03 ryzendew

@RyzenDew - What distro, which version of the driver, which version of EGL-Wayland, and which compositor are you using?

Messages from KHR_EGL_debug would probably be useful, too, since the Boxes log file doesn't even include the EGL error code. I wrote up a library that can do that for an unmodified program here: https://gitlab.freedesktop.org/kbrenneman/gl-debug-preload

kbrenneman avatar Mar 06 '24 14:03 kbrenneman

As of commit 1f086ef642 ("ui/egl: print EGL error, helping debugging") I think QEMU will print the EGL error code if eglInitialize fails. So you could also use a git build of QEMU.

erik-kz avatar Mar 06 '24 17:03 erik-kz

@RyzenDew - What distro, which version of the driver, which version of EGL-Wayland, and which compositor are you using?

Messages from KHR_EGL_debug would probably be useful, too, since the Boxes log file doesn't even include the EGL error code. I wrote up a library that can do that for an unmodified program here: https://gitlab.freedesktop.org/kbrenneman/gl-debug-preload

gnome-boxes flatpak Arch linux 550.54.14 and i will try and get logs

ryzendew avatar Mar 06 '24 21:03 ryzendew