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


Leoyzen

Recommended Posts

[Possible fix for Big Sur and samba (smb) transfer hangs -- kernel panic and/or error -8084]

 

If you are experiencing issue with Big Sur and samba (smb) transfers here is a possible fix that is working for me.

Change the size of the buffer the kernel allocates to hold the data with SO_RCVBUF and SO_SNDBUF to a size of 65536 bytes,

 

Add this line to the [global] configuration of your samba server:

socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536

This fixed file transfers hang for me, still have some issues to run a virtual machine with vmware through smb, the whole mac os crashes (it didn't happen with Catalina): nfs is still good for this.

 

UPDATE: bjornatic seems to have found that the solution is switching to virtio-net network model (I confirm it's working).

 

Edited by ghost82
  • Thanks 2
Link to comment
  • 2 weeks later...

I've successfully set up a bare metal macOS Big Sur VM passing through GPU (Vega 56), NVME (where OS is installed), onboard sound card, and Broadcom wireless/bluetooth adapter (and oh boy was it a project). Everything is working wonderfully except being able to passthrough the onboard Comet Lake USB 3.1 xHCI controller. I can see the controller in System Info, but actually using the USB ports is another story. Sometimes it'll recognize the device (most of the time not), hot plugging is non-existent, and sometimes plugging something in will lock up the entire server.

 

In theory, should passing through the USB controller work? I'm using an ASROCK Z490 Taichi board. I can boot directly to the OS (not through unRAID) w/out issue and w/out any additional kexts to use the USB controller/ports. Which to me would mean that I wouldn't need any kexts/drivers or other OpenCore configuration to get the USB controller to work in unRAID and the VM other than stubbing it and passing it through.

 

Thoughts? I can share additional info like libvirt xml, opencore files, etc. if needed to help troubleshoot. However, first I just wanted to throw this out there to see if I'm just missing something obvious or if getting a 3rd party controller that'll work under macOS is my only option.

Link to comment
On 1/18/2021 at 12:24 AM, manHands said:

Sometimes it'll recognize the device (most of the time not), hot plugging is non-existent, and sometimes plugging something in will lock up the entire server.

 

In theory, should passing through the USB controller work? I'm using an ASROCK Z490 Taichi board. I can boot directly to the OS (not through unRAID) w/out issue and w/out any additional kexts to use the USB controller/ports. Which to me would mean that I wouldn't need any kexts/drivers or other OpenCore configuration to get the USB controller to work in unRAID and the VM other than stubbing it and passing it through.

 

Hi, are you saying that your usb controller is working with no issues on a real hackintosh, but it has issues in a mac os vm when pa ssed through?

 

Could it be a port limit issue?

Do you have any ssdt/dsdt files related to usb in the real hackintosh?In this case, did you use them also in the vm?Same bootloader?

 

It seems you are not missing anything in unraid/libvirt configuration, yes only thing to do is to stub it and pass through.

Edited by ghost82
Link to comment

Hi everyone, I'm considering to add a USB card and WiFi/BT card to my Big Sur VM. I'm currently passing through an RX570 without issue and USB from the motherboard which is a bit flakey. After much research, I've been looking at the following items which seem to have good reviews in terms of Hackintosh usage:

 

Fenvi T919

Inateck 4 port USB 3.0

 

Has anyone used these with unraid and had any issues with passthrough? My current Gigabyte X570 Aorus Pro has the slots so technically it should be possible but curious to hear other experiences or recommended cards.

 

Thanks in advance.

Link to comment
On 1/19/2021 at 10:56 AM, ghost82 said:

 

Hi, are you saying that your usb controller is working with no issues on a real hackintosh, but it has issues in a mac os vm when pa ssed through?

 

Could it be a port limit issue?

Do you have any ssdt/dsdt files related to usb in the real hackintosh?In this case, did you use them also in the vm?Same bootloader?

 

It seems you are not missing anything in unraid/libvirt configuration, yes only thing to do is to stub it and pass through.

 

Sorry for the delayed reply because I appreciate the response. I've been spending way too much time trying to troubleshoot this on my own.

 

Yes, no issues on a real hack. I'm using the latest OpenCore bootloader with the same config/files for both the real hack and vm. The only SSDT I'm using related to USB is SSDT-EC-USBX which I've configured for my board.

 

All that said, I think I'm on to something. The USB issues occur after a VM restart/shutdown. On a fresh unRAID reboot and on the first VM start, the controller is loaded with AppleIntelCNLUSBXCHI and all the ports work as intended as configured with my USBMap.kext to stay under the 15 port limit.

 

As far as I can tell, the USB controllable cannot be reset. And this may be why the ports don't work or are flaky after a VM restart. Thoughts?

Link to comment
2 hours ago, manHands said:

 

Sorry for the delayed reply because I appreciate the response. I've been spending way too much time trying to troubleshoot this on my own.

 

Yes, no issues on a real hack. I'm using the latest OpenCore bootloader with the same config/files for both the real hack and vm. The only SSDT I'm using related to USB is SSDT-EC-USBX which I've configured for my board.

 

All that said, I think I'm on to something. The USB issues occur after a VM restart/shutdown. On a fresh unRAID reboot and on the first VM start, the controller is loaded with AppleIntelCNLUSBXCHI and all the ports work as intended as configured with my USBMap.kext to stay under the 15 port limit.

 

As far as I can tell, the USB controllable cannot be reset. And this may be why the ports don't work or are flaky after a VM restart. Thoughts?

 

As far as I can tell, flr on x570 mattise usb controller should work. I am using a controller aswell and it works just fine. I don't even use ssdt's...

Link to comment
16 hours ago, manHands said:

As far as I can tell, the USB controllable cannot be reset. And this may be why the ports don't work or are flaky after a VM restart.

 

Type this is a terminal:

for iommu_group in $(find /sys/kernel/iommu_groups/ -maxdepth 1 -mindepth 1 -type d);do echo "IOMMU group $(basename "$iommu_group")"; for device in $(\ls -1 "$iommu_group"/devices/); do if [[ -e "$iommu_group"/devices/"$device"/reset ]]; then echo -n "[RESET]"; fi; echo -n $'\t';lspci -nns "$device"; done; done

 

Does "[RESET]" shows next to your usb controller?

Link to comment
7 hours ago, ghost82 said:

Does "[RESET]" shows next to your usb controller?

 

It does not...

 

IOMMU group 4
        00:14.0 USB controller [0c03]: Intel Corporation Comet Lake USB 3.1 xHCI Host Controller [8086:06ed]
        00:14.2 RAM memory [0500]: Intel Corporation Comet Lake PCH Shared SRAM [8086:06ef]

 

Which is kind of what I figured when looking at System Devices in the unRAID TOOLS page. That's got to be the reason why I'm seeing USB issues on a VM restart, right?

 

There is a separate ASM3242 USB 3.2 controller on board that's reset capable and in it's own IOMMU group...

 

[RESET] 05:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM3242 USB 3.2 Host Controller [1b21:3242]

 

However, I don't think macOS has native support for this controller.

Link to comment
33 minutes ago, manHands said:

That's got to be the reason why I'm seeing USB issues on a VM restart, right?

 

There is a separate ASM3242 USB 3.2 controller on board that's reset capable and in it's own IOMMU group...

I think so..

 

I have an asmedia 1042 usb 3.0 which I tried to passthrough; not natevely supported, tried external kexts, which gave me only issues; finally I ended buying a 25 euro inateck card.

However, trying to passthrough that controller will not hurt :D

Link to comment
5 minutes ago, ghost82 said:

I think so..

 

I have an asmedia 1042 usb 3.0 which I tried to passthrough; not natevely supported, tried external kexts, which gave me only issues; finally I ended buying a 25 euro inateck card.

However, trying to passthrough that controller will not hurt :D

 

No luck :(

 

I just ordered an Inateck card on Amazon that has two 3.0 ports as well as an internal 3.0 header I can use to connect the front 3.0 ports on my case. It uses the FL1100 controller which from what I gather has native macOS support. Only $20 and I've got an open PCI-E x1 slot, so what the heck.

Link to comment
43 minutes ago, manHands said:

 

No luck :(

 

I just ordered an Inateck card on Amazon that has two 3.0 ports as well as an internal 3.0 header I can use to connect the front 3.0 ports on my case. It uses the FL1100 controller which from what I gather has native macOS support. Only $20 and I've got an open PCI-E x1 slot, so what the heck.

Same as mine, it works well.

Link to comment

Sad day but i moved my Big Sur VM to bare metal. I had been wanting to play with Manjaro and as much as much rx 570 reboots mac os it would lock up my entire unRAID server when trying to reboot a Manjaro VM. It even took a hard drive offline. I went with a gigabyte arous b450m and a 3600. Since my big sur install was already on a nvme drive it was nothing to get it booted on the amd hardware. Now im dual booting big sur and manjaro, and i can select either OS right from the opencore boot menu. 

Link to comment
30 minutes ago, david279 said:

Sad day but i moved my Big Sur VM to bare metal. I had been wanting to play with Manjaro and as much as much rx 570 reboots mac os it would lock up my entire unRAID server when trying to reboot a Manjaro VM. It even took a hard drive offline. I went with a gigabyte arous b450m and a 3600. Since my big sur install was already on a nvme drive it was nothing to get it booted on the amd hardware. Now im dual booting big sur and manjaro, and i can select either OS right from the opencore boot menu. 

 

Do you use the vendor-reset?

Link to comment
15 minutes ago, giganode said:

 

Do you use the vendor-reset?

No i didnt but i had never had any issues with the GPU for the last 2 years, so i never thought about it. Hella crash though i to rebuild the hard drive that was kicked out of the array but i got it back working.  I was ready to kinda go bear metal as well.

Link to comment
  • 3 weeks later...
On 1/22/2021 at 5:44 AM, paulmorabi said:

Hi everyone, I'm considering to add a USB card and WiFi/BT card to my Big Sur VM. I'm currently passing through an RX570 without issue and USB from the motherboard which is a bit flakey. After much research, I've been looking at the following items which seem to have good reviews in terms of Hackintosh usage:

 

Fenvi T919

Inateck 4 port USB 3.0

 

Has anyone used these with unraid and had any issues with passthrough? My current Gigabyte X570 Aorus Pro has the slots so technically it should be possible but curious to hear other experiences or recommended cards.

 

Thanks in advance.

 

An update for anyone who is interested in trying this. I ended up going with the 2 port Inateck USB 3 card (with an internal port also). I connected the internal USB port to the Fenvi card to enable Bluetooth. As I passed through both cards, it "just worked". I removed the virtual Ethernet port and reset network settings so en0 is wifi. Overall, it's working much, much better than passing through USB from my x570 and using a Bluetooth dongle. The only thing I've noticed is that when under heavy network activity, Bluetooth audio can jitter momentarily. I haven't tried continuity, hand-off etc. yet. I also haven't had any reset issues with either card, both resetting within the VM and powering it on and off also.

Link to comment
  • 3 weeks later...

With the findings of @bjornatic here:

 

I would say that now virtio-net is compatible with big sur, giving good performance and stability, so it should be advised to move from e1000/vmxnet3 to virtio-net model.

 

As far as virtio drivers for storage (no disk passthrough), I'm afraid but it seems that no virtio driver is able to support trim in mac os:

- virtio-scsi: it seems no driver is available in mac os (in my test opencore can see the disk, but mac os won't boot); pity, because in windows with the additional virtio drivers it performs well.

- virtio-blk: mac os boots, disk is seen as SSD but trim is not available (discard=unmap); moreover there's no way to set the rotation rate flag in libvirt/qemu with virtio-blk.

 

The only option is still sata + rotation_rate=1 to have trim enabled and working.

I hope this will change in the future.

Edited by ghost82
Link to comment
1 minute ago, glennv said:

What is again the advantage of using these instead of the standard unraid versions ?

Hi Glennv, no real advantage, since we are using only that 2 fd files from the package, but I like to always get things updated and stable when available.

I don't really follow developments for edk2, from github I see that something was added to Ovmfpkg in the latest months, maybe some bugs were fixed, but I don't know any detail about it.

  • Thanks 1
Link to comment
On 3/8/2021 at 8:46 PM, Balooforever said:

What speed do you have with virtio-net ?

 

Simple iperf3:

 

Model type: virtio-net

From guest to host:

./iperf3 -c 192.168.2.1
Connecting to host 192.168.2.1, port 5201
[  4] local 192.168.2.2 port 49572 connected to 192.168.2.1 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  73.7 MBytes   618 Mbits/sec                  
[  4]   1.00-2.00   sec  70.5 MBytes   592 Mbits/sec                  
[  4]   2.00-3.00   sec  63.0 MBytes   528 Mbits/sec                  
[  4]   3.00-4.00   sec  66.4 MBytes   557 Mbits/sec                  
[  4]   4.00-5.00   sec  71.8 MBytes   602 Mbits/sec                  
[  4]   5.00-6.00   sec  78.0 MBytes   654 Mbits/sec                  
[  4]   6.00-7.00   sec  76.9 MBytes   645 Mbits/sec                  
[  4]   7.00-8.00   sec  71.0 MBytes   595 Mbits/sec                  
[  4]   8.00-9.00   sec  71.0 MBytes   596 Mbits/sec                  
[  4]   9.00-10.00  sec  69.4 MBytes   582 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   712 MBytes   597 Mbits/sec                  sender
[  4]   0.00-10.00  sec   711 MBytes   596 Mbits/sec                  receiver

 

 

From host to guest:

./iperf3 -s            
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.2.1, port 54772
[  5] local 192.168.2.2 port 5201 connected to 192.168.2.1 port 54774
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-1.00   sec   422 MBytes  3.54 Gbits/sec                  
[  5]   1.00-2.00   sec   438 MBytes  3.67 Gbits/sec                  
[  5]   2.00-3.00   sec   395 MBytes  3.32 Gbits/sec                  
[  5]   3.00-4.00   sec   398 MBytes  3.34 Gbits/sec                  
[  5]   4.00-5.00   sec   406 MBytes  3.41 Gbits/sec                  
[  5]   5.00-6.00   sec   389 MBytes  3.26 Gbits/sec                  
[  5]   6.00-7.00   sec   391 MBytes  3.28 Gbits/sec                  
[  5]   7.00-8.00   sec   429 MBytes  3.60 Gbits/sec                  
[  5]   8.00-9.00   sec   440 MBytes  3.69 Gbits/sec                  
[  5]   9.00-10.00  sec   429 MBytes  3.60 Gbits/sec                  
[  5]  10.00-10.00  sec   957 KBytes  2.40 Gbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-10.00  sec  0.00 Bytes  0.00 bits/sec                  sender
[  5]   0.00-10.00  sec  4.04 GBytes  3.47 Gbits/sec                  receiver

 

Model type: virtio

From guest to host:

./iperf3 -c 192.168.2.1
Connecting to host 192.168.2.1, port 5201
[  4] local 192.168.2.2 port 49179 connected to 192.168.2.1 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  1.59 GBytes  13.7 Gbits/sec                  
[  4]   1.00-2.00   sec  1.90 GBytes  16.4 Gbits/sec                  
[  4]   2.00-3.00   sec  2.43 GBytes  20.9 Gbits/sec                  
[  4]   3.00-4.00   sec  2.13 GBytes  18.3 Gbits/sec                  
[  4]   4.00-5.00   sec  1.56 GBytes  13.4 Gbits/sec                  
[  4]   5.00-6.00   sec  1.61 GBytes  13.9 Gbits/sec                  
[  4]   6.00-7.00   sec  1.68 GBytes  14.5 Gbits/sec                  
[  4]   7.00-8.00   sec  1.65 GBytes  14.2 Gbits/sec                  
[  4]   8.00-9.00   sec  1.71 GBytes  14.7 Gbits/sec                  
[  4]   9.00-10.00  sec  1.72 GBytes  14.8 Gbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  18.0 GBytes  15.5 Gbits/sec                  sender
[  4]   0.00-10.00  sec  18.0 GBytes  15.5 Gbits/sec                  receiver

 

 

From host to guest:

./iperf3 -s            
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.2.1, port 60428
[  5] local 192.168.2.2 port 5201 connected to 192.168.2.1 port 60430
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-1.00   sec  2.72 GBytes  23.3 Gbits/sec                  
[  5]   1.00-2.00   sec  2.58 GBytes  22.2 Gbits/sec                  
[  5]   2.00-3.00   sec  2.85 GBytes  24.5 Gbits/sec                  
[  5]   3.00-4.00   sec  3.31 GBytes  28.4 Gbits/sec                  
[  5]   4.00-5.00   sec  3.19 GBytes  27.4 Gbits/sec                  
[  5]   5.00-6.00   sec  3.26 GBytes  28.0 Gbits/sec                  
[  5]   6.00-7.00   sec  2.79 GBytes  23.9 Gbits/sec                  
[  5]   7.00-8.00   sec  2.48 GBytes  21.3 Gbits/sec                  
[  5]   8.00-9.00   sec  2.49 GBytes  21.4 Gbits/sec                  
[  5]   9.00-10.00  sec  3.11 GBytes  26.7 Gbits/sec                  
[  5]  10.00-10.00  sec   512 KBytes  27.4 Gbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-10.00  sec  0.00 Bytes  0.00 bits/sec                  sender
[  5]   0.00-10.00  sec  28.8 GBytes  24.7 Gbits/sec              receiver

Edited by ghost82
Link to comment

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.