general/other What's up with the VirtIO video driver?

I've tried FreeBSD on QEMU several times at this point, and in none of them was I ever able to get the graphics to work under my VirtIO VGA/GPU device. I recompiled the kernel (compiled virtio_gpu both as a module and as a built-in) and everything, but no luck. Even checked my QEMU launch script to see if anything could be wrong, and nada.

Has anyone here had any luck with this device? Either virtio-gpu or virtio-vga. I'm still really curious as to what could possibly be happening that FreeBSD just won't work with that device on QEMU. Neither X, nor Wayland, nor whatever.

I currently don't have it installed at the moment, but am considering trying it yet again, only if I could figure out how to fix this (if that's even possible in the first place)···

If it matters, this is what I use to launch QEMU. It usually works without a problem for any guest OS I wanna run.
 
here are my findings.
we don't have a virtio drm driver only a virtio console driver.
the problem is that because the guest virtio driver has to notify the host when it does modify the framebuffer
mmap is not implemented on the guest side. so X has no way to mmap the fd of /dev/ttyvn so it fails
the solutions seem to be either implementing the drm part or have a thread that syncs with host every 1/60 seconds or so and enable
mmap
i gave up and used xrdp (mac m4 utm host). xrdp works well
 
i see, i did also find weird that it works on the TTY just fine but not on the graphical mode
i wonder why it only has partial support for it, is it hard to implement and the demand's too low or something
 
the drm part looks pretty hairy to me. even the 2d part. and if you dont have the 3d and all the bells and whistles then xrdp is probably is comparable to a vanilla frame buffer
 
right, these video stuff do look tricky to work on
i wonder what other options i have then, i don't really feel like setting up an RDP connection nor doing a GPU passthrough, but i guess the former could still be a last resort
 
a little update, i've actually just made a VM with FreeBSD 14.3-RELEASE installed on it and discovered the VirtIO network device also doesn't work either, which's actually weird 'cos i do remember it working on previous installs just fine
what could possibly have caused this regression, is support for it disabled by default now
 
well that's weird, pretty sure i haven't even changed anything in its configuration either
i'm just using VMXNET3 for now
 
Back
Top