Last year, I acquired a 15” Apple MacBook Pro (14,3) throrugh my workplace. In and of itself, it is a nice piece of hardware, though there soon was a disillusionment when it came to running Linux on this device. Apple has chosen some… exotic hardware, which is poorly supported by the kernel…

Current state

To cut a long story short: There are some things that simply do not work to date. This includes the audio input/output, the TouchID fingerprint scanner as well as the integrated WiFi.

The suspend/resume function also does not work reliably. I put the device into sleepmode once, and resumed it after a few seconds. After some seconds and a bit of screen flickering, it worked for me, but there are many other people reporting problems with this. Thus, it should not be seen as a working feature.

Bluetooth should work sind kernel version 4.18. I can search for device and even pair them, but no other features work.

Also, the keyboard as well as the touchpad require a separate driver to work, which was an interesting discovery when installing Linux for the first time…

I cannot say anything concerning the Thunderbird 3 functionality right now, as I don’t own a dock. It is reported as working without problems, but I will test it myself as soon as I’m in the office again.

Github user Dunedan has put a lot of work into compiling the current state of hardware suppoirt in his repo: Github Repo mbp-2016-linux

This repo should always be the first address to look up the current state of hardware compatibility.

For everybody who is not disencouraged by the list of missing functionality, there are some hints below which should help during the installation. Down below, I describe the steps I took on my system. I used Arch Linux on the current kernel version 4.20.

This is explicitly not a step-by-step tutorial, but rather a guidepost.

Black screen during boot

Some kernel version < 4.20 cause problems when it comes to Modesetting with AMD graphics cards, which leads to a black screen. To fix this, you can pass the kernel parameter amdgpu.dc=0 during boot, which disables the Display Code functionality of the driver.

On my system, this error did no longer occur with kernel version 4.19.12 (or maybe even some minor releases earlier), and I could boot without additional kernel parameter.

Keyboard, touchpad and touchbar

As previously mentioned, the input devices won’t work without kernel module, the apple-spi driver. A currently developed fork of the driver by user roadrunner2 is available at Github: Github Repo macbook-12-spi-driver

Thanks to DKMS, the installation is pretty straightforward. You clone the repo into /usr/src/applespi-0.1 (make sure to check out the branch touchbar-driver-hid-driver), and install the module with:
dkms install -m applespi -v 0.1

Further explanation is given in the repository’s README. When the module is installed correctly, the keyboard, touchpad and touchbar should work after the next reboot.
On Linux, the touchbar shows the same control elements as on macOS: the buttons to control the screen and keyboard brightness, media control and volume buttons, and when holding the fn key, the function keys F1-F12. The escape key is also found here (how else could you use vim…)

Note to Arch Linux users (may also users of other distributions): During installation, also install the xf86-input-synaptics package. Otherwise, you will search for a long time why it doesn’t work right…

Fans do not spin up

On my installation, the integrated fans did not spin up, even with a CPU temperature of 100ºC (212ºF). After a short search, I stumpled upon a small application to control the MacBook Pro fans: mbpfan
Github Repo mbpfan | Project homepage | AUR

After the installation, some paramaters have to be customized in the file /etc/mbpfan.conf. A guide on what to enter in this file has been created by the author of the software and can be found on his website:
Configuration guide
Now you just have to start the service and the fans should regulate the CPU temerature.

Bonus: Swiping gestures

One of the features I grew accustomed to under macOS is the workspace switching by three finger swipe. This (and other) features can be replicated on Linux by using libinput-gestures:
Github Repo libinput-gestures

After the installation, copy the config file /etc/libinput-gestures.conf to ~/.config/libinput-gestures.conf to customize it. To enable simple workspace switching by swiping, the following lines suffice:

gesture swipe right 3 _internal ws_up
gesture swipe left 3 _internal ws_down

This defines “swipe left/right with three fingers” with the internal commands ws_up, respectively ws_down, which change the workspace in Gnome and KDE Plasma. To define a gesture with 4 fingers, simply replace the 3 with a 4.
Further gestures can be configured according to the comments found in the config file.

Battery life

Aside from the annoyance that is a small USB WiFi stick on a notebook, the other annoying factor is the battery life. On a rather dark display setting during some net surfing and light text editing, I get a battery life of about 3 hours and 30 minutes, which is on the poorer side.

All this despite already having optimized all parameters powertop pointed out, as well as having capped the maximum CPU frequency to 3GHz by using cpupower. Let’s hope that there will be some enhancements in the future.

Sources

Dunedan’s Github Repo with info about hardware compatibility: github.com
roadrunner2’s Github Repo with the Apple SPI driver: github.com
dgraziotin’s Github Repo with mbpfan: github.com
Project page of mbpfan: ineed.coffee
mbpfan configuration: ineed.coffee
mbpfan in the AUR: archlinux.org
buttletmark’s Github Repo with libinput-gestures: github.com