Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD 14.0-CURRENT does not boot #3487

Open
AwlsomeAlex opened this issue Jan 15, 2022 · 14 comments
Open

FreeBSD 14.0-CURRENT does not boot #3487

AwlsomeAlex opened this issue Jan 15, 2022 · 14 comments
Labels
macOS macOS issues question Further information is requested

Comments

@AwlsomeAlex
Copy link

AwlsomeAlex commented Jan 15, 2022

Describe the issue
Trying to install the latest snapshot of FreeBSD 14.0. Press enter at bootloader [multi-user mode], and stuck at kernel message saying "random: randomdev_wait_until_seeded unblock wait".

Issue does not occur with 12.3-RELEASE and 13.0-RELEASE.

Configuration

  • UTM Version: 3.0.2 Beta
  • OS Version: macOS Monterey 12.1
  • Intel or Apple Silicon? Apple Silicon

Crash log
VM did not crash

Debug log
debug.log

Upload VM
config.txt

@conath
Copy link
Contributor

conath commented Jan 15, 2022

Please test if this this OS boots in QEMU installed separately, via command line.

@conath conath added macOS macOS issues question Further information is requested labels Jan 15, 2022
@osy
Copy link
Contributor

osy commented Jan 16, 2022

I suspect it may be related to #3121 can you see if it works in v2.4.1?

@AwlsomeAlex
Copy link
Author

AwlsomeAlex commented Jan 16, 2022

@osy Issue still occurs in v2.4.1 and v3.0.3. Although in 3.0.3 I'm sometimes also getting this panic:
panic: mtx_lock() by idle thread 0xffffa0000058a6000 on sleep mutex vm map (system) @ /usr/src/sys/vm/vm_map.c:4935

@conath Tried running with
qemu-system-aarch64 -M virt,highmem=off -accel hvf -cpu host -smp 4 -m 4096 -drive file=pflash0.img,format=raw,if=pflash,readonly=on -drive file=pflash1.img,format=raw,if=pflash -device virtio-gpu-pci -display default,show-cursor=on -device qemu-xhci -device usb-kbd -device usb-tablet -device intel-hda -device hda-duplex -cdrom FreeBSD-14.0-CURRENT-arm64-aarch64-20220113-0910a41ef3b-252413-disc1.iso -drive file=fbsd.img,if=virtio,cache=writethrough
but I couldn't get very far because the window would say "Display output is not active" once I got past the bootloader. This also happens with UTM when I set the device driver to virtio-gpu-pci.

However, adding -nographic -serial mon:stdio allowed me to boot into FreeBSD's installer through my current terminal window.

EDIT: Adding -device virtio-rng-pci also brought me to the installer with the arguments above (plus -nographics)

@jteloh
Copy link

jteloh commented Jan 17, 2022

I booted freebsd 14 with 4 cores and it panicked with obvious multithreading problem and dropped me to the kernel debugger which did not work for me. I tried reducing the core to 2. and it booted just fine. Not sure this is a UTM bug.

@AwlsomeAlex
Copy link
Author

@jteloh Interesting, I tried that but my boot would hang at random: randomdev_wait_until_seeded unblock wait.

@ylluminate
Copy link

Where do we stand now with FreeBSD 14? It seems that some folks are getting at least to some point: #5964

I'd like to understand how the arm64 experience works with FreeBSD 14 on UTM installations as compared with VMware if at all possible and someone has compared the UX with each...

@mmpestorich
Copy link

mmpestorich commented Feb 1, 2024

