Open CommandMC opened 1 year ago
I've now reproduced this issue with a napi-rs
project as well, so this doesn't seem library-specific anymore
@CommandMC Have you been able to figure out a solution or is this a flatpak moment?
Sadly no. We've ended up bundling a small Rust CLI app with our program, as we just needed some device information
@CommandMC Have you been able to figure out a solution or is this a flatpak moment?
Found any solution to this? I looked into flatpak list and it has mesa and some nvidia drivers could it be the problem? Note I'm using electron-vite and window works perfectly.
Yeah flatpak has its own copy of mesa, which I thought was the issue, since it couldn't find the system vulkan drivers. I gave up after trying trying to redirect VK_ICD_FILENAMES
, VK_DRIVER_FILES
and NCNN_VULKAN_DRIVER
to system ones with export VK_DRIVER_FILES=/usr/lib/$(uname -m)-linux-gnu/GL/vulkan/icd.d
to no avail. :(
If you ever find a solution I'd be very interested 🤣
Yeah flatpak has its own copy of mesa, which I thought was the issue, since it couldn't find the system vulkan drivers. I gave up after trying trying to redirect
VK_ICD_FILENAMES
,VK_DRIVER_FILES
andNCNN_VULKAN_DRIVER
to system ones withexport VK_DRIVER_FILES=/usr/lib/$(uname -m)-linux-gnu/GL/vulkan/icd.d
to no avail. :( If you ever find a solution I'd be very interested 🤣
Aha I will try to reinstall the drivers and give it couple more tries if this keeps happening we have to start learning Rust 😂😂
I think I've got half of the puzzle from here: https://stackoverflow.com/a/77916976/13734642
I installed the nvidia-container-toolkit then most of the issues disappeared except these 2:
Warning: loader_scanned_icd_add: Could not get 'vkCreateInstance' via 'vk_icdGetInstanceProcAddr' for ICD libGLX_nvidia.so.0
Warning: terminator_CreateInstance: Failed to CreateInstance in ICD 3. Skipping ICD.
Checklist
Flatpak version
1.15.4
What Linux distribution are you using?
Arch Linux
Linux distribution version
No response
What architecture are you using?
x86_64
How to reproduce
https://github.com/CommandMC/electron-sample-app
npm i
), try to start the app. Note the messageSuccessfully created Vulkan instance!
in the consoleflatpak-builder ...
), run the installed applicationVkResult
of -9 (VK_ERROR_INCOMPATIBLE_DRIVER
)Expected Behavior
Instance creation should succeed
Actual Behavior
Instance creation does not succeed
Additional Information
Using other non-Node tools to verify Vulkan functionality (
vulkaninfo
/ adding Python into a sandbox & trying to call the same function with itsctypes
module) works, so this must be some specific interaction between NodeJS and Flatpak