Ubuntu was intalled with the default nvidia drivers that it brought (I believe 3.90)
Clone https://github.com/0xbb/apple_set_os.efi
For details, see the README.md
Build it:
apt-get install gnu-efi
git clone https://github.com/0xbb/apple_set_os.efi
cd apple_set_os.efi
make
Copy it to /boot/efi/EFI/custom
mkdir /boot/efi/EFI/custom
cp apple_set_os.efi /boot/efi/EFI/custom
Configure Grub to automatically start apple_set_os.efi. Add the following lines to /etc/grub.d/40_custom
:
search --no-floppy --set=root --label EFI
chainloader (${root})/EFI/custom/apple_set_os.efi
boot
I edited etc/default/grub
and disabled quiet/splash so that I could at least see what's happening.
Clone https://github.com/0xbb/gpu-switch
run gpu-switch -i
to switch to integrated.
At this point I rebooted, and the graphics were messed up. I could still access the machine via SSH though, and I ran:
sudo prime-select intel
sudo reboot
After rebooting, nvidia
was still selected, but I could see the Prime Profiles (which did not show up previously) in the nvidia config window. I selected intel from there, and again sudo reboot
. At this point intel was successfully enabled.
I did this on Arch Linux with a Macbook pro 2012 with Opencore running Sonoma and it actually worked! I didn't need NVIDIA prime since us Arch people don't have access to it on older hardware it seems. All I needed with gpu switch and and to build the EFI image and follow the directions.
Thank you so very much