I am currently running FreeBSD 14 with X and i3 using VMware on a MacBook Pro M3. There is no vmgfx driver anymore in the drm-kmod port (and it doesn't look like the maintainer of that port has any intention of supporting it any longer) so drm or any 3D acceleration is not going to work for the time being in VMware. X does however start with the userland xf86-video-scfb driver. FreeBSD recognizes a VGA-compatible display under VMware on boot.

I was unable to get X to start on FreeBSD using any other VM manager (including UTM). FreeBSD has a virtio-gpu kernel module but in reading about it, seems to have been written to support 2D acceleration specifically for the FreeBSD virtual terminal (vt). And similar to the vmgfx drm driver, there is no drm virtio driver in the drm-kmod port. Under UTM, using any of the virtio drivers, and the same scfb userland driver fails when starting X with:

...
mmap returns: addr 0x0 len 0x3e8000, fd 12, off 0
(EE) Fatal server error:
(EE) AddScreen/ScreenInit failed for driver 0
...

Not sure if any of that is helpful.

@ylluminate
Copy link

@mmpestorich, some thoughts:

  1. Did you try to circumvent or reduce acceleration impact via using remote access such as RDC/RDP?

  2. Can you share the VMware version and any key configurations for FreeBSD 14 with X, etc?

  3. How is the performance without 3D acceleration, especially for common workflows?

  4. Any workarounds, solutions, ideas for improved graphics or 3D acceleration on macOS with Apple Silicon?

  5. So you didn't get X to start at all with UTM on FBSD 14 given your error above, right? Looks like we need some UTM or other experienced help in this area...

  6. Have you done any research to find others who might have had graphical success with FBSD 14 on Apple Silicon virtual machine options? It seems there might be some discussions around and it would be interesting if you've stumbled upon any such more recent entries on this topic...

@mmpestorich
Copy link

mmpestorich commented Feb 1, 2024

@ylluminate

  1. Did you try to circumvent or reduce acceleration impact via using remote access such as RDC/RDP?

Not with RDP, but I did initially use VNC (pkg install xorg-minimal xf86-video-dummy tigervnc-server), which works. Completely usable, but performance is nowhere near as good as using the scfb driver with the VMware display. I should clarify, this was all done using UTM.

  1. Can you share the VMware version and any key configurations for FreeBSD 14 with X, etc?
Screenshot 2024-02-01 at 12 26 27 PM

Pretty standard configuration. Don't remember changing much of anything. Created a new virtual machine "Create Custom Virtual Machine > Select FreeBSD 14 64-bit Arm" and then replaced the vdmk with the one downloaded from FreeBSD's website.

Screenshot 2024-02-01 at 12 24 19 PM

Then ran: pkg install xorg-minimal libXcursor xf86-input-libinput xf86-input-evdev xf86-video-scfb i3 i3status dmenu alacritty dejavu terminus-font. Configured i3 and alacritty. Set Xft.dpi to an appropriate value in ~/.Xresources and started X: xinit i3.

Screenshot 2024-02-01 at 1 00 37 PM
  1. How is the performance without 3D acceleration, especially for common workflows?

More than fine. There are some refresh issues in X when switching from a virtual terminal back to X/i3, but moving the mouse immediately clears everything up. Other than that I haven't noticed anything substantial.

  1. Any workarounds, solutions, ideas for improved graphics or 3D acceleration on macOS with Apple Silicon?

Nope, unless something happens here or here...

  1. So you didn't get X to start at all with UTM on FBSD 14 given your error above, right? Looks like we need some UTM or other experienced help in this area...

Yup. A bit out of my depth. VNC is all I could get going in UTM.

  1. Have you done any research to find others who might have had graphical success with FBSD 14 on Apple Silicon virtual machine options? It seems there might be some discussions around and it would be interesting if you've stumbled upon any such more recent entries on this topic...

I've looked all over and not found much. Seems like running/virtualizing FBSD 14 on Apple Silicon is not all that common yet.

I even attempted to get FBSD to boot under Apple's Virtualization Framework (using this person's work as a starting point) but never got past the boot screen.

@ylluminate
Copy link

Interesting, thanks for the additional details. Fwiw, I believe RDC/RDP can be more efficient and responsive than VNC. I've never had any particularly good experiences with VNC over the past couple decades to be frank. When possible I use Jump Connect as it's about the best remote access option I've found, but with it's lack of a native Linux (and obviously FBSD client), it doesn't really facilitate anything here. I've tried some other options as well for Linux in the past, but the setup rituals are usually significantly more involved than setting up RDP access.

The VMware situation really gives me a lot of concern. I think the product is effectively dead after the ESXi stuff and the general hostility of Broadcom. Glad to see your steps there - I had similar success with KDE, but trying to get the open source drivers to function didn't shake out.

Really appreciate those two links for the drm-kmod work as well as the others.

@ylluminate
Copy link

@AwlsomeAlex
Copy link
Author

@conath @osy I've tested this with the latest FreeBSD-14.0-RELEASE image and didn't experience any issues. Since the discussion of this issue is going a bit off-course, I'm okay with closing it. Perhaps something was broken at the time of opening this?

@imrohitkumar
Copy link

Any progress in this matter ?
I have also tried installing FreeBSD 14 on utm MacBook m1 , installation was successful but no luck with gui , xfce, gnome kde nothing works.
If anyone had any success please do share the steps and configuration

@syntien
Copy link

syntien commented Dec 24, 2024

xstart

In Xorg.0.log:

[ 10.142] scfb: ScfbScreenInit 0
[ 10.142] bitsPerPixel=32, depth=24, defaultVisual=TrueColor
mask: ff0000,ff00,ff, offset: 16,8,0
[ 10.142] mmap returns: addr 0x0 len 0x3e8000, fd 12, off 0
[ 10.142] (EE) scfb(0): scfb_mmap: Invalid argument
[ 10.142] (EE)
Fatal server error:
[ 10.142] (EE) AddScreen/ScreenInit failed for driver 0
[ 10.142] (EE)
[ 10.142] (EE)

X won't start. FreeBSD 14.2-RELEASE.

X starts fine on FreeBSD 13.4-RELEASE.

This might be a FreeBSD issue, rather than a UTM issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macOS macOS issues question Further information is requested
Projects
None yet
Development

No branches or pull requests

8 participants