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

stuck at QEMU monitor after GPU passthrough #412

Open bishoyroufael opened 3 years ago

bishoyroufael commented 3 years ago

GPU : NVIDIA 1050 TI Host OS : Ubuntu 20.04 Guest: High Sierra

image

Result from lspci -nnv

01:00.0 3D controller [0302]: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] [10de:1c8c] (rev a1)
    Flags: fast devsel, IRQ 16
    Memory at a3000000 (32-bit, non-prefetchable) [size=16M]
    Memory at 90000000 (64-bit, prefetchable) [size=256M]
    Memory at a0000000 (64-bit, prefetchable) [size=32M]
    I/O ports at 4000 [size=128]
    Expansion ROM at a4000000 [disabled] [size=512K]
    Capabilities: <access denied>
    Kernel driver in use: vfio-pci
    Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

01:00.1 Audio device [0403]: NVIDIA Corporation GP107GL High Definition Audio Controller [10de:0fb9] (rev a1)
    Flags: fast devsel, IRQ 17
    Memory at a4080000 (32-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel driver in use: vfio-pci
    Kernel modules: snd_hda_intel

at the end of basic.sh I have:

    -vga none \
    -device pcie-root-port,bus=pcie.0,multifunction=on,port=1,chassis=1,id=port.1 \
    -device vfio-pci,host=01:00.0,bus=port.1,multifunction=on \
    -device vfio-pci,host=01:00.1,bus=port.1 \
rosenpin commented 3 years ago

I am facing the same issue, did you manage to solve it?

bishoyroufael commented 3 years ago

Hey @rosenpin . Unfortunately, this won't work easily if your laptop is MUXless laptop. meaning that your NVIDIA Gpu isn't connected to the HDMI port directly. check in your lspci, if your GPU is showing as 3D controller then your laptop is MUXless. you can have a look at the current status of MUXless laptops with vfio here : https://www.reddit.com/r/VFIO/comments/8gv60l/current_state_of_optimus_muxless_laptop_gpu/

rosenpin commented 3 years ago

I'm not using a Laptop, I'm using a PC with my display connected to the integrated graphics card, I'm trying to set up passthrough using my GTX970

bishoyroufael commented 3 years ago

Did you connect your hdmi port from your GTX to your monitor?

rosenpin commented 3 years ago

My monitor is connected to my integrated graphics card, so the GPU will be available for passthrough

Isn't that what I should be doing?

arthefaz commented 3 years ago

any chance that the display is set to anything other than qxl-vga? Screenshot_20210307_072945

zoltanincze commented 3 years ago

same here :(

Joseph-Hui commented 3 years ago

My monitor is connected to my integrated graphics card, so the GPU will be available for passthrough

Isn't that what I should be doing?

How many monitors do you have? If you passthrough your GPU to your MacOS guest, the video will be directed to the GPU and you need another monitor to connect to the GPU.

janboeye commented 3 years ago

@b15h0y this is because passthrough mode display image to real gpu, host could not show the content of passthrough GPU. You could check it if you connect a monitor to your passthrough gpu