Not being able to start Sway in VM, "Found 0 GPUs"

It's a VM, I'm trying to install a gui in freebsd for the first time. I used this (https://docs.freebsd.org/en/books/handbook/wayland/) guide, and did everything until actually starting sway. I got this error below

Screenshot From 2025-06-15 18-22-03.png
 
It's a VM
You can not run a wayland compositor (sway) in a VM without PCI passthrough a host graphics card and loading a drm-kmod video driver in the FreeBSD VM. If the VM host has two GPUs, one can be reserved for the VM guest. Not all hypervisor provide the passthrough possibility, though. Check out the corresponding documentation of the virtualizer.

FreeBSD handbook, 6.2. Wayland Overview:
All of the compositors described here should work with graphics/drm-kmod open source drivers; however, the NVIDIA® graphics cards may have issues when using the proprietary drivers. Begin by installing the following packages:

x11/xorg or x11/xorg-minimal can be used without problems on the emulated VM graphics card. Here an example of such a emulated GPU on VirtualBox:
Code:
% pciconf -vl  | grep -B3 display
vgapci0@pci0:0:2:0:    class=0x030000 rev=0x00 hdr=0x00 vendor=0x80ee device=0xbeef subvendor=0x15ad subdevice=0x0405
    vendor     = 'InnoTek Systemberatung GmbH'
    device     = 'VirtualBox Graphics Adapter'
    class      = display
 
I use the integrated GPU, which is intel hd 620. I made it work by launching x (startx) first, and then launching sway from the terminal, but that's not optimal, of course. I don't even know how to make xterm fullscreen in the basic x environment, to be able to make it automatic, like if it just worked normally.
 
Back
Top