Contribute
Register

Possible Nvidia Optimus functionality in macOS Mojave

Status
Not open for further replies.
Joined
Jun 9, 2013
Messages
10
Motherboard
HP OEM, LGA 775, American Megatrends BIOS
CPU
Intel Pentium Dual-Core E5200
Graphics
Intel G33/G31
Mac
  1. MacBook Pro
  2. Mac mini
  3. Mac Pro
Classic Mac
  1. Power Mac
Mobile Phone
  1. iOS
Hello community!

I just thought about a way how enabling Nvidia Optimus might be possible now thanks to macOS Mojave. Since I do not have compatible hardware I cannot work on this myself, but someone might be interested nonetheless.

The problem:
Optimus is (was) not feasible as the way it physically works does not have any macOS support: The dGPU draws to the screen through the iGPU.

The possible fix:
Copy the dGPU framebuffer's content via software to the iGPU rather than relying on hardware.

Theoretical solution:
Mojave is the first macOS release to (officially) support eGPUs connected via Thunderbolt to draw to the internal screen of a MacBook or iMac. This is accomplished by the aforementioned frame buffer-copying, with can be enabled from the GUI. (In the Finder's Information dialog for any application.)
Thus it might be possible to achieve something similar for hackintoshs if the GPUs PCI-tree mimics a thunderbolt path (via DSDT/SSDT patching?).
The graphics drivers can be patched to load for Thunderbolt devices since quite some time (like done for eGPUs on older generation MacBooks via Thunderbolt 1 or 2). This is also applicable for NVIDIA web drivers and even already works in Mojave, though there is no acceleration yet, due the need for patching 10.13.6 drivers as the Mojave ones aren't released yet.

Until Mojave web drivers are released this can be tested with 10.13.6 as there is non-GUI support for mentioned functionality.

This might be interesting for any Kepler chipset (Mojave support) and later Optimus system, and should work for any iGPU and not only Intel ones, as legit Macs copy the eGPU frame buffer to the dGPU if they are dual GPU models. I hope laptop hackintoshing can be brought forward significantly by this.

Best,
Rastafabisch

PS: I miss posted the thread. Could you please move it out of buying advice to anything more appropriate? – Fixed, thank you!

EDITs:
29.10.2018: Added supposed compatibility information.
 
Last edited:
Hello community!

I just thought about a way how enabling Nvidia Optimus might be possible now thanks to macOS Mojave. Since I do not have compatible hardware I cannot work on this myself, but someone might be interested nonetheless.

The problem:
Optimus is (was) not feasible as the way it physically works does not have any macOS support: The dGPU draws to the screen through the iGPU.

The possible fix:
Copy the dGPU framebuffer's content via software to the iGPU rather than relying on hardware.

Theoretical solution:
Mojave is the first macOS release to (officially) support eGPUs connected via Thunderbolt to draw to the internal screen of a MacBook or iMac. This is accomplished by the aforementioned frame buffer-copying, with can be enabled from the GUI. (In the Finder's Information dialog for any application.)
Thus it might be possible to achieve something similar for hackintoshs if the GPUs PCI-tree mimics a thunderbolt path (via DSDT/SSDT patching?).
The graphics drivers can be patched to load for Thunderbolt devices since quite some time (like done for eGPUs on older generation MacBooks via Thunderbolt 1 or 2). This is also applicable for NVIDIA web drivers and even already works in Mojave, though there is no acceleration yet, due the need for patching 10.13.6 drivers as the Mojave ones aren't released yet.

Until Mojave web drivers are released this can be tested with 10.13.6 as there is non-GUI support for mentioned functionality.

This might be interesting for any Kepler chipset (Mojave support) and later Optimus system, and should work for any iGPU and not only Intel ones, as legit Macs copy the eGPU frame buffer to the dGPU if they are dual GPU models. I hope laptop hackintoshing can be brought forward significantly by this.

Best,
Rastafabisch

PS: I miss posted the thread. Could you please move it out of buying advice to anything more appropriate? – Fixed, thank you!

EDITs:
29.10.2018: Added supposed compatibility information.

Regarding Nvidia Optimus, read the laptop FAQ:
http://www.tonymacx86.com/el-capita...faq-read-first-laptop-frequent-questions.html
 
Well, I know of the current incompatibility. That's why proposed this speculative workaround which just became available due to the current MacOS release. It might not work, but as far as I understand the technical basis it could work. If not feasible at all, we can close this thread, but as it would be a totally new way of working around the issue (rather tan magically implementing Optimus) it might get somewhere.

I am not suggesting rendering the OS via the dGPU like on dual GPU MacBooks! Which also happens to be the way Optimus is supposed to work (thought technically realised totally differently).

I'm rather suggesting of rendering "offscreen" and coping back to a different GPU, which is an functionality which was previously not available on macOS but which is now. Thus it might open new doors.
 
Last edited:
Well, I know of the current incompatibility. That's why proposed this speculative workaround which just became available due to the current MacOS release. It might not work, but as far as I understand the technical basis it could work. If not feasible at all, we can close this thread, but as it would be a totally new way of working around the issue (rather tan magically implementing Optimus) it might get somewhere.

I am not suggesting rendering the OS via the dGPU like on dual GPU MacBooks! Which also happens to be the way Optimus is supposed to work (thought technically realised totally differently).

I'm rather suggesting of rendering "offscreen" and coping back to a different GPU, which is an functionality which was previously not available on macOS but which is now. Thus it might open new doors.

I guess when you implement and test the "fix" you're proposing, you can update this thread with the result.
 
Well, recently I have found an interesting script for eGPUs for the real Mac.
It allows to render image to internal display using external eGPU connected through Thunderbolt 2/3 without external monitor, if I'm not mistaken.

I also successfully get my Optimus GT630 recognized in system correctly, and it looks like that I might be able to use VGA, as it is connected to GT630, but have had no luck yet.

CUDA and NVIDIA WEB drivers are working, DPCI manager shows 2 port on NVIDIA and 4 NVDA HDMI audio devices.
System Info tels me that GT630 has a VGA connector, but the system does nothing when I connect a monitor to VGA, even if I try to "scan available displays".

I also have unlock BIOS-UEFI, so I can select only NVIDIA card to use, but actually it does nothing and after restart returns back to Switchable Optimus graphics. So I don't think I actually can output from NVIDIA to internal display directly, but I suspect I can pass-through it via HD4000 like eGPU does.

Yes, I have not enough neither skills or knowledge to do that. And I'm not sure even how eGPU passthrough actually works on real Macs. Maybe there is MUX device for eGPU/Integrated graphics, and if it is so, the possibility of getting NVIDIA working with internal display is very low, due to no-one actually wants to mess with it. If the real Macs aren't using MUX but instead use something like PCI/OS passthrough like Windows 10 does when allows users to render image to display connected to other GPU, e.g., via internal graphics, in our case, it might be possible.

There're lots of scripts ending with eGPU.sh and all of them work differently.

I already tried to use one of them on Mojave, but the thing is that on Mojave that script can't force eGPU without display connected to it, and well, I have no way to test how it works if I try to connect something.

And maybe I'm wrong and it actually looks for TB 2/3 connection.
 
@RastaFabi @kikiwora
According to this article: https://www.macworld.com/article/3294696/article.html
Apple makes this possible in Mojava such that the GPU must be AMD and External and then it recognizes it.
Further more it gives you the possibility to choose which app's you want to run on the GPU.

A strategy for this is to probably get the Dedicated GPU to be recognized as an External GPU connected through "Thunderbolt 3".
 
@BeyoundAmazing the thing is that mac has specific hardware to make eGPU work, which laptops doesn't.
To make all this work, someone has to rewrite some drivers of macOS itself, cause the NVIDIA Optimus card isn't connected via Thunderbolt.
And that is a lot of work, which should be done for free.

It's the same reason why we have issues with non-Apple Bluetooth (cause it has no custom firmware functions, which Apple uses in its own devices) and internal displays of Hackintoshes.

The macOS designed to work with a way too different hardware, to run reliably on non-Native hardware.
Ofc, both macs and PCs use the same processors, memory, GPUs, other chipsets and stuff, but the thing is that these devices in mac are provided with custom firmware and connected together via different means.

For example, mac uses MUX device to switch video output between GPUs, including eGPU, but PCs and laptops don't, they use pass-through Intel method instead, which is possible to run on a mac, but requires a custom Intel & Nvidia drivers, which are non-existent for this moment on macs.

Some of those differences can be solved using patches, custom kexts, specific devices and others, but we can't alter hardware itself and it is almost impossible that someone will write a modified version of drivers for Optimus.

No-no-no, it simply isn't worth it.
I'd rather go with mac mini 2018 and eGPU or some other native configuration.

I already being in Apple`s ecosystem for more than 7 years and I've decided that Apple Devices worth that money.
So, just give up and buy a mac mini 2018, upgrade your memory, buy an external eGPU enclosure and GPU of your choice.
 
What about using pci-passthrough? Basically run Linux/KVM natively then Mac OS on a VM, passing through the dGPU to Mac OS. The iGPU would be run by the native Linux driver and could copy and display the frame buffer from the dGPU which is controlled by the MacOS driver.
 
Status
Not open for further replies.
Back
Top