Skip to content

Instantly share code, notes, and snippets.

@harold-b
Last active December 6, 2024 01:34
Show Gist options
  • Save harold-b/4bfb09aff0e1873ab86393d72ca91c30 to your computer and use it in GitHub Desktop.
Save harold-b/4bfb09aff0e1873ab86393d72ca91c30 to your computer and use it in GitHub Desktop.
Enable Intel Graphics on Ubuntu 20.04 on MacBook Pro Mid 2012 Retina (10,1)

How to get Intel graphics working on MacBook Pro mid 2012 (10,1) Ubuntu 20.04:

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.

@lvargasmoya616
Copy link

Hi Harold, I'm running Ubuntu 20.04 in a MacBook Pro Retina mid 2012 that needed something else than macOS. I decided to run Ubuntu because I read it was great but the problem I have is with the fans. I tried your tutorial but I got lost in the Clone https://github.com/0xbb/gpu-switch.
I will appreciate any help.

@noclue
Copy link

noclue commented Nov 4, 2023

@Ivargasmoya616 it is git clone

git clone https://github.com/0xbb/gpu-switch

The you need to

cd gpu-switch
sudo ./gpu-switch -i
sudo prime-select intel
sudo reboot

After reboot run to check you are running Intel. It is quite easily apparent by the lack of choppiness in UI

sudo prime-select query

Thank you for the instruction I got my early 2013 mac running half decently Ubuntu now. YouTube still loads the CPU a lot but at least visuals and scrolling are not choppy.

@blendernoob
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment