qemu FreeBSD 14 on QEMU on MBP M2

Hello all,
I have been trying to get xorg display server to work on my freebsd 14, running on qemu (UTM.app), and with virtio_ramfb display attached to it. No matter what xorg configuration I apply, `xinit` either can not find the display or fails on "AddScreen" (using the scfb driver).

I am not a very advanced user. Any help and walkthroughs here would be greatly appreciated.
 
I have. That the first command I tried after installing xorg. Based on the man pages it seems like it is a wapper over xinit so after running into problems I tried to manually configure and test running xinit. Are you running xorg successfully in QEMU on an ARM MackBook?
 
After running startx, can you post your xorg.log here?

(You can find it in ~/.local/share/xorg/Xorg.n.log)

If it can't find the display or screen, perhaps there is some hint in there as to why they aren't attaching correctly.

Additionally, as a workaround, you can likely sidestep this issue using either of the following:
  • tigervnc's Xvnc server - Stream graphics via a VNC server
  • X11/ssh and XQuartz - Forward X11 instructions via SSH into a native Xserver running on the host
 
This is what the logs look like after running startx
 

Attachments

  • Screenshot 2024-09-23 at 8.55.21 AM.png
    Screenshot 2024-09-23 at 8.55.21 AM.png
    441.4 KB · Views: 392
  • Screenshot 2024-09-23 at 8.55.25 AM.png
    Screenshot 2024-09-23 at 8.55.25 AM.png
    434.3 KB · Views: 378
I am using qemu from MacPorts rather than UTM, but I also had trouble with the framebuffer. Instead, I used x11-drivers/xorgxrdp in my aarch64 FreeBSD vm, then forwarded the vm's port 3389 to my host, and connected with MacPorts' net/FreeRDP, as Microsoft's Remote Desktop app did not seem to allow arbitrary ports. I was able to get the x11/mate metapackage installed and working, and www/firefox/ is working. I have not really pushed the graphics too hard (video, games, etc). Using RDP instead of a framebuffer might not work for your use case, depending on expectations.
 
I'm struggling with a similar problem.
M1 Mac, UTM/QEMU, FreeBSD 14.3 – want to get Mate running.
x11-drivers/xf86-video-scfb are installed

I have also tested this:
/boot/loader.conf the following kernel modules :
Code:
virtio_load="YES"
virtio_pci_load="YES"
virtio_blk_load="YES"
virtio_balloon_load="YES"
I this necessary or should I delete this?

The good thing is that I cloned the pure FreeBSD installation, so I can quickly start again from scratch.
Since switching to M1 Mac, I haven't been able to get FreeBSD to run with a GUI.
Step-by-step instructions would be helpful, please in text form and not a YouTube video.
 
In which file I must set the bus information and which driver?
The file name itself is unimportant. The key is it must start with 20-*.conf
It can be 20-intel.conf or 20-display.conf.

This is the proper file location:
/usr/local/etc/X11/xorg.conf.d/20-display.conf

You video is on the typical PCI bus:
BusID "pci0:0:2:0"

Section 5.5.2
 
Whats about /boot/loader.conf kernel modules, are necessary or should I delete (# preface) this?

My FreeBSD
 

Attachments

  • FreeBSD Version.png
    FreeBSD Version.png
    24.2 KB · Views: 42
Whats about /boot/loader.conf kernel modules, are necessary
Looking here:

You would need to load QEMU USB Tablet driver for a mouse.
utouch_load="YES"

Install the qxl driver and create a video driver file:
/usr/local/etc/X11/xorg.conf.d/20-display.conf
Code:
Section "Device"
    Identifier "Card0"
    Driver     "qxl"
 
just ditch the x server and install xrdp
then use remote-desktop app on the mac host to connect to the utm guest
performance is good
in rc.conf
xrdp_enable="YES"
xrdp_sesman_enable="YES"
in /usr/local/etc/xrdp/startwm.sh uncomment exec startxfce4 (or whatever wm you want) and comment exec xterm
use msft remote-desktop "Windows App" to connect


1757112664415.png
 
just ditch the x server and install xrdp
I tend to agree. To make things feel a snappy as possible, you want as much of the rendering to happen on the native host. Xrdp, Xvnc and X11/ssh tend to fair a little better than the emulator rendering everything itself through the virtual display stack.
 
Back
Top