Thoughts (and a little How-To): Debian 12 on a 2012 MacBook Air

Foreword

The latest pre-Gibraltar (codename for Apple computer platforms with a T1 or T2 chip) and pre-Apple Silicon Mac computers had an advantage that improved security features on the newer models severely limit (one might say prohibit, but Asahi Linux proved otherwise, and they’re doing a wonderful job): the ability to run any x64 operating system that supports UEFI in lieu of macOS.

The Debian Project, behind the ubiquitous free and open-source GNU/Linux Debian operating system, has a very strong view of what free and open-source means and how it should shape everything they do, from their code of conduct (called social contract) to the packaging of the system. One effect of that is the strict separation of non-free software, for instance necessary Wi-Fi cards firmwares.

MacBook Air defined what ultra-mobile-laptop-computing should look like, from having a full-size keyboard and a nice display to optimizing every bits of the system for improved battery life. One side effect of that is the lack of many many ports, prioritizing wireless technologies like Bluetooth and Wi-Fi over wired networks like Ethernet.

For years, installing GNU/Linux Debian on a MacBook Air meant:

  • downloading required firmwares for wireless chips to function and either stitch them to the installer or put them on a USB drive and install them afterwards;
  • having a dongle like USB-to-Ethernet or Thunderbolt-to-Ethernet for wired network connectivity.

So, yeah, it was actually easier to just install GNU/Linux Ubuntu or Mint onto a MacBook Air (or actually, any Mac) than GNU/Linux Debian, from which they derive.

But with GNU/Linux Debian 12 (codename bookworm), the Debian Project changed that through a vote and decided to include the most common non-free firmware into the installer image, streamlining the installation process for most computers.

What a relief! I’m grateful for this decision.

Getting GNU/Linux Debian to work

Installing on the MacBook Air

Such an easy step. Just put the installation image onto a drive like so (for macOS):

# dd if=/path/to/debian.iso of=/dev/rdiskX bs=4M

And you can boot the computer right from it. When the installer comes up, just answer what you’re asked for.

The required non-free firmware will automatically be loaded as needed and you should be asked to connect to a Wi-Fi network.

I’ve personally used the full-disk option with encryted LVM and separate /home, /tmp and /var partitions which I further harden with mount options in /etc/fstab.

My go-to, favorite Desktop Environment remains Xfce, so I’ve selected it as well.

Optimizing for a (MacBook) laptop

Keyboard layout

Because Apple computers use a slightly different keyboard layout, the best option is to change it throughout the system:

# dpkg-reconfigure keyboard-configuration

And be sure to select Apple MacBook and your locale variant.

Nice-to-install packages

GNU/Linux Debian comes with only the smallest subset of packages and it’s up to the user to add more packages to fit their needs. GNU/Linux Ubuntu, on the other side, includes as much as possible to cover a lot of use cases.

Here are a few packages I add on a GNU/Linux Debian computer that I use as a desktop, not a server, to adapt to power and thermal changes:

# apt install tlp linux-cpupower acpi-support acpi-call-dkms thermald 

And because I do not use it, I remove ModemManager:

# apt --purge autoremove modemmanager

What’s working?

Everything! FaceTime camera, Wi-Fi, Bluetooth sound & mic, USB, backlit keyboard, Apple keyboard keys like play/pause, sound up/down…

Conclusion

I cannot stress enough how grateful I am for the Debian Project’s decision to include non-free-but-nonetheless-required firmware that helps getting the system to work on a vast majority of computers in just minutes.

I’m not sure if that’ll help draw users from more user-friendly distributions like Ubuntu, Mint or Fedora, but it is a step in the right direction. GNU/Linux Debian is a very powerful, very capable operating system and it deserves to be more widely known, and not just as server operating system, which it is good for, but cannot be summed up to.

To me, the Debian Project could easily remove even more friction by adding (some of) the packages that are listed in Nice-to-install packages as dependencies for the task-laptop package. Those packages are meant for laptops (or energy efficient desktops), so why not add them when the installer detects that the system is being installed on a laptop?

For now, let’s rejoice that non-free firmware is included in the installer.

By Pierre Blazquez

I mess with computers, drink too much coffee and listen to music at max volume.

1 comment

  1. I managed to get a Macbook Air (mid 2012) at a great deal for my dad. Once I set up Wubuntu and integrated Pomme, its performance improved significantly. What’s quite amusing is that my dad is convinced it’s running Windows 11! 😄

Comments are closed.