container to build a qemu game streaming host-capable vm supporting full graphics and video acceleration with consumer intel and amd gpus, including igpus
  • Dockerfile 56.1%
  • Shell 43.9%
Find a file
2026-04-13 18:01:10 +03:00
cbindgen@d458634955 add mesa driver 2026-04-13 16:37:22 +03:00
flatpak-builder-tools@9d9ad80a55 add mesa driver 2026-04-13 16:37:22 +03:00
mesa@889f71f71a add mesa driver 2026-04-13 16:37:22 +03:00
patches apparently thats UPSTREAMED??? 2026-04-13 10:59:25 +03:00
qemu@becd22fdc2 initial slonkmit 2026-04-13 10:18:24 +03:00
virglrenderer@79ed6bbd43 initial slonkmit 2026-04-13 10:18:24 +03:00
.gitignore add mesa driver 2026-04-13 16:37:22 +03:00
.gitmodules add mesa driver 2026-04-13 16:37:22 +03:00
benchmark.sh add mesa driver 2026-04-13 16:37:22 +03:00
container.gitconfig apparently thats UPSTREAMED??? 2026-04-13 10:59:25 +03:00
install.sh add -f flag back 2026-04-13 10:19:02 +03:00
mesa.Dockerfile add mesa driver 2026-04-13 16:37:22 +03:00
org.freedesktop.Platform.GL.mesa-virtio.yml holy spirv 2026-04-13 18:01:10 +03:00
python3-PyYAML.json add mesa driver 2026-04-13 16:37:22 +03:00
qemu.Dockerfile add mesa driver 2026-04-13 16:37:22 +03:00
README.md thanks biden 2026-04-13 17:46:33 +03:00
sources.sh add mesa driver 2026-04-13 16:37:22 +03:00

qemu-gaming

container to build a qemu game streaming host-capable vm supporting full graphics and video acceleration with consumer intel, and amd gpus, including igpus

this was made possible by the 'Support virtio-gpu DRM native context' patchset by Dmitry Osipenko et al. and virglrenderer team.

patches

building

podman build -t qemu-gaming . -f qemu.Dockerfile

using the qemu build

the qemu build currently includes all the GUI bits, so you can copy it out of the container with the provided install.sh, which sets up the required suid bits and configuration to mount it as a systemd-sysext extension, making it the system default qemu binary transparently.

build mesa for the guest

for f43 host:

podman build -t mesa-virtio . -f mesa.Dockerfile

for flatpak:

# if you don't have flathub
flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# if you don't have org.flatpak.Builder
flatpak install --user org.flatpak.Builder

# build the drivers
flatpak run org.flatpak.Builder --user --install-deps-from=flathub --force-clean --repo repo builddir org.freedesktop.Platform.GL.mesa-virtio.yml
# export to a .flatpak file, which you can then install in the guest
flatpak build-bundle --runtime repo mesa-virtio.flatpak org.freedesktop.Platform.GL.mesa-virtio

how to make a system extension

it's quite simple really. i'll leave this snippet of the terminal, and you can make your own extension in a similar way

slonk@thinkpad:~/qemu$ sudo mkdir /etc/extensions/qemu-gaming/{usr,etc} -p
slonk@thinkpad:~/qemu$ sudo cp --no-preserve=ownership -r usr/{share,lib64,libexec,bin,sbin} /etc/extensions/qemu-gaming/usr
slonk@thinkpad:~/qemu$ sudo cp --no-preserve=ownership -r usr/etc/* /etc/extensions/qemu-gaming/etc
slonk@thinkpad:~/qemu$ sudo systemd-sysext list
NAME        TYPE      PATH                        TIME
qemu-gaming directory /etc/extensions/qemu-gaming Mon 2026-04-13 11:39:22 +03
slonk@thinkpad:~/qemu$ which qemu-system-x86_64
/usr/bin/qemu-system-x86_64
slonk@thinkpad:~/qemu$ qemu-system-x86_64 --version
QEMU emulator version 10.1.5 (qemu-10.1.5-1.fc43)
Copyright (c) 2003-2025 Fabrice Bellard and the QEMU Project developers
slonk@thinkpad:~/qemu$ sudo systemd-sysext merge --force
Using extensions 'qemu-gaming'.
Merged extensions into '/usr'.
slonk@thinkpad:~/qemu$ which qemu-system-x86_64
/usr/bin/qemu-system-x86_64
slonk@thinkpad:~/qemu$ qemu-system-x86_64 --version
QEMU emulator version 10.2.93 (v11.0.0-rc3-1-gab9481f798)
Copyright (c) 2003-2026 Fabrice Bellard and the QEMU Project developers
slonk@thinkpad:~/qemu$ # everything else is untouched!
slonk@thinkpad:~/qemu$