Arch Linux Macbook Pro 10,1 Post-Install Configuration and Tweaks

This is a continuation of my previous post on Arch Linux on the Macbook Pro 10,1. This focuses on post-installation tweaks you can make on Arch Linux for this particular model. These are also applicable to the Macbook Pro 10,2, the 13-inch model without the discrete graphics.

Updates

  • 2016-03-08 Updated note on broadcom-wl-dkms
  • 2016-02-21 Added note related to b43, bcm.
  • 2016-01-17 Updated note about gpu-switch
  • 2015-12-10 Added note about lm_sensors

DKMS, Broadcom WiFi

This Macbook ships with a Broadcom BCM4331 WiFi card.

As noted in the ArchWiki, there are two options for the driver. b43-firmware is the reverse-engineered driver. broadcom-wl and broadcom-wl-dkms use the propriety Broadcom driver and are loaded as wl by the kernel, if installed and loaded.

I prefer to use DKMS in conjunction with the broadcom-wl-dkms driver, as it will be rebuilt every time a kernel update is applied.

To set up dkms, install with pacman:

$ pacman -S dkms

Then have it run at boot with systemd:

$ systemctl enable dkms

broadcom-wl-dkms can be installed from the AUR.

I found that link speed was still painfully slow, after installing broadcom-wl-dkms; however, following the instructions in this post seemed to fix…something. I'm not totally sure.

Hybrid Graphics

The model that I have of 2012 Retina Macbook Pro ships with dual GPUs.

I don't use the official propriety NVIDIA driver as the tweaks below don't seem possible with them.

I use Nouveau and Intel.

$ pacman -S xf86-video-nouveau xf86-video-intel

Switch between Nvidia card and integrated GPU (requires reboot)

gpu-switch is a script enabling you to switch between the Intel and Nvidia cards.

To switch to the intel card:

$ gpu-switch -i

To switch to the discrete GPU:

$ gpu-switch -d

Then, reboot.

Poweroff discrete GPU for better battery life with vgaswitcheroo

To poweroff the discrete GPU after you've switched to the integrated card:

$ sudo su
$ echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

Then check if it's off:

$ cat /sys/kernel/debug/vgaswitcheroo/switch

Output should be something like this:

0:DIS-Audio: :Off:0000:01:00.1
1:DIS: :Off:0000:01:00.0
2:IGD:+:Pwr:0000:00:02.0

The + indicates the active GPU.

If you want this to be automatically done on boot, install systemd-vgaswitcheroo-units from the AUR and enable vgaswitcheroo.service.

Touchpad

You can use xf86-input-mtrack for this.

Then create a configuration under /etc/X11/xorg.conf.d/50-mtrack.conf.

A sample configuration:

Fan Control with mbpfan

Install mbpfan-git for enabling fan control.

$ mbpfan -t
$ systemctl enable mbpfan

Power Management

tlp

tlp automatically tunes your computer for better battery life when the laptop is unplugged.

Install tlp from the official repos, then enable the tlp and tlp-service.

$ systemctl enable tlp
$ systemctl enable tlp-sleep

powertop

Use powertop from the official repos, which you can use to both look at power consumption and tweak system configurations to increase battery life.

You'll need to --calibrate to make sure the measurements from powertop are accurate. This will run a cycle that will turn off the display, wifi, to establish benchmarks.

$ powertop --calibrate

Then, you can use auto-tune to tweak the recommended tunables automatically. See here for how.

thermald to prevent overheating

Without any tweaks, this system can run pretty hot. My palms were sweating buckets before I set up the fan control and this package here:

thermald is an essential component of my Arch Linux system as it prevents overheating by triggering cooling at certain temperatures.

lm_sensors and sensors-detect

lm_sensors is another package that can be used to help monitor the system temperature and configure cooling.

$ pacman -S lm_sensors

Then, run sensors-detect; press ENTER at each prompt to accept the default choices, until you hit the prompt confirming whether to generate /etc/conf.d/lm_sensors.

Close

Hope this helps, and as before, please leave a comment if there are more tweaks that should be added.

I've added notes on some of these tweaks to the ArchWiki as well.