thenickdude / KVM-Opencore

OpenCore disk image for running macOS VMs on Proxmox/QEMU
https://www.nicksherlock.com/2021/10/installing-macos-12-monterey-on-proxmox-7/
GNU General Public License v3.0
1.28k stars 116 forks source link

Graphical instability between vm restarts with dedicated video, among other minor problems... #68

Open wbrione opened 7 months ago

wbrione commented 7 months ago

Hello... First of all I would like to thank everyone for maintaining this project... thank you.

I'm sorry for bringing this issue here (I could use the forums), but as the project is a point of convergence between 2 technologies, I believe it is the best place to understand a problem that is happening in my VM. Anyway, I created some VMs, and after several tests, I finally ended up staying with Sonoma, since the behavior was the same... Regarding the scenario, the VM received a dedicated GPU (RX 6600), everything works perfectly at first VM boot, the machine starts with graphics acceleration, etc... however, if for some reason it is necessary to restart the VM, on the next boot the machine presents a series of instabilities, crashes, green screen, pink screen, etc., only returning to normal after restarting the host itself, in this case, Proxmox (KVM).

Another problem, somewhat overcome, is in relation to "hibernation", if the VM enters this state, it does not wake up again, for this reason, I disabled all MacOS features that could take it to this state, but this, as suggested, it's the least of the problems... really, the issue of dedicated video is the main, and most annoying problem, because on this server I have several services running, and it's a huge headache having to paralyze my entire "home lab" due to a single VM ;-)

I've already tried several adjustments in OpenCore (config.plist) and kexts, however, I still haven't been able to understand the reasons that could lead to this instability between boots.

In time, I would like to confirm if there really is still incompatibility between the "Resizable Bar" technology and the virtualized MacOS, because the VM simply cannot start the dedicated graphic if this option is active in Bios, regardless of the values configured in OpenCore ( ResizeAppleGpuBars)... According to what I saw around, VFIO is already compatible with "Resizable Bar", so much so that my other VM (Windows 11 x RTX 3080 TI) works perfectly identifying the technology), so everything leads me to believe that it is a specific problem with the "virtualized" MacOS, as even this, when installed directly on the hardware, can be configured to obtain some benefits with this technology, although still on a smaller scale compared to Windows.

Well, that's it... sorry for the huge text... but my goal is to centralize all my questions in a single post ;-)

PS.: About the host kernel...

uname -a
Linux pve-amd 6.5.13-3-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.13-3 (2024-03-20T10:45Z) x86_64 GNU/Linux
AnakTeka commented 7 months ago

it is a known bug with AMD GPU, try to install vendor-reset module on the proxmox host

thenickdude commented 7 months ago

vendor-reset doesn't support RDNA 2, which was supposed to fix the reset bug

I don't know how to set up resizable BAR for a macOS VM but I doubt it's related to the glitch issue. I have a vague memory that you have to explicitly widen the BAR window in the VM config for larger cards.

wbrione commented 7 months ago

In fact, if it were possible, I would like to completely isolate/block the effects of the Host Bios option "Resizable Bar" for MacOS VM only, since it doesn't benefit much from it.

I thought, and tried to disable and minimize the use of the resource through OpenCore, but perhaps, due to a lack of knowledge of the tool, I still haven't been able to arrive at a valid configuration... It's a fact, if the configuration is "enabled" in the Bios, MacOS (VM) simply hangs on boot :-(

PS.: I'm losing at least 10% of performance on the Windows VM precisely because of this ("Resizable Bar: off" on Host) :-(