NVIDIA / egl-wayland

The EGLStream-based Wayland external platform
MIT License
275 stars 43 forks source link

1.1.12 regression: can not run glmark2-es2-wayland with prime render offload #83

Closed thesourcehim closed 2 months ago

thesourcehim commented 1 year ago

After updating egl-wayland to 1.1.12 native wayland gl apps like glmark2-es2-wayland can not use nvidia gpu (offload mode), fail with "error 7: importing the supplied dmabufs failed". Reverting back to 1.1.11 solves the issue.

NVIDIA RTX 3060 laptop gpu with 535.54.03 driver

Operating System: Fedora Linux 38 KDE Plasma Version: 5.27.5 KDE Frameworks Version: 5.107.0 Qt Version: 5.15.10 Kernel Version: 6.3.9-200.fc38.x86_64 (64-bit) Graphics Platform: Wayland Processors: 16 × Intel® Core™ i7-10870H CPU @ 2.20GHz Memory: 15.4 ГиБ of RAM Graphics Processor: Mesa Intel® UHD Graphics Manufacturer: Dell Inc. Product Name: Dell G15 5510

ZAQraven commented 1 year ago

Same issue here like running on Blender. Using Fedora Linux 38 KDE.

erik-kz commented 1 year ago

Probably Kwin is trying to have the Intel GPU import memory which uses NVIDIA's tiled layout. Our driver will only use that layout if the compositor tells us it's supported, so if Kwin is advertising such support that's probably a bug.

thesourcehim commented 1 year ago

I can confirm that under gnome wayland session glmark runs fine. It's indeed fails only under KDE.

ZAQraven commented 1 year ago

Probably Kwin is trying to have the Intel GPU import memory which uses NVIDIA's tiled layout.

Mine is AMD Ryzen 7 5800H with Radeon Graphics

Liverel commented 1 year ago

This has to be a KDE issue because I also tested on Gnome Wayland, and OpenGL apps work fine there. This will need to be reported to KDE developers.

thesourcehim commented 1 year ago

https://bugs.kde.org/show_bug.cgi?id=471559

erik-kz commented 11 months ago

Whoop, sorry. On further investigation it turns out this actually is a bug on our side. We're not correctly processing the dma-buf feedback that Kwin sends us. It's a fairly simple fix, fortunately.

erik-kz commented 11 months ago

This should be fixed by https://github.com/NVIDIA/egl-wayland/commit/ea70449fd94b5f866ea6189bf4f41f7c230cccfa

thesourcehim commented 11 months ago

I confirm, works properly now

leandro-benedet-garcia commented 8 months ago

Hello, I am unsure if the issue is with egl-wayland or something else, but I am having a related issue with gentoo

This was not happening before and I can't tell what change made it not work. I am using a Alienware 15 r2 (https://laptopmedia.com/laptop-specs/alienware-15-r2-41/) it has optimus, intel integrated graphics, no I can't disable it in the bios, and a nvidia card.

In sum with Plasma Wayland and Hyprland vkcube-wayland literally crashes with a segmentation fault. And I have no idea why.

Here's what kinda works but they are not the ideal solution:

Using egl-wayland 1.11, 1.12 and 1.13 does nothing.

And I kid you not, vulkaninfo always, always, ends in a segmentation fault, regardless if vkcube-wayland or whatever works, it segfaults at the end.

if I run vkcube-wayland with prime-run, isntead of segmentation fault, I get this error instead:

Selected GPU 1: NVIDIA GeForce GTX 965M, type: DiscreteGpu
[destroyed object]: error 7: importing the supplied dmabufs failed    

Here's all the logs that I can think of: dmesg: https://pastebin.com/4bLFD0pe glxinfo: https://pastebin.com/jdBmddzY prime-run glxinfo: https://pastebin.com/gQQFWjPe vulkaninfo: https://pastebin.com/CXrMbNpu kernel configuration: https://pastebin.com/cpHRVvjB emerge --info: https://pastebin.com/8BdHPC6b

erik-kz commented 8 months ago

@leandro-benedet-garcia PRIME render-offload support for Vulkan Wayland applications is available in the recent 545.23.06 beta driver release. With older drivers (including the version you're using) it doesn't work.

leandro-benedet-garcia commented 8 months ago

@leandro-benedet-garcia PRIME render-offload support for Vulkan Wayland applications is available in the recent 545.23.06 beta driver release. With older drivers (including the version you're using) it doesn't work.

Man, my brain must be really dying, because I could have sworn that it worked before. Maybe it was running in the iGpu instead?

Yep, installing the beta drivers made it work

Thank you very much