News: 0001604257

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Flatpak Exploring GPU Virtualization To Ease Driver Challenges

([Free Software] 5 Hours Ago Flatpak + GPU Virtualization)


Open-source developer Sebastian Wick has written a blog post outlining work to improve the graphics driver situation for Flatpaks. Particularly around situations like the NVIDIA driver stack that may depend upon a specific kernel version or where a Flatpak runtime may be end-of-life, dealing with GPU drivers in Flatpaks can be a burden. A solution being explored is GPU virtualization to deal with those GPU driver handling challenges while still providing robust and secure GPU access.

GPU virtualization is being explored by leveraging VirtIO-GPU and Mesa Venus to avoid having to deal with driver-specific runtime extensions and other complications. Sebastian Wick elaborated in a blog post on Monday:

"If we avoid getting code from the host into the runtime, all of those issues just go away, and GPU virtualization via Virtio-GPU with Venus allows us to do exactly that.

The VM uses the Venus driver to record and serialize the Vulkan commands, sends them to the hypervisor via the virtio-gpu kernel driver. The host uses virglrenderer to deserializes and executes the commands.

This makes sense for VMs, but we don’t have a VM, and we might not have the virtio-gpu kernel module, and we might not be able to load it without privileges. Not great.

It turns out however that the developers of virglrenderer also don’t want to have to run a VM to run and test their project and thus added vtest, which uses a unix socket to transport the commands from the mesa Venus driver to virglrenderer.

It also turns out that I’m not the first one who noticed this, and there is some glue code which allows Podman to make use of virgl."

This GPU virtualization could also be treated as a robust fallback where no other GPU driver solution is working in a Flatpak runtime.

Those wishing to learn more about this proposed approach of using GPU virtualization in the Flatpak world can find out all the current ideas via [1]Sebastian's blog .



[1] https://blog.sebastianwick.net/posts/flatpak-graphics-drivers/



The chief enemy of creativity is "good" sense
-- Picasso