MacBook Pro 8,1 & 8,2 & 8,3 (2011 Macbook Pro) Ubuntu 12.10

This work is derived from the page that describes setup for the 8,1 MacBook Pro on Natty Narwhal.

N.B. this has been tested with the 8,1.

Please note that before going through any of the suggested fixes for this hardware, or installing any additional drivers, please make sure you RUN UPDATE MANAGER first and apply all updates to the system.

You can find out what model you have by typing at the terminal:

sudo dmidecode -s system-product-name

If you have a different model, please go here and find the right wiki.

A script has been created using the information provided by this article to assist users in setting up Ubuntu properly on MacBook Pro 8,2 devices. It can be found here. All that's needed is to have an ethernet connection and run the script using bash after installing Ubuntu; it will add the necessary repositories and drivers.

Upgrading from 12.04

In case you changed your user id to 501 and group id to 20 to match your OS X installation, your user might be missing after the upgrade. To fix this, create a new admin user and make sure that your original user retained its old ids (substitute your_username):

    sudo usermod -u 501 your_username
    sudo usermod -g 20 your_username

and make sure that Ubuntu detects values <1000 by editing /etc/login.defs and setting UID_MIN to 500 and GID_MIN to 20.

Overview

As of this writing, various extended hardware in the MBP needs additional work to function correctly in Ubuntu. Below is a list/overview of the features of the MacBook Pro and their alleged status.

IconsPage/ok.png (works out-of-the-box)
IconsPage/ok.png IconsPage/info.png (works, with remarks)
IconsPage/warning.png (needs manual install)
IconsPage/dont.png (won't work)
IconsPage/question.png (not yet documented)

Boot

Due to the EFI you've to download a specific ubuntu 12.10 iso and burn it into a CD or into a USB key, try UNetbootin and then hold "alt" while booting and enter to the CD icon, named "Windows", if it does not work you might use boot camp or try:

  • Download and then extract the EFI2USB booter for ubuntu

  • Format USB "MS-DOS FAT"
  • Create directory: "/efi/boot"
  • Copy the "bootX64.efi" from the zip into "/efi/boot" on your USB Drive
  • Copy the Ubuntu image into "/efi/boot/" on the USB Drive, and rename it to "boot.iso"
  • then boot holding "left alt", it will appear as Windows, then do a normal installation

Suspend

works fine out-of-the-box

Video

13-inch

Works out of the box.

15-inch

AMD Radeon HD 6470M

Works out of the box. Additional hardware suggested to install proprietary drivers. They work also.

NOTE: There is an issue on the 15 & 17 inch models that the graphics switching does not currently work (between integrated and discrete chips). The integrated graphics is not enabled unless booting from EFI. The impact is much reduced battery life. The 13 inch model is not effected since it only has the Intel chip. See the following links for details.

Screen

13 inch

The resolution is right recognised, the LED-backlit works properly. there is a script to manually adjust the screen brightness more accurately (the same of the following to adjust the keyboard backlight for all inches).

  • create a new document with the following code

#MacBacklight
#!/bin/bash
case $1 in
       -d|--display)
           if [ "$2" != "0" ]
               then
                   echo "$[(($2 * 4882) / 100) % 4883]" > /sys/class/backlight/intel_backlight/brightness
           fi;;
       -k|--keyboard)
           echo "$[(($2 * 255) / 100) % 256]" > /sys/class/leds/smc\:\:kbd_backlight/brightness;;
       -h|--help)
           echo -e "MacBook 8.1 brightness helper\n\t-d\tset display brightness (0-100%)\n\t-k\tset keyboard brightness (0-100%)\n";;
       *)
           echo -e "Unknown option try -h or --help";;
esac
  • save it as macbackl.sh and make executable

$ chmod +x mackbackl.sh
  • then copy it to /usr/bin (as root)

$ sudo cp macbackl.sh /usr/bin/mackbackl
  • then change the permissions

$ sudo chmod 777 /sys/class/backlight/intel_backlight/brightness
  • execute the script by typing

$ macbackl --help

Colors

The best way to set up good color profiles is to use the color profiling tools in OS X and import these profiles as .icc files in System Settings - Color by selecting the appropriate screen icon, clicking "add profile" and navigating to the .icc files (located in OS X under /Users/username/Library/ColorSync/Profiles or /Library/ColorSync/Profiles/Displays if the settings were saved for all users). After this, choosing the radio button under the new OS X profile should yield a nice color profile.

Reboot

Works without any specific configuration.

HFS+

HFS is mounted as Read-Only. By turning journaling off in OS X, the HFS+ file system will be read/write under Linux. This is the recommended solution if you need read/write access to your OS X partition.

It's also possible to mount HFS+ journaling-enabled volumes using the "-o force,rw" option though this is extremely risky.

Leaving the HFS's journaling turned on you're able to access it as root.

Cd&Dvd

works fine out-of-the-box.

Keyboard

Works fine out-of-the-box. there is a script to manually adjust the keyboard brightness more accurately (the same of the previous in the screen section).

  • create a new document with the following code

#MacBacklight
#!/bin/bash
case $1 in
       -d|--display)
           if [ "$2" != "0" ]
               then
                   echo "$[(($2 * 4882) / 100) % 4883]" > /sys/class/backlight/intel_backlight/brightness
           fi;;
       -k|--keyboard)
           echo "$[(($2 * 255) / 100) % 256]" > /sys/class/leds/smc\:\:kbd_backlight/brightness;;
       -h|--help)
           echo -e "MacBook 8.1 brightness helper\n\t-d\tset display brightness (0-100%)\n\t-k\tset keyboard brightness (0-100%)\n";;
       *)
           echo -e "Unknown option try -h or --help";;
