foxlet / macOS-Simple-KVM

Tools to set up a quick macOS VM in QEMU, accelerated by KVM.
13.66k stars 1.14k forks source link

Cannot passthrough Intel UHD 630 #222

Open crazyquark opened 4 years ago

crazyquark commented 4 years ago

Hello,

I've been trying to pass my iGPU, Intel UHD 630 but the OS just crashes and restarts automatically image Do I need a romfile, where could I find one?

crazyquark commented 4 years ago

Ok, I caught the trace image

crazyquark commented 4 years ago

I realize this is more of a general Hackintosh issue than a problem with this repo. But maybe you can help me.

crazyquark commented 4 years ago

@foxlet great work! Do you know what would be a safe GPU to pass to Catalina?

mystiquewolf commented 4 years ago

@crazyquark Did you manage to solve this issue? I have a kernel panic and it might be because of UHD 620. It gets into Clover and then panics.

crazyquark commented 4 years ago

@liubomirwm I did not :(. I even tried Intel GVT-g, same result.

crazyquark commented 4 years ago

Some more info, If I fake the ID of the GPU, it no longer crashes but it doesn't do anything useful, the OS sees the device but does not load a kext for it. I tried different things with WhatverGreen and Lilu but no luck.

crazyquark commented 4 years ago

This is a more detailed log of the kernel panic: kernel.txt

thomastrinn commented 4 years ago

Hi! I have the same problem.

I was fallowing the Intel GVT-g - Arch wiki, but sadly it did not work for me.

I'am on Ubuntu 18.04, kernel version 5.3.0-53-generic. Sadly ubuntu 18.04 ships with QEMU version 2.11. But I found a custom ppa, so I got QEMU 2.12. After I reached the part in arch wiki where I could start the vm, I got the error, that qemu does not support opengl. The next step was to build qemu with hardware graphics acceleration. So I got the newest qemu (version 5.0.0) and compiled it. Now I can run a vm with opengl enabled, but I get something like you guys mentioned.

Here is the part of the vm start script thet defines the virtual gpu:

-vga virtio \
-display gtk,gl=on \
-device vfio-pci,sysfsdev=/sys/bus/mdev/devices/be474e0d-8733-4839-bca4-73363e2965d4,display=on,x-igd-opregion=on,romfile="$VMDIR/vbios_gvt_uefi.rom" \

Actually I tried it with a linux live image too:

qemu-system-x86_64 -enable-kvm -m 8G -machine q35,accel=kvm -smp 8,cores=4 -cpu host -vga virtio -display gtk,gl=on -device vfio-pci,sysfsdev=/sys/bus/mdev/devices/be474e0d-8733-4839-bca4-73363e2965d4,display=on,x-igd-opregion=on -cdrom linux.iso

In the terminal I got the fallowing two lines:

libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
gl_version 45 - core profile enabled

The live linux starts, but there are some graphical problems, for example icons are flikering on hover.

rbollampally commented 4 years ago

This might help: https://github.com/qemu/qemu/commit/643a4eacef87a318cf71800a4fb2ae1f78c4b245#diff-38093e21794c7a4987feb71e498dbdc6

crazyquark commented 4 years ago

I was able to passthrough the iGPU to a Fedora guest but not to macOS.

thomastrinn commented 4 years ago

@crazyquark could you show your command, I'm interested, how you managed it. Thx!

ghost commented 4 years ago

this is illegal

jonibim commented 4 years ago

@crazyquark @thomastrinn Intel GVT-g is not supported on MacOS [1] [2] .There are similar stories on forums or Reddit posts which follow a kernel panic in the end [3] [4].

akirataguchi115 commented 4 years ago

@crazyquark Maybe close this as the Intel GVT-G/-D can't be passthroughed to macOS. Of course this is a mild generalization as you could in theory and in practice passthrough a GVT-G/-D iGPU to a macOS but you'd have to develop(C++ or other low-level language/maybe even assembly) the actual GPU drivers to that specific GPU(UHD 630 in this case) on the macOS end. For further development check f.ex. here EDIT: Some iGPU's such as UHD 630 can be passthroughed as Mac Mini 2018 uses that specific iGPU so the drivers are already supported to that on the macos side. So yes in theory this can be achieved via Intel Intel GVT-G and some know-how of applying these instructions to your build.

plantroon commented 4 years ago

I believe that this should at least be possible in real passthrough mode (that is, no Intel GVT-G technology).

Somebody did it with ESXi:

https://www.virtuallyghetto.com/2020/06/passthrough-of-integrated-gpu-igpu-for-apple-mac-mini-2018.html

I have tried passing through my UHD 630 to Windows and macOS machine and none worked. There must be a way but I can't figure it out.