I’m using Bazzite but this is a general development question with regards to compiling and running programs that need hardware access like the GPU.
I am trying to build and run the Bevy game engine which requires some devel dependencies to be installed, for example libX11-devel, alsa-lib-devel, systemd-devel, wayland-devel and libxkbcommon-devel. While these libs are installed in the base system, the devel packages are not.
I tried adding an Ubuntu container using BoxBuddy and installing the required packages through that (I’m more familiar with Ubuntu/apt) which allowed me to compile bevy, but when I run bevy from the Ubuntu container it does not detect my NVIDIA GPU. It did run Bevy but it was using LLVM Pipe instead of the NVIDIA driver.
In the end I installed the devel dependencies using rpm-ostree which worked as expected but I know this isn’t the recommended way of doing things.
Is there a better way of installing dev dependencies while still being able to access the hardware of the host system like the NVIDIA driver or is the rpm-ostree approach for now?
Ah thanks for that, I was used BoxBuddy to create the container and I don’t think that was surfaced that option. I will give that a try when I’m back at my home PC.
I have tried this out now and it is not only partially working, GL applications can use the NVIDIA GPU but Vulkan applications cannot. Bevy uses WGPU which is a higher level abstraction that I think will be using Vulkan under the hood.
I’ve installed the mesa-tools and vuklan-tools packages into the ubuntu-nvidia box, running glxheads shows the GL renderer is using the NVIDIA GPU but running vkcube shows that Vulkan is using the llvmpipe software renderer (glxinfo/vulkaninfo display more detailed info but effectively show the same thing).
I can see the GPU as expected if I use a tool like screenfetch.