-
Notifications
You must be signed in to change notification settings - Fork 961
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
Compilation fails with 'Error in Surface::configure: parent device is lost'
when Nvidia GPU is selected on Linux
#2519
Comments
After talk with developers of Wayland implementation in Rust, only way to possibly fix this issue is checking if given Compositor explicitely advertises DMA-BUF v4 control. DMA-BUF is efficient replacement for Shared Memory (shm) for sending buffers directly to GPU and don't process them in CPU. Problem is that, it's not really popular in Compsositors to have such thing implemented manually but backend libraries such as smithay or wlroots are working on it. I think wgpu should open connection with Compositor through |
@heavyrain266 I guess I'd like to understand better why |
Thats quite complicated topic generally, few months ago they added Wayland support in drivers but not yet everything works as it should. Vulkan is complicated as well and you need to dispatch some globals and WSI integration in renderer, like WaylandSurfaceKHR, somethig with memory in name etc. Wayland uses Linux's DMA-BUF (Direct Memory Access) API which is replacement for SHM (Shared Memory) , Both APIs are used to share memory with Compositor to create client buffer which is composited with display buffer, now it will display it as toplevel surface aka "window". Rest is handled by winit which setup globals for From my knowledge Nvidia doesn't even implement vulkan dmabuf extension and information and selected card by vkcube must he missleading and use integrated gpu instead. Same thing must happen to my Compositor which uses vulkan as well because nvidia tools shows that nvidia card uses it but this will lead to crash on start. At the end, doesn't matter if you try to display vulkan program on gles2 or vulkan based Compositor, your client and driver must support dmabif extension and dispatch some globals. |
Okay. I'm going to work on the assumption that we can't generally expect to do better than |
From my tests: vkcube does use the nvidia gpu, but it just runs on xwayland instead. |
Try running it with |
Hi, I have this problem on Ubuntu 22.04. I have a somewhat unusual multi-GPU setup (3xRTX 3090 + 1xAMD GCN5 integrated GPU), with the monitor currently attached to one of the RTX 3090s. In my case, I am using Xorg rather than Wayland, and I also tried playing with WGPU_ADAPTER_NAME and WGPU_BACKEND, but neither seems to have any effect, no matter what values I use. If I can help you test anything or provide more info, let me know! |
same on Ubuntu 22.10 (Wayland). HW: Ryzen 5 5600H + RTX 3060 |
@heavyrain266 @viandoxdev @adsick as this sounds like a wayland only issue, please try @louismhowe could you open a new issue (since this issue seems to be related to laptops with hybrid graphics)? |
If vkcube is not using sRGB then it will always work just fine. As of nvidia doesn't support sRGB surfaces on Wayland yet. |
@teoxoy I'm sorry, I don't know what you mean by "try vkcube-wayland on the Nvidia dGPU and report your results" |
The |
|
Hi, Im also having this issue, im running kde-wayland on void-linux. First noticed it because halloy (irc client built with iced-rs) broke. and now i cant even run basic wgpu samples. halloy did use to work, but not anymore.
|
Description
I have tried to run any of examples and my program with
HighPerformance
(Vulkan) device settings, GL backend fails to LLVMpipe (wgpu 0.12).Currently running Vulkan based Wayland Compositor on this GPU as well as
vkcube
outputs that nvidia is in useSelected GPU 1: NVIDIA GeForce GTX 1650 Ti, type: 2
Repro steps
Try to run any wgpu-based program or example on laptop with nvidia as descrete gpu.
Expected vs observed behavior
Program should run just fine but instead throws error
'Error in Surface::configure: parent device is lost'
Extra materials
Running with
wgpu::PowerPreference::LowPower
outputs radeon card and works as you can see on image bellow.Platform
Linux 5.15.24_1 on HP Omen 15 with Nvidia 1650ti
The text was updated successfully, but these errors were encountered: