MacBookPro10,x

This page should help you set up Arch Linux on a MacBook Pro 10,1 with Retina display. Most of the steps are the same or very similar to the regular Arch Linux installation. However, because this is very new hardware, the setup requires a few different steps.

The general installation guidelines are described in Mac.

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

As of late 2014, Thunderbolt hotplugging has been included in the mainline Linux kernel. Ethernet cables can now be used as usual through the Thunderbolt adapter.

Using a USB-to-Ethernet adapter

No special configuration is necessary to get this to work.

Getting wireless firmware

In order for the Wi-Fi chipset 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 the firmware through the package available in the AUR. In the end, you should have a folder named with a lot of files in it.

USB Tethering

If you have a smartphone, you can also try tethering your device to get connected to the internet. This should work out of the box.

Installation

Booting the live image

Download the latest ISO from the download page and prepare a live USB as outlined in USB flash installation media.

Shut down the MacBook. Plug in the USB drive. Hold the option key, then press the power button. After a few seconds, you should see Apple's boot loader display the choice of either starting up the built-in drive with OS X or the USB drive you plugged in.

Select the live USB with the arrow keys, and press Enter to boot into the live Arch Linux environment.

Connecting to Wi-Fi

Note: You can skip this if you use the Thunderbolt or USB-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 .

Now you should be able to use wifi-menu to connect to your Wi-Fi network.

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. The rest of the installation is pretty much the same as usual. When choosing the bootloader, select GRUB, and install it. Do not worry about any errors; we will create the bootable EFI image on our own afterwards.

After the installation has completed, directly copy the Wi-Fi firmware to the installed system to .

Alternatively, install broadcom-wl-dkms from the AUR to improve Wi-Fi.

Direct EFI booting

See Arch boot process#Boot loader.

As of August 2013, refind can autodetect the Arch kernel, removing the need for copying the kernel into the EFI partition. Simply install refind and enable the "scan_all_linux_kernels" and "also_scan_dirs" options in refind.conf (see link above for instructions.)

GRUB

Another solution is to install GRUB. Edit and edit the boot entry to load Linux mainline instead of the normal one. Also append to the kernel line again.

Now cd into 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 which contains GRUB and the config file. It is important to 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: https://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 .

After another reboot, you should be able to select your installed Arch Linux by keeping the alt button pressed while booting in case you have not used while blessing.

Post installation

Wi-Fi

The Macbook Pro 10,x comes with the Broadcom BCM4331 Wireless Chipset.

There are two major options to get this chipset working in Arch Linux:

The package contains the open-source, reverse-engineered firmware for the chipset.

The and broadcom-wl-dkms packages ship with the propriety, restricted-license drivers for the chipset.

See Broadcom wireless for more information.

Graphics

Note: In order to plug in an external display, you will need to have the NVIDIA card powered on as the HDMI and thunderbolt outputs are hardwired to use the NVIDIA card.

General Notes

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

Note: As of September, 2013 the current nvidia driver (325.15-5) does not work with the current 3.10 series kernels; X will die with an error about "Failed to allocate EVO core DMA push buffer" and leave you with a black screen (but able to SSH in to the machine). Your best current bet is to use a 3.9-series kernel and the older 319.32-series nvidia driver.

Since this device comes with a Retina (HiDPI) display, things may be really small with native resolution for some desktop environments. 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)
    • KDM is a great choice because the stock UI elements are vectors (not rasters which look terrible on Retina and do not scale infinitely). In addition the KWin compositor does a remarkable job on the Retina display.
  2. Lower the screen resolution to 1680x1050 (works fine at least with nouveau drivers), but things look a little bit blurry, of course
  3. Use xrandr scale option with nvidia driver to scale the resolution down to what you want. Take a look at: https://linuxmacbookproretina.blogspot.no/
  4. See HiDPI for more tweaks.

Nouveau backlight

If you are using the open-source Nouveau drivers and the active GPU is the Nvidia card, backlight levels can be adjusted by echoing a value to a file:

# echo 500 > /sys/class/backlight/gmux_backlight/brightness

To bring the backlight to its maximum level:

# echo $(cat /sys/class/backlight/gmux_backlight/max_brightness) > /sys/class/backlight/gmux_backlight/brightness

NVIDIA backlight

If you are using the propriety nvidia drivers, note that the backlight adjustment will not work out of the box.

To enable backlight control:

# setpci -v -H1 -s 00:01.00 BRIDGE_CONTROL=0

Switching to/from GPUs with gpu-switch

You can switch the display output to and from the discrete or integrated intel GPU from within Arch Linux with if you are using the open-source and drivers.

Installation

You can install from the AUR.

Then, just run the script as root.

Usage

The command switches are , to switch to the integrated card, and for switching to the discrete GPU. In order to have the changes take effect, you will need to reboot.

