Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save satmandu/2379f1c32b8c5e2bba80bf4239390716 to your computer and use it in GitHub Desktop.
Save satmandu/2379f1c32b8c5e2bba80bf4239390716 to your computer and use it in GitHub Desktop.
Getting a MacBookPro6,2 working with integrated graphics only with ubuntu.

FYI you can use the techniques mentioned here to get ubuntu working on your MBP 6,2 using only the integrated GPU:

http://forums.fedoraforum.org/showpost.php?p=1664873&postcount=10

Here are the steps I took, adapted from there:

edit /etc/default/grub and add the following line:

GRUB_PRELOAD_MODULES="iorw"

I also changed this line in the same file:

GRUB_CMDLINE_LINUX_DEFAULT="i915.modeset=1 nouveau.modeset=1"

Change this in /etc/grub.d/10_linux:

cat << 'EOF'
function gfxmode {
        set gfxpayload="${1}"
EOF
if [ "$vt_handoff" = 1 ]; then

to this:

cat << 'EOF'
function gfxmode {
        set gfxpayload="${1}"
EOF
echo " outb 0x728 1"
echo " outb 0x710 2"
echo " outb 0x740 2"
echo " outb 0x750 0"
if [ "$vt_handoff" = 1 ]; then

Here's what those do btw:

 outb 0x728 1 # Switch select
 outb 0x710 2 # Switch display
 outb 0x740 2 # Switch DDC
 outb 0x750 0 # Power down discrete graphics

Also you need to run this to update grub, and then reboot:

sudo update-grub
sudo /sbin/shutdown -r now

This is literally ALL I needed to do. I had installed 10.12.4 previously, which updated the EFI firmware, so I also reset my NVRAM with the command-option-P-R trick after rebooting to make sure there weren't any EFI variables left over which might be screwing with the framebuffer and GPU settings at boot.

I am also running a daily build clean install of Ubuntu 17.10 Artful Aardvark, which I think may have fixed some issues I was having with an upgrade to Zesty (Ubuntu 17.04) but you may be fine installing Zesty.

As it stands, the intel internal GPU is automatically detected, and the nvidia gpu is just never used.

(This is probably also using the internal apple_gmux driver functionality to see what is available when linux starts, so that maybe helps too.)

@jeth318
Copy link

jeth318 commented May 29, 2022

5 years later, this hack saved my ass with 22.04 on my Macbook pro (6,2). Thank you, sir.

@satmandu
Copy link
Author

Glad to be of service. :)

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