Jump to content
Leoyzen

** Hackintosh ** Tips to make a bare metal MacOS

670 posts in this topic Last Reply

Recommended Posts

With the latest opencore developer version, the external apfs driver is not needed anymore, as now it is built in into opencore.

A new part in the config.plist (UEFI section) is required to boot up mac os.

Share this post


Link to post
5 hours ago, x3sphere said:

I noticed, after passing through a GPU to macOS, I can no longer boot up the VM without an actual GPU attached. I created a copy of the VM, removed the GPU, and added the Spice display through virt-manager. On bootup it now hangs on "PCI configuration begin". If I add the GPU back, it boots fine then.

 

Anyone else encounter this? I would like to have a copy of my VM that I can boot quickly without passing through a GPU, just for testing purposes.

 

Using OpenCore with the config provided here https://github.com/Leoyzen/KVM-Opencore

Damn thats weird. I always keep 2 versions of the same VM. One with VNC and one with a GPU attached using the same Vdisk and i can go back and forth.

Share this post


Link to post
Posted (edited)
10 hours ago, david279 said:

Damn thats weird. I always keep 2 versions of the same VM. One with VNC and one with a GPU attached using the same Vdisk and i can go back and forth.

 

Strange. One difference is that I'm also passing through an NVMe drive (as the boot drive for the VM). Dunno if that would matter though.

 

Good to know it works though. I was just comparing the libvirt XML config of the copied VM and it seems the "bus" value of the NVMe drive got changed when I removed the GPU. So maybe that is the problem... will try changing it back to the value in the other VM and see.

 

Edit: It works now! I manually edited the config of the copied VM and updated the bus/slot variables for both the NVMe drive and virtual VGA device to match that of the original (which libvirt automatically changed when I was removing/adding the device). Now it boots fine.

 

Edited by x3sphere

Share this post


Link to post
3 hours ago, x3sphere said:

 

Strange. One difference is that I'm also passing through an NVMe drive (as the boot drive for the VM). Dunno if that would matter though.

 

Good to know it works though. I was just comparing the libvirt XML config of the copied VM and it seems the "bus" value of the NVMe drive got changed when I removed the GPU. So maybe that is the problem... will try changing it back to the value in the other VM and see.

 

Edit: It works now! I manually edited the config of the copied VM and updated the bus/slot variables for both the NVMe drive and virtual VGA device to match that of the original (which libvirt automatically changed when I was removing/adding the device). Now it boots fine.

 

 

Are you using the NVMeFix kext? I am trying to passthrough my NVMe drive and though I can boot macOS, it sometimes panics at boot or the VM crashes while on use. I had to go back to passing through the drive as a Virtio block as it is more stable than directly using the NVMe.

Share this post


Link to post
2 hours ago, chalboly said:

 

Are you using the NVMeFix kext? I am trying to passthrough my NVMe drive and though I can boot macOS, it sometimes panics at boot or the VM crashes while on use. I had to go back to passing through the drive as a Virtio block as it is more stable than directly using the NVMe.

No, never used that kext. What NVMe drive are you passing through? Mine is a Samsung 970 Evo.

 

I can't say I've ever had any stability issues with the drive passed through. Usually I leave my VM running 24/7 and it's never crashed.

Share this post


Link to post
Posted (edited)
13 minutes ago, x3sphere said:

No, never used that kext. What NVMe drive are you passing through? Mine is a Samsung 970 Evo.

 

I can't say I've ever had any stability issues with the drive passed through. Usually I leave my VM running 24/7 and it's never crashed.

I also have a Samsung 970 Evo Plus, but in my case I can't boot without that kext. The device seems to time out at book, and when using the case I can boot but sometimes I it panics and it has do to with IONVMeFamily.kext.

 

Would you mind sharing your XML? Have you enabled any other specific quirks in the Opencore config?

 

Edited by chalboly

Share this post


Link to post
Posted (edited)
32 minutes ago, chalboly said:

I also have a Samsung 970 Evo Plus, but in my case I can't boot without that kext. The device seems to time out at book, and when using the case I can boot but sometimes I it panics and it has do to with IONVMeFamily.kext.

 

Would you mind sharing your XML? Have you enabled any other specific quirks in the Opencore config? You said you are matching your VM's PCie buses with that of your host, correct?

 

Here is my XML config: https://pastebin.com/8F9atB2N

 

I basically copied the OpenCore config verbatim from that git repo (https://github.com/Leoyzen/KVM-Opencore). Only change I made was to the serial numbers in the config.plist. Not loading any additional kext that aren't in that repo either.

 

No, not my host. I was creating a copy of the VM without a GPU attached for testing purposes and it failed to boot. It seems like libvirt changes the buses around when you remove/add devices.

 

For example, in the original config linked, the GPU I'm passing through is on bus 0x04. When I created a copy of the config and added a virtual VGA device, libvirt put it on bus 0x02 instead. For some reason that prevented macOS from booting properly. So I updated it to 0x04 to match my original config, and did the same for the NVMe drive. Then it booted fine.

 

BTW, my 970 Evo isn't the Plus version, there seems to be a difference. Do you have the latest firmware? Seems even those with actual Mac hardware were getting kernel panics with this drive, see here: https://bartechtv.com/samsung-releases-new-firmware-for-970-evo-plus-that-resolves-macos-compatibility-issues/

Edited by x3sphere

Share this post


Link to post
10 hours ago, x3sphere said:

BTW, my 970 Evo isn't the Plus version, there seems to be a difference. Do you have the latest firmware? Seems even those with actual Mac hardware were getting kernel panics with this drive, see here: https://bartechtv.com/samsung-releases-new-firmware-for-970-evo-plus-that-resolves-macos-compatibility-issues/

Thanks for pointing that out! I had an old firmware and just updated to the latest version, was able to boot to macOS and no more timeouts. Will continue to test and see how the VM performs.

Share this post


Link to post

Mouse should work with the external boot picker with the opencanopy driver in the latest opencore developer; however for me it's broken, black screen with frozen mouse pointer in the upper left corner; before the introduction of the ability to use the mouse in the boot picker it was working fine.

Target 83 still broken, so I cannot track where the problem is...

Share this post


Link to post

@ghost82 Does opencanopy not autoselect for you? For me it just sits on the Catalina volume but does not auto boot it up. I know it's early in it's development so maybe it's just how it works right now.

Share this post


Link to post
Posted (edited)
1 hour ago, david279 said:

Does opencanopy not autoselect for you?

From commit 20fa82d (OpenCanopy: Added AppleEvent mouse support) it is stuck at a black screen; with commit c85b332 (OpenCanopy: Improve mouse pointer performance) I can see the mouse pointer (frozen) and a black screen.

Before commit 20fa82d it was working good with keyboard.

The auto boot is not intended to be implemented, as in real mac os; just hide the boot picker (ShowPicker) for autoboot, so it will only show when you press the esc button repetitively.

So for you is it working the external boot picker?Which opencore version?

Edited by ghost82

Share this post


Link to post

@ghost82 I'm running opencore 0.5.7. I had the pointer in the corner as well then I added DefaultBackgroundColor in the NVRAM/ADD section. I must have skipped over this at some point. Already had the correct resources folders in my EFI. So it works well now just had to hit the enter button to get into Catalina. Big test for me will be how well it works during updates.

Share this post


Link to post
Posted (edited)
3 minutes ago, david279 said:

@ghost82 I'm running opencore 0.5.7. I had the pointer in the corner as well then I added DefaultBackgroundColor in the NVRAM/ADD section. I must have skipped over this at some point. Already had the correct resources folders in my EFI. So it works well now just had to hit the enter button to get into Catalina. Big test for me will be how well it works during updates.

Yes, ok, 0.5.7 doesn't have mouse support, and was working good for me too.

Btw already tested with the supplemental update for the 10.15.4, all was perfect.

Edited by ghost82

Share this post


Link to post

Next thing for me is trying to get audio support in my the bootloader. I use a USB audio device for my sound so that may be a challenge.

Share this post


Link to post
Posted (edited)
5 minutes ago, david279 said:

Next thing for me is trying to get audio support in my the bootloader

Unfortunately not working for me, I was trying to have the playchime, but maybe my audio is not fully supported by the AudioDxe.efi driver (onboard audio passed through)..

07:210 00:009 OCAU: System volume is 69 (calculated from 69) - Success
07:220 00:009 OCAU: Matching PciRoot(0x1)/Pci(0x2,0x0)/VenMsg(A9003FEB-D806-41DB-A491-5405FEEF46C3,00000000)...
07:230 00:009 HdaCodecAudioIoGetOutputs(): start
07:239 00:009 HdaCodecGetSupportedPcmRates(): start
07:248 00:009 HdaCodecGetOutputDac(): start
07:258 00:009 HdaCodecGetSupportedPcmRates(): start
07:267 00:009 HdaCodecGetOutputDac(): start
07:276 00:008 HdaCodecGetSupportedPcmRates(): start
07:285 00:009 HdaCodecGetOutputDac(): start
07:295 00:009 HdaCodecGetSupportedPcmRates(): start
07:304 00:009 HdaCodecGetOutputDac(): start
07:313 00:009 OCAU: 1/2 PciRoot(0x0)/Pci(0x1,0x4)/Pci(0x0,0x1)/VenMsg(A9003FEB-D806-41DB-A491-5405FEEF46C3,00000000) (4 outputs) - Success
07:323 00:009 HdaCodecAudioIoGetOutputs(): start
07:333 00:009 HdaCodecGetSupportedPcmRates(): start
07:342 00:009 HdaCodecGetOutputDac(): start
07:351 00:009 HdaCodecGetSupportedPcmRates(): start
07:361 00:009 HdaCodecGetOutputDac(): start
07:370 00:009 HdaCodecGetSupportedPcmRates(): start
07:379 00:009 HdaCodecGetOutputDac(): start
07:389 00:009 HdaCodecGetSupportedPcmRates(): start
07:398 00:009 HdaCodecGetOutputDac(): start
07:408 00:009 HdaCodecGetSupportedPcmRates(): start
07:416 00:008 HdaCodecGetOutputDac(): start
07:425 00:008 HdaCodecGetSupportedPcmRates(): start
07:434 00:008 HdaCodecGetOutputDac(): start
07:442 00:008 HdaCodecGetSupportedPcmRates(): start
07:469 00:026 HdaCodecGetOutputDac(): start
07:479 00:010 OCAU: 2/2 PciRoot(0x0)/Pci(0x2,0x0)/VenMsg(A9003FEB-D806-41DB-A491-5405FEEF46C3,00000000) (7 outputs) - Success
07:488 00:009 OCAU: Cannot find specified audio device - Not Found
07:497 00:008 OC: Audio connection failed - Not Found

It fails with "Not found" :(

Edited by ghost82

Share this post


Link to post

Anybody knows how serial logging works in opencore?

I can't use log to file and I'm trying to figure out what is serial logging, what do I need and how it works..

Share this post


Link to post
Posted (edited)

Can you guys check if Dictionary or Voice Control (Accessibility in System Preferences) is working for you? I just noticed my installation is missing several assets in /System/Library/AssetsV2,  no dictionary is installed except Wikipedia, so functions like Lookup (right click a word and select Lookup) does not work.

 

I compared the content of this folder to the ones on my MacBook Pro and Mac mini, and the VM is missing a lot of asset files. What is also strange is that any attempt to download or fetch new dictionaries from Apple, or enable Voice Control which requires downloading a file from Apple, times out. This does not happen on my original Macs and it does not seem to be a network issue. I already reinstalled macOS and changed the SMBIOS, currently using MacPro7,1.

 

EDIT: the problem was that my original installer was created in another Mac by downloading the macOS installer from the App Store. I had to build the installer using gibMacOS which seems to install all required assets. Not sure why this is the case.

 

 

Edited by chalboly

Share this post


Link to post
Posted (edited)

Dictionary works for me

 

 

 

1318590299_ScreenShot2020-04-16at10_42_15PM.thumb.png.a2c8476c9a14b65ee82a70340e1e3af2.png

Edited by david279

Share this post


Link to post
2 minutes ago, david279 said:

Dictionary works for me

Thanks @david279. I can see you have all the support files my installation is missing, are you using MacPro7,1 as well?

Share this post


Link to post
Posted (edited)

Both the "logging to file" and the opencanopy issues were solved today in master version of opencore.

Edited by ghost82

Share this post


Link to post
Posted (edited)

Hi!

Do the apple hotkeys work for you with opencore?

I looked at the Leoyzen's github page and I read "AppleHotKey: works" with v. 0.5.6

I changed my config plist with:

PollAppleHotKeys=true

KeySupport=true

TakeOffDelay=10000

KeySwap=true (but tried also false)

 

I'm using the latest master version of opencore, with the following drivers loaded:

<array>
	<string>HfsPlusLegacy.efi</string>
	<string>OpenRuntime.efi</string>
	<string>UsbMouseDxe.efi</string>
	<string>AudioDxe.efi</string>
	<string>OpenCanopy.efi</string>
</array>

My keyboard is a "Microsoft Wireless 800 Desktop", with the following keys, from left to right:

Ctrl --> "windows key" --> Alt --> spacebar --> Alt Gr --> "windows key"

 

I'm using the OpenCanopy bootpicker with ShowPicker=false and I tried the following:

pressing Ctrl (without releasing the key): not entering the bootpicker

pressing Alt (without releasing the key): not entering the bootpicker

pressing "windows key", the left one (without releasing the key): not entering the bootpicker

pressing Esc (without releasing the key): entering the bootpicker, but esc key must be pressed some seconds when entering the vm bios

 

The only way I'm able to enter OpenCanopy is to press the Esc key (this works also with PollAppleHotKeys=KeySupport=KeySwap=false), but everytime it enters also the vm bios.

 

I tried also by loading OpenUsbKbDxe and disabling KeySupport, same results.

 

Do the Apple hotkeys work for you on boot?

Edited by ghost82

Share this post


Link to post

@ghost82Yeah, hotkey works for me both with KVM and m920x.I'm not trying upgrade to the latest opencore until the opencore is stable.The 0.5.7 is quite buggy for me.

Share this post


Link to post
1 hour ago, Leoyzen said:

eah, hotkey works for me both with KVM and m920x

Thanks, will try the 0.5.6 stable to see if it's me or opencore.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.