Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issues with boxes and 3D accel #105

Open
ryzendew opened this issue Mar 5, 2024 · 7 comments
Open

issues with boxes and 3D accel #105

ryzendew opened this issue Mar 5, 2024 · 7 comments

Comments

@ryzendew
Copy link

ryzendew commented Mar 5, 2024

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

@kbrenneman
Copy link
Collaborator

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.

@erik-kz
Copy link

erik-kz commented Mar 6, 2024

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.

@ryzendew
Copy link
Author

ryzendew commented Mar 6, 2024

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
Copy link
Author

ryzendew commented Mar 6, 2024

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.

@kbrenneman
Copy link
Collaborator

@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

@erik-kz
Copy link

erik-kz commented Mar 6, 2024

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.

@ryzendew
Copy link
Author

ryzendew commented Mar 6, 2024

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants