ERROR_OUT_OF_HOST_MEMORY with Qt on Linux/Wayland
Relates to #470
Trying to use wgpu with PySide6 today, I get the following error:
thread '<unnamed>' panicked at /root/.cargo/git/checkouts/wgpu-53e70f8674b08dd4/9f505e7/wgpu-hal/src/vulkan/instance.rs:395:18:
XlibSurface::create_xlib_surface() failed: ERROR_OUT_OF_HOST_MEMORY
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Aborted (core dumped)
Things work as expected with glfw. The error seems to be related to obtaining a surface id. A process that indeed goes a little different with the qt backend, because we seem unable to get the actual surface id of a qt widget. I don't yet understand why this is suddenly a problem. It worked fine some weeks ago.
Seems specific to Wayland.
I've been using wayland on Ubuntu 24.04 as my daily driving for the last few weeks at least. (Only integrated graphics, no Nvidia graphics card)
I tried it in on Ubuntu 23.10 and it was pretty bad and I would see errors like the one you described above. So my hunch is that likely the some version in the graphics stack is too old.
And to speicfy, we use the following conda packages for our wgpu/pygfx stack:
$ mamba list | grep -E "(wgpu|pyside|pygfx)"
pygfx 0.2.0 pyhd8ed1ab_0 conda-forge
pyside6 6.7.0 py310h7a3fa89_1 conda-forge
wgpu-native 0.19.3.1 h2b8f863_0 conda-forge
wgpu-py 0.15.2 pyha804496_0 conda-forge
ps. i noticed that conda-forge qt6-wayland is likely broken recently, so maybe i'm not using "qt wayland"
We track this in pygfx/rendercanvas#36