Difference between revisions of "MacBookPro10,x"

From ArchWiki
Jump to: navigation, search
(Suspend)
(30 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 
[[Category:Apple]]
 
[[Category:Apple]]
 
{{Article summary start}}
 
{{Article summary start}}
{{Article summary text|This wiki page should help you in getting your MacBook Pro with Retina Display to work with ArchLinux}}
+
{{Article summary text|This wiki page should help you in getting your [[Wikipedia:MacBook_Pro#Third_generation_.28Retina.29|MacBook Pro with Retina Display]] to work with Arch Linux.}}
 
{{Article summary heading|Related}}
 
{{Article summary heading|Related}}
 
{{Article summary wiki|Official Arch Linux Install Guide}}
 
{{Article summary wiki|Official Arch Linux Install Guide}}
Line 12: Line 12:
 
This page should help you setting up ArchLinux on a MacBook Pro 10,1 with Retina display. Most of the steps are the same or very similar to the regular ArchLinux installation. However, because this is very new hardware, the setup requires a few different steps.  
 
This page should help you setting up ArchLinux on a MacBook Pro 10,1 with Retina display. Most of the steps are the same or very similar to the regular ArchLinux installation. However, because this is very new hardware, the setup requires a few different steps.  
 
The general installation guidelines are descibed in [[MacBook]].
 
The general installation guidelines are descibed in [[MacBook]].
 +
 +
{{Note| To have all hardware supported, you should run this Notebook with Kernel 3.7 or newer. }}
  
 
== Preparing for the Installation ==
 
== Preparing for the Installation ==
 
=== Preparing the Hard drive ===
 
=== Preparing the Hard drive ===
Assuming you want to have a dual boot with Mac OS X, boot into Mac OS and shrink it's partition with the Disk Utility. You can either create your Linux partition directly here, or do that later in Linux during the installation (using parted and mkfs).
+
Assuming you want to dual boot with OS X, you have to shrink its partition with the Disk Utility. You can either create your Linux partition directly here, or do that later in Linux during the installation (using {{ic|parted}} and {{ic|mkfs}}).
 +
 
 +
=== Using the Thunderbolt to Ethernet adapter ===
 +
The adapter should work out of the box if connected before booting. Thunderbolt hotplugging is not supported (yet?).
  
 
=== Getting wireless firmware ===
 
=== Getting wireless firmware ===
In order for the WiFi chip to work, you need to get the firmware for it. There are various ways to do so. You can juts copy it from another b43 enabled archlinux box, extract it from Broadcoms driver using b43-fwcutter or get them through the b43-firmware package[https://aur.archlinux.org/packages.php?ID=21690] in AUR. In the end you should have a folder "b43" with lots of .fw files in it.
+
In order for the WiFi chip to work, you need to get the firmware for it. You can just copy it from another b43 enabled Arch, extract it from Broadcom's driver using {{Pkg|b43-fwcutter}} or get them through the {{AUR|b43-firmware}} available in the [[AUR]]. In the end you should have a folder called {{ic|b43}} with lots of {{ic|.fw}} files in it.
  
 
== Installation ==
 
== Installation ==
  
 
=== Booting the live image ===
 
=== Booting the live image ===
Now, download the latest [[Archboot]] iso, write it to USB and boot from it by selecting it in the Apple boot loader. When it comes to the syslinux boot loader, press [tab] to edit the entry and append "noapic" or "nointremap" to the end to prevent a kernel panic during bootup. Currently (august 4, 2012), you also have to add "nomodeset".
+
Now, download the latest [[Archboot]] iso, write it to USB and boot from it by selecting it in the Apple boot loader. When it comes to the syslinux boot loader, press {{Keypress|Tab}} to edit the entry and append {{ic|noapic}} or {{ic|nointremap}} to the end to prevent a kernel panic during bootup. Currently (Aug 4, 2012), you also have to add {{ic|nomodeset}}.
  
 
=== Connecting WiFi ===
 
=== Connecting WiFi ===
{{Note| You can skip this if you use the Thunderbold to Ethernet or USB to ethernet adapter for the installation.}}
+
{{Note| You can skip this if you use the Thunderbolt to ethernet adapter for the installation.}}
After it has finished booting, enter a command line. Copy the entire folder with the firmware for your wireless card to /lib/firmware/. Now you should be able to use wpa_supplicant to connect to your WiFi network.
+
After it has finished booting, enter a command line. Copy the entire folder with the firmware for your wireless card to {{ic|(/usr)/lib/firmware/}}. Now you should be able to use {{Pkg|wpa_supplicant}} to connect to your WiFi network.
  
 
=== The installation ===
 
=== The installation ===
Run the installation wizard. When asked to partition your hard drive, create a small HFS partition. This is where you put the standalone grub package after the installation.
+
{{Note|Refer to the [[MacBook]] page if you don't want to have a separate partition for GRUB but rather prefer to use [http://www.rodsbooks.com/refind/ rEFInd] (or [[MacBook#rEFIt|rEFIt]]).}}
{{Note| There are also other ways of booting the kernel. Refer to the [[MacBook]] page if you don't want to have a separate partition for grub but rather prefer to use refit/refind}}
+
Run the installation wizard. When asked to partition your hard drive, create a small HFS partition. This is where you put the standalone GRUB package after the installation.
The rest of the installation is pretty much the same as usual. When choosing the bootloader, select grub2 and install it. Don't worry about any errors, we will create the bootable efi image on our own afterwards.
+
The rest of the installation is pretty much the same as usual. When choosing the bootloader, select GRUB and install it. Don't worry about any errors, we will create the bootable efi image on our own afterwards.
  
After the installation has completed, directly copy the WiFi firmware to the installed system to /tmp/install/usr/lib/firmware.
+
After the installation has completed, directly copy the WiFi firmware to the installed system to {{ic|/tmp/install/usr/lib/firmware/}}.
 
+
=== update the kernel ===
+
Best results are obtained with the 3.5 kernel. To date, you can install it from [testing] or from the AUR linux-mainline. To get keyboard backlight and Bluetooth working, apply [http://follefuder.org/mbp10-3.5.patch this patch].
+
  
 
=== Bootloader ===
 
=== Bootloader ===
  
 
==== Direct EFI booting ====
 
==== Direct EFI booting ====
 +
''See: [[UEFI_Bootloaders]]''
  
You can directly boot from the kernel, in which case there is no bootloader per se (the kernel is its own bootloader). This is described elsewhere in [[UEFI_Bootloaders]] section EFISTUB. In a nutshell, you have to put kernel and initramfs in a linux directory of your EFI partition (sda1), together with a file containing the kernel boot parameters.
+
==== GRUB ====
  
==== Grub2 ====
+
Another solution is to install [[GRUB]]. Edit {{ic|/tmp/install/boot/grub/grub.cfg}} and edit the boot entry to load linux-mainline instead of the normal one. Also append {{ic|noapic}} to the kernel line again.
  
Another solution is to install GRUB2. Edit /tmp/install/boot/grub/grub.cfg and edit the boot entry to load linux-mainline instead of the normal one. Also append "noapic" to the kernel line again.
+
Now cd into {{ic|/tmp/install/}} and create the GRUB image by calling:
 
+
Now cd into /tmp/install and create the grub image by calling:
+
 
  grub-mkstandalone -o grub-standalone-x86_64.efi -d usr/lib/grub/x86_64-efi -O x86_64-efi -C xz boot/grub/grub.cfg
 
  grub-mkstandalone -o grub-standalone-x86_64.efi -d usr/lib/grub/x86_64-efi -O x86_64-efi -C xz boot/grub/grub.cfg
This will create file called grub-standalone-x86_64.efi which contains grub and the config file. It is important to do cd into the right directory to make it pick up the config file and put it into the right place within the image.
+
This will create file called {{ic|grub-standalone-x86_64.efi}} which contains GRUB and the config file. It is important to {{ic|cd}} into the right directory to make it pick up the config file and put it into the right place within the image.
Copy this file to the HFS partition you have created earlier. Downside of this method is that you need to repeat this step whenever you want to change the grub config.
+
Copy this file to the HFS partition you have created earlier. Downside of this method is that you need to repeat this step whenever you want to change the GRUB config.
  
Reboot the machine and boot into Mac OS. The HFS partition should be mounted and the grub standalone image in there. Follow the steps on this page to create the files needed to make the Apple boot loader pick up grub: http://mjg59.dreamwidth.org/7468.html.
+
Reboot the machine and boot into OS X. The HFS partition should be mounted and the GRUB standalone image in there. Follow the steps on this page to create the files needed to make the Apple boot loader pick up GRUB: http://mjg59.dreamwidth.org/7468.html.
After creating the files, use "bless" on the grub image on the partition, if you want to boot automatically to Arch, append --setBoot.
+
After creating the files, use {{ic|bless}} on the GRUB image on the partition, if you want to boot automatically to Arch, append {{ic|--setBoot}}.
  
After another reboot, you should be able to select your installed Arch Linux by keeping the alt button pressed while booting in case you haven't used --setBoot while blessing.
+
After another reboot, you should be able to select your installed Arch Linux by keeping the alt button pressed while booting in case you haven't used{{ic| --setBoot}} while blessing.
  
 
== Post installation ==
 
== Post installation ==
 
=== Graphics ===
 
=== Graphics ===
The Laptop comes with an nVidia and a Intel chip. To date (august 4, 2012), the nouveau and intel drivers result in corrupted graphics. The nvidia proprietary driver works though (>=302-17). You can install it from [testing] (recommended) or from the AUR nvidia-beta-all, or download the nVidia installer from their website (not recommended, always install things through pacman to avoid file conflicts).
+
The Laptop comes with an nVidia and an Intel chip. The Nouveau, the i915 (from 3.6-rc5) and proprietary nvidia (from 302.17) drivers work.
 +
You can install the nvidia driver through {{Pkg|nvidia}} or the AUR package {{AUR|nvidia-beta-all}}.
 +
 
 +
Since this device comes with a Retina (HiDPI) display, things are really small with native resolution. There are different ways to work around this "issue":
 +
# Increase the DPI value to get larger fonts (other things like icons may not look great that way) OR
 +
# Lower the screen resolution to 1680x1050 (works fine at least with nouveau drivers), but things look a little bit blurry, of course
 +
 
 +
=== Sound ===
 +
 
 +
On the MacBookPro10,2 you must use the 'snd_hda_intel' driver with the model option 'mbp101'. This model option goes in the modprobe configuration and is undocumented in the list of models available online, but it work admirably. (Until you do this, it will look it is working because you'll be able to get sound out through HDMI, but /not/ the built-in speakers.)
  
 
=== Touchpad ===
 
=== Touchpad ===
Because of the integrated button, the synaptics touchpad driver caused issues for me. Installing xf86-input-mtrack and adjusting its config produced way better results.
+
Because of the integrated button, the synaptics touchpad driver can cause some issues. Adjusting {{AUR|xf86-input-mtrack-git}} should lead to a better end result.
  
=== Suspend ===
+
The following config uses a single touch for left, two for middle, three for right:
Suspend should work fine with the nvidia drivers. In case you encounter problems with resuming, try the --quirk-dpms-on quirk. You can add a "99local" file in /etc/pm/config.d/ with the following content:
+
Section "InputClass"
<nowiki>DISPLAY_QUIRK_DPMS_ON="true"
+
    MatchIsTouchpad "on"
QUIRKOPTS="true"</nowiki>
+
    Identifier      "Touchpads"
 +
    Driver          "mtrack"
 +
    Option          "Sensitivity" "0.65"
 +
    Option          "IgnoreThumb" "true"
 +
    Option          "IgnorePalm" "true"
 +
    Option          "TapButton1" "1" 
 +
    Option          "TapButton2" "2"
 +
    Option          "TapButton3" "3"
 +
    Option          "ClickFinger1" "1"
 +
    Option          "ClickFinger2" "3"
 +
    Option          "ClickFinger3" "2"
 +
    Option          "BottomEdge" "25"
 +
EndSection
  
== What doesn't work (early August 2012) ==
+
== What doesn't work (early September 2012, 3.6-rc6) ==
  
* Nouveau driver (screen corruption; mode is correct) < solved ~ august 12, 2012.
+
* Suspend mode on lid close with nouveau <s>and i915</s> (does not come out of suspend; blank screen).
* i915 driver (screen corruption; mode is correct) < Solved august 13, 2012 (http://lists.freedesktop.org/archives/intel-gfx/2012-August/019522.html)
+
* Backlight with nouveau and nvidia drivers
+
* GMUX (not recognized by GMUX driver) < Solved august 13, 2012. Also makes suspend/resume w/ intel driver work (http://luna.vmars.tuwien.ac.at/~froe...p/apple-gmux.c)
+
* Microphone (white noise at all times)
+
* Suspend mode on lid close with nouveau and i915 (does not come out of suspend; blank screen). Solved on i915, see above.
+
  
 
== Discussions ==
 
== Discussions ==
  
 
Here are a couple of interesting threads:
 
Here are a couple of interesting threads:
* http://ubuntuforums.org/showthread.php?t=2006475 page 8 and beyond
+
* http://ubuntuforums.org/showthread.php?t=2006475
 
* https://bbs.archlinux.org/viewtopic.php?id=144255&p=1
 
* https://bbs.archlinux.org/viewtopic.php?id=144255&p=1

Revision as of 22:17, 1 March 2013

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary end

Overview

This page should help you setting up ArchLinux on a MacBook Pro 10,1 with Retina display. Most of the steps are the same or very similar to the regular ArchLinux installation. However, because this is very new hardware, the setup requires a few different steps. The general installation guidelines are descibed in MacBook.

Note: To have all hardware supported, you should run this Notebook with Kernel 3.7 or newer.

Preparing for the Installation

Preparing the Hard drive

Assuming you want to dual boot with OS X, you have to shrink its partition with the Disk Utility. You can either create your Linux partition directly here, or do that later in Linux during the installation (using parted and mkfs).

Using the Thunderbolt to Ethernet adapter

The adapter should work out of the box if connected before booting. Thunderbolt hotplugging is not supported (yet?).

Getting wireless firmware

In order for the WiFi chip to work, you need to get the firmware for it. You can just copy it from another b43 enabled Arch, extract it from Broadcom's driver using b43-fwcutter or get them through the b43-firmwareAUR available in the AUR. In the end you should have a folder called b43 with lots of .fw files in it.

Installation

Booting the live image

Now, download the latest Archboot iso, write it to USB and boot from it by selecting it in the Apple boot loader. When it comes to the syslinux boot loader, press Template:Keypress to edit the entry and append noapic or nointremap to the end to prevent a kernel panic during bootup. Currently (Aug 4, 2012), you also have to add nomodeset.

Connecting WiFi

Note: You can skip this if you use the Thunderbolt to ethernet adapter for the installation.

After it has finished booting, enter a command line. Copy the entire folder with the firmware for your wireless card to (/usr)/lib/firmware/. Now you should be able to use wpa_supplicant to connect to your WiFi network.

The installation

Note: Refer to the MacBook page if you don't want to have a separate partition for GRUB but rather prefer to use rEFInd (or rEFIt).

Run the installation wizard. When asked to partition your hard drive, create a small HFS partition. This is where you put the standalone GRUB package after the installation. The rest of the installation is pretty much the same as usual. When choosing the bootloader, select GRUB and install it. Don't worry about any errors, we will create the bootable efi image on our own afterwards.

After the installation has completed, directly copy the WiFi firmware to the installed system to /tmp/install/usr/lib/firmware/.

Bootloader

Direct EFI booting

See: UEFI_Bootloaders

GRUB

Another solution is to install GRUB. Edit /tmp/install/boot/grub/grub.cfg and edit the boot entry to load linux-mainline instead of the normal one. Also append noapic to the kernel line again.

Now cd into /tmp/install/ and create the GRUB image by calling:

grub-mkstandalone -o grub-standalone-x86_64.efi -d usr/lib/grub/x86_64-efi -O x86_64-efi -C xz boot/grub/grub.cfg

This will create file called grub-standalone-x86_64.efi which contains GRUB and the config file. It is important to cd into the right directory to make it pick up the config file and put it into the right place within the image. Copy this file to the HFS partition you have created earlier. Downside of this method is that you need to repeat this step whenever you want to change the GRUB config.

Reboot the machine and boot into OS X. The HFS partition should be mounted and the GRUB standalone image in there. Follow the steps on this page to create the files needed to make the Apple boot loader pick up GRUB: http://mjg59.dreamwidth.org/7468.html. After creating the files, use bless on the GRUB image on the partition, if you want to boot automatically to Arch, append --setBoot.

After another reboot, you should be able to select your installed Arch Linux by keeping the alt button pressed while booting in case you haven't used --setBoot while blessing.

Post installation

Graphics

The Laptop comes with an nVidia and an Intel chip. The Nouveau, the i915 (from 3.6-rc5) and proprietary nvidia (from 302.17) drivers work. You can install the nvidia driver through nvidia or the AUR package nvidia-beta-allAUR.

Since this device comes with a Retina (HiDPI) display, things are really small with native resolution. There are different ways to work around this "issue":

  1. Increase the DPI value to get larger fonts (other things like icons may not look great that way) OR
  2. Lower the screen resolution to 1680x1050 (works fine at least with nouveau drivers), but things look a little bit blurry, of course

Sound

On the MacBookPro10,2 you must use the 'snd_hda_intel' driver with the model option 'mbp101'. This model option goes in the modprobe configuration and is undocumented in the list of models available online, but it work admirably. (Until you do this, it will look it is working because you'll be able to get sound out through HDMI, but /not/ the built-in speakers.)

Touchpad

Because of the integrated button, the synaptics touchpad driver can cause some issues. Adjusting xf86-input-mtrack-gitAUR should lead to a better end result.

The following config uses a single touch for left, two for middle, three for right:

Section "InputClass"
    MatchIsTouchpad "on"
    Identifier      "Touchpads"
    Driver          "mtrack"
    Option          "Sensitivity" "0.65"
    Option          "IgnoreThumb" "true"
    Option          "IgnorePalm" "true"
    Option          "TapButton1" "1"  
    Option          "TapButton2" "2"
    Option          "TapButton3" "3"
    Option          "ClickFinger1" "1"
    Option          "ClickFinger2" "3"
    Option          "ClickFinger3" "2"
    Option          "BottomEdge" "25"
EndSection

What doesn't work (early September 2012, 3.6-rc6)

  • Suspend mode on lid close with nouveau and i915 (does not come out of suspend; blank screen).

Discussions

Here are a couple of interesting threads: