Might be dumb but cant seem to edit the old post anymore... It's needed an update since qemu got bumped to 11.
So this works with some issues
This works better on the "unstable" distros. Currently using debian forky with this and it's the best out of the ubuntu/debian combinations I tried. Still has compatibility issues here and there, but seems to be more an issue of everything else catching up.
Screen Sharing Notes:
Sunshine's new vulkan_encode path does work for native_context. You will need to compile it from scratch, may need to add your distro to the compilation script, in my case I was running a frankendebian sid/trixie mix. The main problem you will run into is that the DRM plane modifiers are missing, and the driver expects them which will give you a very messed up image. Adding
Virglrenderer (host):
This needs to be built as well. I recommend doing it first as it does impact the pve-qemu build later.
I had weird issues with proxmox favoring the apt version so here are my steps
PVE-QEMU:
Steps to get it working:
patch isn't needed, Qemu will pick up on the experimental virglrenderer features and work automatically.
Mesa also isn't configured to support this so we will manually build off the apt source similar to virglrenderer.
If dpkg -i ./*.debisn't working I used apt reinstall ./*.deb instead to ensure it was replacing the packages correctly but I don't think it's necessary.
QEMU Config:
You can somewhat just follow the normal instructions here.
I use this though
Make sure that the size=x command matches the ram of the VM. The hostmem is just the "bar"/"aperture" size between the host/guest. Keep it between 256MB and 8GB I think it can have issues outside of that.
Misc Notes:
You will also need to be running kernel 6.14+ on the guest.
Also apt will attempt to update these packages at some point, so keep that in mind. Running something like apt mark hold "packagenamehere" is a temporary solution without breaking the whole proxmox dependency chain.
So this works with some issues
This works better on the "unstable" distros. Currently using debian forky with this and it's the best out of the ubuntu/debian combinations I tried. Still has compatibility issues here and there, but seems to be more an issue of everything else catching up.
Screen Sharing Notes:
Sunshine's new vulkan_encode path does work for native_context. You will need to compile it from scratch, may need to add your distro to the compilation script, in my case I was running a frankendebian sid/trixie mix. The main problem you will run into is that the DRM plane modifiers are missing, and the driver expects them which will give you a very messed up image. Adding
AMD_DEBUG=nodcc,notiling into your /etc/environment will fix this but it comes with a performance hit I'm sure.Virglrenderer (host):
This needs to be built as well. I recommend doing it first as it does impact the pve-qemu build later.
I had weird issues with proxmox favoring the apt version so here are my steps
sudo apt build-dep virglrenderersudo apt-get source virglrenderer- cd into the folder it extracted
- open debian/rules and add
-Ddrm-renderers=amdgpu-experimental,-Dunstable-apis=true,-Dvideo=true, and-Dvenus=trueto the configure-opts variable. (not sure if you need the last 3 tbh but it works so I'm not touching it) - go back to the root folder and run
dpkg-buildpackage -us -uc -b - Now run
sudo dpkg -i *.deb
PVE-QEMU:
Steps to get it working:
patch isn't needed, Qemu will pick up on the experimental virglrenderer features and work automatically.
apt-get source pve-qemu- Build with make deb
- Just install the new pve-qemu with
sudo dpkg -i ./*.deb
Mesa also isn't configured to support this so we will manually build off the apt source similar to virglrenderer.
- sudo apt build-dep mesa
- sudo apt-get source mesa
- cd into the folder
- Open debian/rules and near the end you have a giant block of "confflags". Add
-Dvideo-codecs=all -Damdgpu-virtio=true \to any line of it, I'll include a picture below of how it should look roughly. - go back to the root of mesa and run
dpkg-buildpackage -us -uc -b - Now run
sudo dpkg -i *.debon the folder with the deb packages - If it complains about missing packages just run
apt --fix-brokeninstall it should grab any it missed originally.
If dpkg -i ./*.debisn't working I used apt reinstall ./*.deb instead to ensure it was replacing the packages correctly but I don't think it's necessary.
QEMU Config:
You can somewhat just follow the normal instructions here.
I use this though
args: -device virtio-gpu-gl,blob=on,drm_native_context=on,hostmem=8G -display egl-headless,rendernode=/dev/dri/renderD128 -object memory-backend-memfd,id=mem1,size=16G -machine memory-backend=mem1Make sure that the size=x command matches the ram of the VM. The hostmem is just the "bar"/"aperture" size between the host/guest. Keep it between 256MB and 8GB I think it can have issues outside of that.
Misc Notes:
You will also need to be running kernel 6.14+ on the guest.
Also apt will attempt to update these packages at some point, so keep that in mind. Running something like apt mark hold "packagenamehere" is a temporary solution without breaking the whole proxmox dependency chain.