Help with SSDT to disable NVIDIA dGPU via gmux chip in 2012 MacBookPro 10,1

I have Ventura running with OCLP, I managed to get the iGPU running the display, brightness control and lid sleep do not work and my dGPU is still active with drivers loaded. In all honesty, I'm now not sure how I got the iGPU running the screen by default I tried so many things I lost track of what did the job. I have NVRAM gpu power prefs set, and I had a simple SSDT written by CGPT, but I don't think it was actually doing anything. The kexts were not loaded for the iGPU either but I could install root patches and install OCLP to HD. That one time the dGPU wasn't even listed, but now it is every time.

The Nvidia chip is faulty in some way as it hangs boot when booting normally in macos. Interestingly it's fine in macos Safe Boot mode, and Linux Mint has no problem booting in live mode with the nvidia dGPU (and the backlight works in linux). Either way, I would like to completely disable the dGPU and power it down in MacOS, seen many references to this but nothing I've tried has worked.

I think if I adapt this SSDT (for MBP 8,X) for my MacBookPro10,1 to completely disable my dGPU and only use the iGPU is a good approach? It doesn't have any effect currently:
https://github.com/dortania/OpenCore-Legacy-Patcher/blob/main/payloads/ACPI/Source/SSDT-DGPU.dsl

From what I can tell this sends the gmux chip signals to switch off the dGPU? It doesn't work on my system, I'm not fully up to speed on ACPI and chip drivers written in C but I'm guessing I have a slightly different gmux chip and it's address / ACPI location isn't the same?I have my macbook DSDT dump (still not managed to resolve external objects) here - https://pastebin.com/iLra1m2y - I can't see enough / make sense of details on the gmux chip or even any useful power or DSM methods on the GFX0 device.

I can live boot into Linux Mint and I'm comfortable with the command line. I'm not yet up to speed fully on ACPI and understanding fully this linux driver for macbook gmux chips:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/platform/x86/apple-gmux.c

The notes in this are illuminating but not sure how it manages to work for all gmux chips across a range of MBPs

What do I need to do to get a working SSDT for my system? I can then share / submit this if it helps other people.

I have tried testing the vga-switcher debug with sudo echo OFF > /sys/kernel/debug/vgaswitcheroo/switch - interestingly this command hangs and nothing changes but that could be a number of things.

Also I've gotten a value from -

echo 4 > /sys/kernel/debug/apple_gmux/selected_port cat /sys/kernel/debug/apple_gmux/selected_port_data | xxd -p 

Any pointers greatly appreciated, spent days on this 🙏

Any way to get brightness control and lid sleep back??

submitted by /u/Beginning-Towel9812
[link] [comments]