Installing Debian (buster) on a MacBook Pro

My 13" MacBook Pro, bought in 2009, had finally reached the end of its life. Apple had decreed that it was too old to install MacOS High Sierra. They had also stopped releasing security updates for the Sierra OS version that was installed.

I continued to run it in its orphaned security state, while I comtemplated what the replacement would be. The negative comments regarding the new MacBook Pro keyboards and touchpad function keys, plus the poor native support the Unix tooling, stopped me buying a new Apple laptop. Instead I went for a Lenovo X1 Carbon, because of Windows Subsystem for Linux (WSL), the excellent Thinkpad keyboards and the reduced cognative load of having Windows 10 on both the desktop and laptop machines. But I digress ...

So, now I had a perfectly fine laptop doing nothing. Always need a backup laptop, so I decided to install Debian 10 on it. I'd replaced the original MacBook Pro hard drive with an SSD some time ago, so I kept the SSD as is (just in case) and installed Debian on the old hard drive, completely wiping away MacOS.

I downloaded debian-10.3.0-amd64-xfce-CD-1.iso and burnt it to a CD. The CD was inserted into the Superdrive while MacOS was running, then I rebooted, holding down the Alt key to obtain the MacBook boot menu. This lets you choose a UEFI boot off the CD and the install kicks off.

I just followed the dialogs (choosing to add /tmp, /var and /home partitions when formatting the disk). The initial install didn't have the necessary firmware for the wireless card, so I added that later (firware-b43-installer from the non-free repository. The /etc/apt/sources.list file needs to look like shown below.

  deb http://deb.debian.org/debian/ buster main contrib non-free
  deb-src http://deb.debian.org/debian/ buster main contrib non-free

  deb http://security.debian.org/debian-security buster/updates main contrib non-free
  deb-src http://security.debian.org/debian-security buster/updates main contrib non-free

  # buster-updates, previously known as 'volatile'
  deb http://deb.debian.org/debian/ buster-updates main contrib non-free
  deb-src http://deb.debian.org/debian/ buster-updates main contrib non-free

Pretty much everything seems to work; the touchpad was the only element that needed (and still needs) further changes. Firstly, I had to install the xserver-xorg-input-synaptics package. This installs an Xorg configuration file in /usr/share/X11/xorg.conf.d/70-synaptics.conf. I copied this file to /etc/X11/xorg.conf.d/70-synaptics.conf and made the following changes:

  [mark@aqua:~]$ diff -u /usr/share/X11/xorg.conf.d/70-synaptics.conf /etc/X11/xorg.conf.d/70-synaptics.conf
  --- /usr/share/X11/xorg.conf.d/70-synaptics.conf        2018-08-23 14:18:23.000000000 +0100
  +++ /etc/X11/xorg.conf.d/70-synaptics.conf      2020-02-15 13:57:01.292955085 +0000
  @@ -34,6 +34,11 @@
           MatchDriver "synaptics"
           Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
           Option "SecondarySoftButtonAreas" "58% 0 0 15% 42% 58% 0 15%"
  +        Option "TapButton1" "1"
  +        Option "TapButton2" "3"
  +        Option "TapButton3" "2"
  +        Option "VertScrollDelta" "1500"
  +        Option "HorizScrollDelta" "1500"
   EndSection

   # This option disables software buttons on Apple touchpads.
  @@ -42,5 +47,5 @@
           Identifier "Disable clickpad buttons on Apple touchpads"
           MatchProduct "Apple|bcm5974"
           MatchDriver "synaptics"
  -        Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
  +#        Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
   EndSection

This make the two-finger scrolling speed OK for me, and adds tap support for left (one finger tap), right (two finger tap) and middle (three finger tap) mouse buttons. Right-click works by pressing on the right-hand lower part of the touch pad, but middle-button doesn't. Still investigating this.

And, as proof...

Debian on a MacBook Pro