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

error 7: failed to import supplied dmabufs: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a #3747

Open
flukejones opened this issue May 3, 2023 · 5 comments
Labels
api: gles Issues with GLES or WebGL api: vulkan Issues with Vulkan external: upstream Issues happening in lower level APIs or platforms platform: hybrid graphics Issues with machines with attached integrated and dedicated gpus platform: wayland Issues with integration with linux/wayland

Comments

@flukejones
Copy link
Contributor

Unable to run wgpu examples on an Nvidia hybrid laptop in wayland session due to error 7: failed to import supplied dmabufs: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a (error is cut off in log). It looks like everything initializes fine otherwise.

Reproduce

Own an Nvidia hybrid laptop running Linux, Wayland session (I do not have X11 installed).

RUST_LOG=debug RUST_BACKTRACE=full __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia cargo run --example boids

Platform
OS: Fedora Linux 38 (Workstation Edition) x86_64
Kernel: 6.4.0-0.rc0.20230426git0cfd8703e7da.4.fc38.x86_64
Shell: bash 5.2.15
Resolution: 5120x2160
DE: GNOME 44.0
WM: Mutter
CPU: 12th Gen Intel i9-12900H (20) @ 4.900GHz
GPU: NVIDIA Geforce RTX 3070 Ti Laptop GPU
GPU: Intel Alder Lake-P

wgpu-log-1.txt

RUST_LOG=debug RUST_BACKTRACE=full __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia cargo run --example boids

The above is the same with WGPU_BACKEND=vulkan

wgpu-log-2(gl).txt

RUST_LOG=debug RUST_BACKTRACE=full __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia WGPU_ADAPTER_NAME=3070 WGPU_BACKEND=gl cargo run --example boids

I seem to be completely unable to run wgpu examples on the Nvidia GPU. Running on Intel GPU is fine.

@teoxoy teoxoy added external: upstream Issues happening in lower level APIs or platforms api: gles Issues with GLES or WebGL api: vulkan Issues with Vulkan platform: wayland Issues with integration with linux/wayland platform: hybrid graphics Issues with machines with attached integrated and dedicated gpus and removed external: upstream Issues happening in lower level APIs or platforms labels May 4, 2023
@teoxoy
Copy link
Member

teoxoy commented May 4, 2023

You might be hitting this issue: NVIDIA/egl-wayland#41 (comment)

Can you try to run vkcube-wayland?

Based on the resolution (5120x2160), that would indicate a 21:9 aspect which would most likely be a monitor.

Are you trying to run the examples on the monitor or the laptop screen?
If on the monitor, do you know if the port is directly connected to the dGPU? (If it is, you don't need PRIME at all)

@flukejones
Copy link
Contributor Author

huh, okay then:

❯ vkcube-wayland 
Selected GPU 1: NVIDIA GeForce RTX 3070 Ti Laptop GPU, type: DiscreteGpu
warning: queue 0x55dd716121e0 destroyed while proxies still attached:
  wl_registry@9 still attached
Segmentation fault (core dumped)

❯ __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia vkcube-wayland
Selected GPU 0: NVIDIA GeForce RTX 3070 Ti Laptop GPU, type: DiscreteGpu
warning: queue 0x560900435ee0 destroyed while proxies still attached:
  wl_registry@9 still attached
[destroyed object]: error 7: failed to import supplied dmabufs: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a

Will test with an output on dgpu momentarily (errors are same for laptop screen, I guess because that is also on iGPU).

@flukejones
Copy link
Contributor Author

The same issues occur on dGPU connected display

@flukejones
Copy link
Contributor Author

It appears to be a known issue and being worked on (followed through a few links) - NVIDIA/egl-wayland#72

@teoxoy teoxoy added the external: upstream Issues happening in lower level APIs or platforms label May 6, 2023
@flukejones
Copy link
Contributor Author

Per reply at NVIDIA/egl-wayland#72 (comment)

This feature has been implemented by @dkorkmazturk. It will be available in the next major driver version, 545 (not the recently released 535 beta).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: gles Issues with GLES or WebGL api: vulkan Issues with Vulkan external: upstream Issues happening in lower level APIs or platforms platform: hybrid graphics Issues with machines with attached integrated and dedicated gpus platform: wayland Issues with integration with linux/wayland
Projects
None yet
Development

No branches or pull requests

2 participants