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

GPU passthrough works in the Installer but macOS won't boot with it #66

Open
7robertodantas opened this issue Feb 19, 2024 · 0 comments

Comments

@7robertodantas
Copy link

7robertodantas commented Feb 19, 2024

Hi,

I'm having a similar issue to #44, except that I'm able to boot the installer with full graphic acceleration using GPU Passthrough, but after installing the MacOS won't boot with that GPU passthrough.

I'm using the v20 EFI, I have tried this with Sonoma and then tried with Ventura, same issue.

I have vendor-reset installed.

The GPU passthrough works with Windows VM, and it also works with the OSX installer. It just doesn't work when booting the macOS itself.

The issue is that the open core always reboots at the last step, right before showing the login screen.

IOConsoleUsers: gIOScreenLockState 3, hs 0, bs 0, now 0, sm0x0.

IMG_6283

Which suggests to be something related to the GPU?

At this step I can see a final reset on the gpu (dmesg)

[ 2178.023083] vfio-pci 0000:03:00.0: AMD_NAVI10: version 1.1
[ 2178.023097] vfio-pci 0000:03:00.0: AMD_NAVI10: performing pre-reset
[ 2178.023298] vfio-pci 0000:03:00.0: AMD_NAVI10: performing reset
[ 2178.119147] ATOM BIOS: 113-NAVI10_XT_8GBD6_MS_190612_W81
[ 2178.119149] vendor-reset-drm: atomfirmware: bios_scratch_reg_offset initialized to 4c
[ 2178.273440] vfio-pci 0000:03:00.0: AMD_NAVI10: bus reset disabled? yes
[ 2178.273445] vfio-pci 0000:03:00.0: AMD_NAVI10: SMU response reg: 0, sol reg: 0, mp1 intr enabled? no, bl ready? yes
[ 2178.273448] vfio-pci 0000:03:00.0: AMD_NAVI10: performing post-reset
[ 2178.296946] vfio-pci 0000:03:00.0: AMD_NAVI10: reset result = 0

I'm using the following args for GPU passthrough (see full args at the end)

-vga none
-display none
-device vfio-pci,host=03:00.0,x-vga=on,multifunction=on,romfile=rx_5700_xt_Navi10.rom
-device vfio-pci,host=03:00.1

When I use the qemu display instead, I'm able to boot to the OSX without gpu acceleration.

-device vmware-svga

I also tried to include the following arg but it also didn't work

-global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off

Computer specs:

CPU: Core i9 9900K
GPU: XFX RX 5700 XT
MOBO: Gigabyte Z390 Designare

qemu-system-x86_64 --version
QEMU emulator version 8.2.0
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers
uname -a
Linux archlinux 6.7.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 26 Jan 2024 19:10:20 +0000 x86_64 GNU/Linux

The VM args are

args=(
  -enable-kvm -m "$ALLOCATED_RAM" -cpu host,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,"$MY_OPTIONS"
  -machine q35
  -usb -device usb-kbd -device usb-tablet -device usb-mouse
  -smp "$CPU_THREADS",cores="$CPU_CORES",sockets="$CPU_SOCKETS"
  -device usb-ehci,id=ehci
  -vga none
  -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off
  -device vfio-pci,host=03:00.0,x-vga=on,multifunction=on,romfile=rx_5700_xt_Navi10.rom
  -device vfio-pci,host=03:00.1
  -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
  -drive if=pflash,format=raw,readonly=on,file="$REPO_PATH/$OVMF_DIR/OVMF_CODE.fd"
  -drive if=pflash,format=raw,file="$REPO_PATH/$OVMF_DIR/OVMF_VARS-1024x768.fd"
  -smbios type=2
  -device ich9-intel-hda -device hda-duplex
  -device ich9-ahci,id=sata
  -drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file="$REPO_PATH/OpenCore/OpenCore.qcow2"
  -device ide-hd,bus=sata.2,drive=OpenCoreBoot
  -device ide-hd,bus=sata.3,drive=InstallMedia
  -drive id=InstallMedia,if=none,file="$REPO_PATH/BaseSystem.img",format=raw
  -drive id=MacHDD,if=none,file="$REPO_PATH/mac_hdd_ng.img",format=qcow2
  -device ide-hd,bus=sata.4,drive=MacHDD
  -netdev user,id=net0 -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:c9:18:27
  -monitor stdio
  -display none
  -object input-linux,id=kbd1,evdev=/dev/input/by-id/usb-Fnatic_Gear_Fnatic_Gear_miniSTREAK_A300301142D1C0FAC1AA22957491005F-event-kbd,grab_all=on,repeat=on
  -object input-linux,id=mouse1,evdev=/dev/input/by-id/usb-Kingston_HyperX_Pulsefire_Core-event-mouse
  -vnc 0.0.0.0:1,password -k en-us
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant