MacBookPro9,2 (Mid-2012)

From ArchWiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Tango-edit-clear.pngThis article or section does not follow the Laptop page guidelines.Tango-edit-clear.png

Reason: Stub (Discuss in Talk:MacBookPro9,2 (Mid-2012))

This guide outlines special information on installing and configuring Arch on the more recent Macbook 9,x (Mid-2012) hardware alongside a pre-existing OSX operating system. This requires adequate free disk space, install media (such as a USB or CD), and a wired connection for the initial steps of the install procedure.

This article is written with a dual-boot setup in mind, and does not cover how to replace OSX with Arch.

For general help on the install preocedure see the Installation guide

Note: Remember to back up your pre-existing OSX installation before proceeding!

Preparation

Recording UIDs

If you want to access your OSX user directories from Linux, write down the UID and GID for the users.

Note: OSX begins with the first user's UID at 501 while Arch defaults to 1000.
Warning: Never, ever change any file permissions in your OSX partition from Linux. Doing so can and will lead to serious repercussions.

Install Boot Manager

Optional. The easiest way to begin is by installing rEFInd on Mac OSX before moving on to Arch. This will place a boot menu on startup. The config will be in your OSX partition - if this is not desirable it is possible to install it later in Arch. For more information consult UEFI.

Shrinking Macintosh HD

Although nowadays Boot Camp requires a Windows installation disc before altering partitions, it is possible to do this using Mac OSX's disk utility. Create a new partition, calculate the amount of free space required for all new partitions and shrink Macintosh HD to accommodate for this amount. Leave the new partition as free space for now.

Installation

Preparing installation media

Download Arch and burn it to a USB, CD or DVD, and boot into the Arch install.

Running the Arch installation

Proceed from the Installation section in Installation guide#Installation. Note that you will need a wired connection to continue for now.

The following differences will apply to MacBooks:

Sample partition layout

Note: Apple prefers having 128MB of unallocated space between partitions. Whether or not this is completely necessary is uncertain, but if it seems like there is more than enough space available, then creating this buffer of free space may be a good idea.
partition  mountpoint  size       type  label
/dev/sda1  /boot/efi   200MiB     vfat  EFI
/dev/sda2  -           ?          hfs+  Mac OS X
/dev/sda3  -           ?          hfs+  Recovery
/dev/sda4  /boot       100MiB     boot  boot
/dev/sda5  /           10GiB      ext4  root
/dev/sda6  /home       remaining  ext4  home (optional)
/dev/sda7  ?           ?          ?     shared (optional)

For sharing files between OSX and Linux, a number of filesystem options exist. FAT32 is natively supported on all systems - however, it lacks support for filesystems larger than 2TB or files larger than 4GB. Journaled HFS+ partitions, such as the Macintosh HD partition, will only mount read-only in Linux. Full read-write support is available for unjournaled HFS+ filesystems. ExFAT support can be made available by installing exfat-utils.

Install boot loader

Follow the relevant page for the chosen boot loader listed in Arch boot process#Boot loader.

Post Installation

Continue with General recommendations, noting the following modifications:

SD Card Reader

The sdcard reader does not work properly with the highest speeds currently and may never work properly. To get it working you will have to sacrifice the ultra fast modes and use a quirk in your boot parameters.

sdhci.debug_quirks2=4

Users

If you wrote down your OSX uid's and gid's eariler, new users can be created by running:

# useradd -m -u [uid] -g [gid] -G [additional_groups] -s [login_shell] [username]

In order to be able to access a OSX user's directory, only the uid and gid need to match. (usernames can differ)

Wireless

Macbooks 8,1 to 9,2 (and possibly newer) use BCM4331 for Wifi. See Broadcom wireless for details. The Mac Mini 5.1 Also uses the Broadcom BCM4331 Wi-Fi Chip.

Inverting FN keys

To make the FN keys function as normal FN keys, follow Apple Keyboard#Function keys do not work.

Wireless Flakiness

The only connection manager combination with BCM4331 that does not result in flakiness seems to be connman + disabled background scanning.

/etc/connman/main.conf
[General]
BackgroundScanning = false

If the solution above does not work or your wifi is extremly slow, the NetworkManager in combination with wpa_supplicant and dhclient seems to work.

Keyboard Backlight

A "just works" solution is the acpibacklightAUR[broken link: package not found] package. It provides the just work case when controlling it with the keyboard shortcuts.

Xorg

Main Page: Xorg

Install xf86-video-intel and setup Xorg as you normally would.

The built-in keyboard and most usb input devices will work out-of-the-box, but xf86-input-synaptics is needed in order to use the built-in touchpad.

Bells & Whistles

Emulating OSX Touchpad Gestures

With a little bit of work it is possible to tweak the multitouch options on the trackpad. This can be achieved with a combination of X11 driver settings and open source software.

Using synclient

synclient is included with the xf86-input-synaptics driver. It is useful for experimenting with settings as they take effect immediately and expire at the end of an X session. Many OSX options can be emulated without any additional software.

Run synclient -l to have a look at all the available options. Here are some suggestions which resemble the options found in OSX's System Preferences:

  • By default synaptics is configured to use a double-tap drag gesture found on older touchpads - one may argue that this is not necessary on a clickpad. synclient TapAndDragGesture=0 will turn this off.
  • TapButtonX and ClickFingerX sets the mouse button triggered by tapping or clicking with X fingers. set TapButton2=3 and ClickFinger2=3 to assign two-finger click to the right mouse button.
  • Setting the bottom-right corner click to right mouse button can be done by subtracting about 500 from RightEdge and BottomEdge and plugging the new values into RightButtonAreaLeft and RightButtonAreaTop. If the last two options are not visible, set Clickpad=1.

To make settings permanent, just modify /etc/X11/xorg.conf.d/10-synaptics.conf.

Note: Right/Middle ButtonArea options are only recognized once the X fully loads the driver. To work around this, create a script file /usr/local/bin/synarea.sh with the required synclient commands, and add the script to the X startup sequence.