Switch to Intel integrated GPU and turn off discrete Nvidia GPU

To switch to intel card and poweroff the discrete GPU:

$ /path/to/gpu-switch -i

Then reboot.

Poweroff the discrete GPU using :

# echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

This will take a second or to complete.

Then, check whether the discrete GPU is still on:

$ cat /sys/kernel/debug/vgaswitcheroo/switch
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :Off:0000:01:00.0
2:DIS-Audio: :Off:0000:01:00.1

This is useful if you have opted to have an Arch Linux-only installation and cannot access the OS X-only tool iGPU.

Keeping the discrete GPU off at boot

If you want to keep the discrete GPU off at boot, see .

Graphic artifacting under b43-firmware

While on integrated graphics with the b43-firmware package, you might encounter moderate to severe graphic artifacting that appears to be correlated to wireless network traffic. (disconnected->no artifacting, connected->periodic artifacting, large transfer->severe artifacting/unusuable) This can be resolved by removing/blacklisting and using either or broadcom-wl-dkms.

Enable Vsync

to prevent screen tearing, add this to (create the file if it is not there already)

 Section "Device"
   Identifier "Intel Graphics"
   Driver     "intel"
   Option     "TearFree" "true"
 EndSection

and reboot

Sound and microphone

On the MacBookPro10,2 you may need to use the 'snd_hda_intel' driver with the model option 'mbp101'. This model option goes in the modprobe configuration; for example, add the following to /etc/modprobe.d/alsa-base.conf (forum post):

 options snd-hda-intel model=mbp101

Note this model option is undocumented in the list of models available online, but it works admirably. (Until you do this, the sound may seem fine through HDMI, but the built-in speakers and internal microphone may not work properly.)

For additional microphone troubleshooting tips, see Advanced Linux Sound Architecture/Troubleshooting#Microphone.

Touchpad

While will work, the integrated button of the touchpad may cause issues. Using the driver, with a tweaked configuration 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" "3"
    Option          "TapButton3" "2"
    Option          "ClickFinger1" "1"
    Option          "ClickFinger2" "3"
    Option          "ClickFinger3" "2"
    Option          "BottomEdge" "25"
EndSection

To use natural scrolling, also add the following inside this section:

    Option          "ScrollDownButton"  "4"
    Option          "ScrollUpButton"    "5"
    Option          "ScrollLeftButton"  "7"
    Option          "ScrollRightButton" "6"

For more configurations, check the document of .

To disable the trackpad when typing, install the utility.

Memory Card (SDHCI/SDX) Reader

There is currently a bug in the kernel (4.7.x) where the internal SD card reader times out.

As a workaround you will need to reload the sdhci kernel modules, as per: https://bugzilla.kernel.org/show_bug.cgi?id=73241#c55

# rmmod sdhci-pci sdhci
# modprobe sdhci debug_quirks2=4
# modprobe sdhci-pci

What does not work (early August 2013, 3.10.3-1)

Graphics

  • Using vgaswitcheroo to switch between iGPU / dGPU on the 15" version will result in a black screen. The system is still running and can be rebooted safely.
    • The dGPU/nouveau is active on boot. As of 3.10.3-1, the only known way to switch to the iGPU/intel is to force this through gfxCardStatus v2.2.1 on MacOS (later versions of gfxCardStatus do *not* work.) This setting will survive reboots. To revert it, you must reboot into MacOS *twice* and/or reset the SMC (shutdown and press shift+control+alt+power at the same time. Press power again to boot.)
    • Another way to force iGPU/intel is to add following commands into one of the menuentry in , The screen will remain blank until intel driver is fully loaded. Notice that dGPU will not be powered down (adding code above will prevent the system from booting up). Workaround is to compile and run following program (need ) after system is fully booted up. For further information, please read apple-gmux driver inside linux kernel tree.
    • "rmmod nouveau" will crash if the dGPU is manually powered off via vgaswitcheroo. Once this happens, it will be impossible to shutdown / reboot cleanly. Fresh patches (2 August) will hopefully fix this in the future. (Note: to enter this failure state, you must use gfxCardStatus to force the iGPU, then use vgaswitcheroo explicitly. This is rather uncommon.)
    • The dGPU / iGPU issues do not affect the 13" rmbp, which only has an intel adapter. Much simpler!
  • Nvidia drivers 319.32 fail to suspend / resume or control the backlight out of the box.
    • Nouveau and intel work fine.
  • If you are experiencing problems with Nvidia drivers, try using emulated BIOS boot instead of EFI boot.

Discussions

Here are a couple of interesting threads:

See also

  • A Puppet module for installing and configuring Arch (optionally with KDE) on the MBP Retina 10,2, along with initial install instructions, is available at . It is updated quite frequently, and run daily on its author's laptop.
This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.