esac
  • save it as macbackl.sh and make executable

$ chmod +x mackbackl.sh
  • then copy it to /usr/bin (as root)

$ sudo cp macbackl.sh /usr/bin/mackbackl
  • then change the permissions

$ sudo chmod 777 /sys/class/leds/smc\:\:kbd_backlight/brightness
  • execute the script by typing

$ macbackl --help

Touchpad

Works fine out-of-the-box. You can disable the mouse-click with the trackpad tap and the horizontal scrolling in Preferences.

Unity supports multitouch with this funcs:

  • 1 finger
    • move = move the cursor;
    • click = "your-favourite-hand"-click;
  • 2 fingers
    • move = vertical/horizontal scrolling (may be enabled in "system settings->mouse->two-finger scrolling");

    • click = "2nd-button"-click;
  • 3 fingers
    • move = move the window and shows resizing options;
  • 4 fingers
    • move = show/hide the launcher (horizontal-scroll, enable auto-hide the launcher first);
    • single-tap = show the dash.

Palm Recognition

By default palm recognition is not turned off, so you might have trouble moving the cursor or clicking something by brushing the trackpad with your palm while typing. To enable it go to system settings and check the box "click with touchpad" and "disable while typing"

Or, if the previous didn't work, open up a terminal and copy your default conf file:

sudo cp /usr/share/X11/xorg.conf.d/50-synaptics.conf /etc/X11/xorg.conf.d/my-synaptics.conf

Now edit the new conf file:

gksudo gedit /etc/X11/xorg.conf.d/my-synaptics.conf

and add the following line just before the EndSection marker of your input class:

Option "PalmDetect" "1"

Fine-tuning the touchpad

You can play with other options offered by Synaptic input drivers that are explained here and in this blog post.

External Monitor

External monitors connected via HDMI work out of the box.

If your external display's native resolution is not recognised when connected via a VGA port (only a lower resolution, such as 800x600 is offered, for example), then you need to issue a couple of xrandr commands in a terminal to force add the desired resolution. The source of information for this fix comes from here.

To check that xrandr is installed issue:

$ sudo apt-get install xrandr

You have to create a modeline using the gtf or cvt utility. For example, if you want to add a mode with resolution 1920x1080, you can enter the following command (The output is shown following):

$ cvt 1920 1080
# 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync

Then copy the information after the word "Modeline" into the xrandr command (which would in my example state):

xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync

Now get the code of your external monitor by issuing xrandr. For me the external screen is branded DP1.

Now add this mode to the available ones for your external screen:

xrandr --addmode DP1 1920x1080_60.00

And select it:

xrandr --output DP1 --mode 1920x1080_60.00

If everything goes well, the resolution should be ok now and you'll have the desired option in the normal display preferences. This will have to be repeated every time. The easiest way to automate the task, add the 3 xrandr commands to the ~/.xprofile file.

$ gedit ~/.xprofile

The file should look something like:

xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr --addmode DP1 1920x1080_60.00
xrandr --output DP1 --mode 1920x1080_60.00

Afterwards, you have to add executable access to the file:

$ chmod +x ~/.xprofile

Note: if you make a mistake in the .xprofile file, you might have trouble reverting back to normal settings - in this case you can always use ctrl+alt+F1 to open the shell interface and issue mv ~/.xprofile ~/.xprofile-old; sudo reboot to get the previous settings back.

Sound

Works out-of the box. Note that there is an additional sound processor on the AMD graphics chip. If the volume control does not seem to have any effect, change the primary audio output device in the sound mixer.

Ethernet

Works without any special configuration.

Wireless

From the Linux 3.4.X kernel it's supported but the network manager will give you "firmware missing" message. Just plug the ethernet and prompt

sudo apt-get install linux-firmware-nonfree

and it'll work without rebooting.

Bluetooth

Works out-of-the box.

Webcam

Works out-of-the box.

Microphone

Works out-of-the-box. May need to uncheck mute in the sound preferences, or alsamixer.

Sensors

The program lmsensors detects the sensors, however it does not know what they are yet. But coretemp will allow lm-sensor to detect the others sensors, the rotation speed of the fan and the GPU temperature. {{{sudo sensors-detect }}}

It will be active at next reboot, but it you want it now type:

sudo modprobe coretemp

It is highly recommended to use the fan controller daemon that is included in the mactel-support ppa called macfanctl. However, that PPA does not currently have a build of macfanctl for Oneiric, so you can use this PPA: ppa:mpodroid/mactel (required also for wireless support)

sudo add-apt-repository ppa:mactel-support/ppa 
sudo apt-get update
sudo apt-get install macfanctld

After installation you there is a config file located at /etc/macfanctl.conf. The default configurations seems to work well.

WARNING!!!! THE FOLLOWING ARE ORIGINAL PAGE, NOT EDITED YET

FireWire

To be tested.

Battery

Lasts not more then 4.30 hrs in powersave mode, in wireless mode an average of 3.40 hrs. To use cpu scaling just prompt

sudo apt-get install indicator-cpufreq

and then run it giving press "alt+f2" and write indicator-cpufreq, next boot will starts automatically.

You can increase these values by installing the laptop-mode and powertop packages, following the Extend battery life section of this thread on the forum, and recommendations stated by powertop -d

CardReader

Works with a standard SD card and SDHC card, not tested with SDXC card.

Thunderbolt

needs docs

ARC

Documentation needed.


CategoryMac

MacBookPro8-2/Quantal (last edited 2017-03-31 20:07:25 by ip70-185-197-112)