FreeBSD 14.0 virtualized by UTM can't launch any desktop environment
Describe the issue
FreeBSD 14.0 virtualized by UTM can't launch any desktop environment.
No such problem instead with FreeBSD 13.x
I tried to start gnome, KDE-plasma, or XFCE. None can't be started. They all stop with an error when attempting to launch the X server.
I tried to start Wayland + sway with
sway -c .config/sway/config
The error message is
[wlr] [backend/backend.c:217] Found 0 GPUs, cannot create backend.
I tried both to upgrade from a working FreeBSD 13.2 VM, and to configure a new FreeBSD 14.0 VM starting from the .iso. Both have the same issue.
Configuration
- UTM Version: 4.4.5
- macOS Version: 14.1.2
- Mac Chip : M1
@ManoloFLTK how did you make it work on FreeBSD 13.2 , can you please share steps and configuration?
@imrohitkumar Thanks for your question. I'll try to repeat the procedure here and describe it to you. Exactly, I initially created a FreeBSD 13.1 UTM VM, and later updated it (inside the running VM) to 13.2.
@ManoloFLTK correct me if I am wrong, so you set it up with freebsd 13.1 arm, then installed Xorg and maybe gnome, enabled them in rc.conf and then restart, it booted in gui Right ?
Yes that's what I did.
Here is the complete procedure to create a FreeBSD13.3 VM under UTM on my M1 MacBook Pro
get installer image from
http://ftp.freebsd.org/pub/FreeBSD/snapshots/arm64/aarch64/ISO-IMAGES/13.3/
use FreeBSD-13.3-STABLE-arm64-aarch64-20240411-54030e8a5df5-257695-disc1.iso
create new UTM VM
other
8MB memory
disk 64GB
no shared folder
Name: FreeBSD15
first boot
1 Boot installer
Install
select keyboard layout
disk partition: Auto (UFS)
Install
Stripe
select vtbd0, OK
YES, Enter
enter root password: root
network: OK
Clock: No
Region:
Date/Time
Boot-time services: Ok
Hardening: Ok
Add users: Yes
Username: darwin
full Charles Darwin
Uid: <empty>
Password: Charles
Final config: Exit
choose "Reboot"
close macOS window when new boot begins
Edit in UTM mac app the new VM's settings:
-move VirtIO to 1st position
-remove .iso from cdrom
Boot new VM
login to root/root
pkg bootstrap
pkg install xorg urwfonts plasma5-plasma konsole sudo sddm
sysrc dbus_enable="YES"
sysctl net.local.stream.recvspace=65536
sysctl net.local.stream.sendspace=65536
logout
login to darwin/Charles
echo "exec dbus-launch --exit-with-x11 ck-launch-session startplasma-x11" > ~/.xinitrcstartx
startx
and the KDE desktop runs.
Unfortunately, I don't succeed to install the gnome desktop again with 13.3
I've also tried with the more recent FreeBSD 15.0 and find the same problem as with 14.0.
I'm having a similar issue with FreeBSD 15 current. I'm trying to use Xfce with startx. Xorg fails to start with the error "xauth: timeout in locking authority file /Users/joshua/.Xauthority".
I changed the virtual gpu from virtio-ramfb to virtio-ramfb-gl for hardware acceleration, but otherwise it has all of the same defaults that UTM sets. I installed xf86-video-scfb for the driver in FreeBSD.
Edit: sorry for the lack of formatting. I'm typing from my phone and am fighting with the autocorrect lmao