News for hackers. Stuff that matters.
Re:OpenCore: Hackintosh Alternative to Clover by x3sphere on Sunday April 19, 2020 @03:04PM (#22918009)
I use OpenCore but have switched my Hackintosh system over to running in a VM (using GPU passthrough). It's easier for me to backup / make changes this way, and there is only a minor performance hit. This is a Geekbench run from my VM (Core i9 10940x with 4 cores passed through): https://browser.geekbench.com/v4/cpu/15395105

I have a Windows 10 VM running on a same system too. It may not be suitable if you require virtualization inside macOS itself though. Nested virtualization doesn't work too well with the Android emulator, in my experience.

Re:OpenCore: Hackintosh Alternative to Clover by rubatuga on Sunday April 19, 2020 @06:17PM (#22919256)
If you're looking to create a macOS VM (w/ GPU Passthrough), I've made a detailed guide here: https://github.com/yoonsikp/macOS-KVM-PCI-Passthrough

I believe my guide is better at avoiding GPU driver initialization problems than others. I'll need to update it to support OpenCore however.

Re:OpenCore: Hackintosh Alternative to Clover by MegaDeKay on Sunday April 19, 2020 @07:58PM (#22919841)
Consider taking a look at this Opencore setup specifically configured for KVM and GPU passthrough.

https://github.com/Leoyzen/KVM-Opencore

Re:OpenCore: Hackintosh Alternative to Clover by rubatuga on Monday April 20, 2020 @03:09PM (#22927223)
@stefanwlb

I'm not sure if you know but you have been shadow banned.

> Does nvidia work through GPU pass through as I know hackintosh didn’t support my 1660gti gpu when I tried it a few months ago.

It most likely does not.

Re:OpenCore: Hackintosh Alternative to Clover by terhechte on Sunday April 19, 2020 @03:11PM (#22918063)
As I'm currently thinking about also going this route I do have some questions, if I may. Could you elaborate what your hardware setup is? Do you have two screens, and two powerful GPUs? Or do you use a HDMI Switch for one screen? Basically, how do you cope with the hardware limitations of GPU Passthrough

(I briefly looked into using a single GPU for passthrough, which seems possible but involved rewriting the GPU rom and I'm not going to do that :)

Re:OpenCore: Hackintosh Alternative to Clover by x3sphere on Sunday April 19, 2020 @03:52PM (#22918304)
One screen, two GPUs. For the screen I've got an LG 38GL950G, and the GPUs are a Radeon WX5100 (macOS) and RTX 2080 Ti (Windows). I run the Linux host (Ubuntu) headless.

I have the macOS side connected via HDMI and Windows via DisplayPort. Then I switch inputs when through the monitor's OSD for changing the OS (I think there's a way to do this through DDC/CI commands depending on the monitor, in which case you'd be able to write a script to do this, haven't looked into that yet). I have a USB switch for moving all device connections to the OS of my choice.

Also the board I have, an X299 Designare, has several USB controllers on their own IOMMU group so you can pass through each to their own VM.

Re:OpenCore: Hackintosh Alternative to Clover by Teknoman117 on Sunday April 19, 2020 @05:28PM (#22918945)
Does passing through the "boot" gpu work well these days? I remember it not working very well in the past.
Re:OpenCore: Hackintosh Alternative to Clover by x3sphere on Sunday April 19, 2020 @06:39PM (#22919383)
It works fine here on Ubuntu 19.10 (kernel 5.3).

I just run the following commands to stop gdm and X after booting:

  sudo systemctl stop gdm
  sudo systemctl stop systemd-logind
  sudo killall gdm-x-session
Then start my VM. libvirt automatically unbinds it from the host and binds to the VM. You're right though, in the past this has been problematic. It is working fine though now at least on my Radeon WX 5100.
Re:OpenCore: Hackintosh Alternative to Clover by Wowfunhappy on Sunday April 19, 2020 @03:19PM (#22918119)
You don't need to rewrite the GPU rom! I never set it up fully due to other issues, but I had High Sierra + GPU passthrough working quite well in ESXI last fall.

I would still be using ESXI now, except my (unusual) goal was to run 10.9, and I couldn't for the life of me get GPU passthrough working in 10.9.

The neat thing about ESXI, though, is that it is officially supported by macOS. Only on Apple hardware, of course, but with ESXI the motherboard is all fake anyway, so it works identically regardless of the host's hardware. All you need to do is patch out the Apple hardware check, which is easy.

Re:OpenCore: Hackintosh Alternative to Clover by weaksauce on Sunday April 19, 2020 @07:50PM (#22919792)
do you have any resources to look at for setting this up?
Re:OpenCore: Hackintosh Alternative to Clover by Wowfunhappy on Sunday April 19, 2020 @08:08PM (#22919904)
I don't! For whatever reason, there is precious little information on the internet for running macOS in ESXI. I got the original idea from another Hacker News comment: https://news.ycombinator.com/item?id=17766016 And then, this is what you need to enable macOS on non-Apple hardware: https://www.insanelymac.com/forum/files/file/964-macos-unloc... The rest is the same as setting up any other VM in ESXI with GPU passthrough, so you can read tutorials on that.

High Sierra and an nVidia card "just worked" for me on ESXI. (Sadly, Mavericks did not—I could not get the GPU to output anything—and that was the only OS I cared about—but you probably don't care.)

There's a lot more information on using KVM, so you may want to go that route instead. But of course, then then you need to use a Hackintosh bootloader like Clover or OpenCore. It was really cool having everything just install natively with ESXI.

Re:OpenCore: Hackintosh Alternative to Clover by weaksauce on Monday April 20, 2020 @02:23PM (#22926746)
well that's a start at least! thanks!
Re:OpenCore: Hackintosh Alternative to Clover by Ecco on Sunday April 19, 2020 @04:46PM (#22918664)
Nice setup! Quick question: would you recommend getting a Core i9 10940x today or waiting for a 10900K?
Re:OpenCore: Hackintosh Alternative to Clover by tdiggity on Sunday April 19, 2020 @03:24PM (#22918143)
I wanted to try this but was worried that the gpu pass through wouldn’t be smooth for basic video playback. How well do YouTube and Netflix play? How smooth does it feel overall? Could someone be fooled into thinking it was a native system?
Re:OpenCore: Hackintosh Alternative to Clover by hrrsn on Sunday April 19, 2020 @03:27PM (#22918162)
If you’re passing through an entire GPU, it feels just like a native system
Re:OpenCore: Hackintosh Alternative to Clover by omnimus on Sunday April 19, 2020 @06:01PM (#22919153)
Can i run 3 screens if the gpu has enough outputs? I mean will it work as it would if it was not vm?
Re:OpenCore: Hackintosh Alternative to Clover by wtallis on Sunday April 19, 2020 @06:45PM (#22919432)
Yes. The VM guest operating system's GPU drivers are not aware of the fact that they're running in a VM, and have full transparent access to all the hardware resources of the GPU that's assigned to that VM.
Re:OpenCore: Hackintosh Alternative to Clover by w0utert on Monday April 20, 2020 @07:49AM (#22923018)
I have another question about this. Can I also use the GPU that is passed-through to the guest from the host, once the guest is shut down?

For example, say I build a linux host with IGP + powerful discrete GPU. Can I use KVM to pass the discrete GPU to Windows if I want to play a game (using the IGP for the linux desktop) but also use the discreet GPU for Linux CUDA programming after the Windows guest is shut down?

Re:OpenCore: Hackintosh Alternative to Clover by wtallis on Monday April 20, 2020 @03:28PM (#22927459)
I think that generally works these days. When GPU passthrough first became possible, there were widespread issues with GPUs that could not be easily reset and reinitialized after VM shutdown, and GPU drivers don't like taking control of hardware that's been left in an indeterminate state.
Re:OpenCore: Hackintosh Alternative to Clover by w0utert on Tuesday April 21, 2020 @04:19AM (#22933049)
I did some searching and it seems that there is indeed a way to bind/unbind the GPU from the host by writing to /proc/bus/cpu, but apparently this is (was?) not always very stable as some GPU firmwares (AMD in particular it seems) do (did?) not allow resetting the device through any firmware interfaces.

If anyone knows if this is still the case and if the same holds for modern NVidia cards as well that would be great! Is GPU reset a documented/officially supported feature on NVidia/AMD these days?

Re:OpenCore: Hackintosh Alternative to Clover by kdrag0n on Sunday April 19, 2020 @06:45PM (#22919427)
Yes, the VM gets the entire GPU to itself as if it were bare-metal.
Re:OpenCore: Hackintosh Alternative to Clover by Johnnynator on Sunday April 19, 2020 @06:47PM (#22919436)
Yes, you GPU behaves exactly as if it was outside a VM, so multiple monitors do work.
Re:OpenCore: Hackintosh Alternative to Clover by Hamuko on Sunday April 19, 2020 @03:17PM (#22918113)
That sounds pretty nice actually. Really the only pain that I feel with my Hackintosh is the updates (which is why I'm still on Mojave). However, I'm not really sure if I want to trade in performance since updates are a periodic pain but a performance hit is gonna always be there.
Re:OpenCore: Hackintosh Alternative to Clover by Wowfunhappy on Sunday April 19, 2020 @03:48PM (#22918277)
OP didn't specify, but I assume they're using a type-1 hypervisor, likely either KVM or ESXI. If you're also using GPU passthrough, the performance loss is minimal—nothing like your standard Virtualbox VM.

Now, whether its actually easier to set up than a bare-metal Hackintosh, I'm not so sure. I tried it last fall, and it took a lot of fiddling to get working. (It also flat-out didn't work for my very specific use case, but that's another matter.) Maybe it would be better at surviving updates, but it's not obvious to me that it necessarily would, especially when Clover/OpenCore are already pretty decent at it.

Re:OpenCore: Hackintosh Alternative to Clover by x3sphere on Sunday April 19, 2020 @04:21PM (#22918486)
Yeah, KVM.

Someone setup a repo here with a starter config: https://github.com/Leoyzen/KVM-Opencore

You'll need to build a bootable disk image with the EFI folder there, but that should mostly work out of the box. Only thing I changed was the serial numbers so iMessage, iCloud etc work properly. I think it would be easier to set up a working Windows install with passthrough first just so you know you have that portion setup properly, and then do macOS.

Re:OpenCore: Hackintosh Alternative to Clover by unixhero on Sunday April 19, 2020 @04:11PM (#22918427)
What's your hypervisor os?
Re:OpenCore: Hackintosh Alternative to Clover by x3sphere on Sunday April 19, 2020 @04:23PM (#22918499)
Ubuntu 19.10, using KVM+QEMU
Re:OpenCore: Hackintosh Alternative to Clover by vbezhenar on Monday April 20, 2020 @06:54AM (#22922752)
For Android I would try to run its emulator on a host machine and make it accessible via network (AFAIK adb works with emulator via TCP connection anyway).