learex-zz / macOS-eGPU

Make your Mac compatible with NVIDIA and AMD eGPUs. (macOS High Sierra)
Other
691 stars 53 forks source link

Implemented --nvidiaClosedClamshellPatch. #63

Open ghost opened 5 years ago

ghost commented 5 years ago

This is a patch I applied to this script to enable closed-clamshell mode with my NVIDIA eGPU.

In IOGraphicsFamily's IOFramebuffer the line of code gIOGDebugFlags |= kIOGDbgNoClamshellOffline (only executed when an NVIDIA GPU is detected) causes closed-clamshell mode to be disabled, so when I close the macbook's lid the internal display doesn't get disabled.

This patch adds an optional (not installed by default) package --nvidiaClosedClamshellPatch to install a patch that NOPs out this line of code.

(I understand the repository hasn't been updated in some time so no big deal if this can't be merged at the time, just contributing this in case it's useful).

learex-zz commented 5 years ago

I love seeing people wanting to contribute, and I'll look at it later and hopefully merge it as well.

I'm currently writing the documentation on v2.0 so that I will not be the only one maintaining the project. I think if I have a day of free time I'll get things ready in v2 so that one can implement all features one by one. At the moment not even the wrappers are fully completed. I'm in line 372 (v2) at the moment with the documentation.