VirGL hardware accelerated h264/h265

I just started the make deb portion, it's failing when it gets to the

FAILED: libcommon.a.p/hw_display_virtio-gpu-virgl.c.o . Applied the patch from pve-qemu/qemu directory with patch < virgl.patch

##edit
I started the process on another identical host, did NOT use bookworm-backports, used the deb-src for bookworm in sources.list, ran apt-get build-dep qemu virglrenderer. This installed almost everything. Builds fine after this.
 
Last edited:
  • Like
Reactions: two56bytes
I just started the make deb portion, it's failing when it gets to the

FAILED: libcommon.a.p/hw_display_virtio-gpu-virgl.c.o . Applied the patch from pve-qemu/qemu directory with patch < virgl.patch

##edit
I started the process on another identical host, did NOT use bookworm-backports, used the deb-src for bookworm in sources.list, ran apt-get build-dep qemu virglrenderer. This installed almost everything. Builds fine after this.
Could you give a quick summary of the steps you took?
I am interested in this, but do not want to mess up my proxmox too much with custom packets....

As in the tutorial above some steps were marked as maybe not necessairy.
 
Could you give a quick summary of the steps you took?
I am interested in this, but do not want to mess up my proxmox too much with custom packets....

As in the tutorial above some steps were marked as maybe not necessairy.
Hey, let me set this up a couple more times as I take notes, then I'll post my steps. I have a correction, I do use backports, but for installing the updated mesa libs AFTER using :

deb-src http://ftp.us.debian.org/debian bookworm main contrib non-free non-free-firmware

in /etc/apt/sources.list
in order to be able to use apt-get build-dep qemu virglrenderer. Note: this doesn't install everything that pve-qemu git needs, but most of it. You'll see what's missing as you follow the steps in @two56bytes second post.
 
Hi all, is it possible to get this as part of proxmox by default? It seems like the only reasonable way to get VAAPI inside a VM without full passthrough and RAM ballooning working
 
Would be very nice if you could post this in the devel list [1] or at the very least post a feature request in bugzilla [2] to get this compiled by default, as it is a nice feature and this kind of modifications will be overwritten on updates and are quite hard to maintain at scale.

Thanks!

[1] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[2] https://bugzilla.proxmox.com/
Please, anyone following these steps, don't do this on a production machine and as mentioned, to maintain this, you have to reinstall your custom qemu every time proxmox updates.


I did post this in bugzilla as you requested.

I'm not very good at formatting things, but I have typed up the notes in textedit.

add the following to /etc/apt/sources.list

I use nano:

nano -w /etc/apt/sources.list

paste in

#deb http://deb.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware
deb-src http://ftp.us.debian.org/debian bookworm main contrib non-free non-free-firmware

keep the bookworm-backports commented out while you setup the build evironment for qemu because you don't want to get in a dependency loop with held back packages, etc.
after building, you can enable the bookworm-backports repo.
This will also update several installed packages.


When you're done with the build - you will want to update the mesa-va-drivers



apt update

apt build-dep qemu virglrenderer

apt install git build-essential

#### install the remaining packages needed for qemu build

apt install libacl1-dev libattr1-dev libglusterfs-dev libpci-dev libproxmox-backup-qemu0-dev libsdl1.2-dev libsystemd-dev python3-venv quilt xfslibs-dev lintian

cd /usr/src

git clone https://gitlab.freedesktop.org/virgl/virglrenderer.git

cd virglrenderer

meson build -Dvenus=true -Dvideo=True -Dprefix=/usr

If you have an amd gpu, you can add -Ddrm-renderers=amdgpu-experimental to the end of the meson build line

cd build

ninja install


Now you need to get the proxmox qemu source

cd /usr/src

git clone https://github.com/proxmox/pve-qemu

cd pve-qemu

git submodule update --init --recursive

cd qemu

meson subprojects download
###########################################


Patch the source from inside the pve-qemu/qemu directory

Patch file can be found here:

https://raw.githubusercontent.com/m...471b5bcab41842a5fe6ea9b05a09cb78f/virgl.patch

or copy/paste the code from @two56bytes post

Just wget it to the qemu directory.

root@enyo:/usr/src/pve-qemu/qemu# patch < virgl.patch
can't find file to patch at input line 5
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
|index 145a0b3879..2fee481219 100644
|--- a/hw/display/virtio-gpu-virgl.c
|+++ b/hw/display/virtio-gpu-virgl.c
--------------------------
File to patch: hw/display/virtio-gpu-virgl.c #type this in the prompt
patching file hw/display/virtio-gpu-virgl.c
patching file meson.build
root@enyo:/usr/src/pve-qemu/qemu#

Now you will cd .. and run make deb

cd ..
make deb

dpkg -i pve-qemu-kvm_9.2.0-3_amd64.deb
note: your file name may be newer than the one above.

update the mesa, libdrm2, etc installs
apt upgrade -t bookworm-backports
 
Last edited:
I am getting this error when im trying to use vaapi

Code:
No provider of eglDestroyImageKHR found. Requires one of:
EGL_KHR_image
EGL_KHR_image_base
EGL 15