Shreyas Jani

I'm a web designer & software engineer based out of Mumbai.

I write about technology & love documenting the world around me through photography.

Things to do after installing Ubuntu on a Macbook.

28 May 2020

I missed the Ubuntu experience. I have no clue why. And just like that, I ended up installing Ubuntu's latest release, 20.04 on my macbook.

There is no reason for me to favor Ubuntu over MacOS but the frequent crashes while running my dev environment, the lack of dependency on Adobe XD kinda made me take this step. I also hated how xcode took too much space on my ssd and how I was left with very little to do with the "others" taking almost half of my ssd space. Cleanmymac was helpful but it didn't justify the expense I'd have to bear for occasional cleanups of the ssd.

Flashing Ubuntu

I used etcher to flash the iso on a usb drive and entered the bootloader by holding the option key after powering on the MacBook and hearing the "chime". This gave me an option to boot from the internal ssd and the USB Drive.

Installing Ubuntu is as straightforward as it can get. Except I set custom partitions for /, /boot, /root, /var, /efi & swap. Having an /efi partition was necessary as the installer prompted that without an efi partition, the system won't boot properly. After setting up the desired values, I proceeded to complete installation and launch into Ubuntu.

I've hated Gnome in the past, and I proceeded to remove Gnome and install Unity. But Unity on MacBook hardware gave me a hard time. Especially the touchpad drivers. Out of the box, the touchpad experience seemed very natural to use and I didn't want to flash any touchpad drivers with Unity just to make things work.

Me: "I'm going to dual boot linux and windows, and do SO MUCH coding on linux this weekend!"
Also Me: 3 days later still configuring linux...

I'm a ricer too

After installing VSCode, Gnome Terminator, git, htop, dropbox, and some other work related software, I was pretty happy with what I had. The Apple hardware mated with the most successful Linux distro for mass consumers.

Except, when I went on a hangout call with my team, I found out that the microphone and webcam don't work out of the box. Nor did the fans. The machine ran hot. Earlier with MacOS on the macbook, the palm rests never got warm leave alone toast my palms.

I found out I was missing out on some essential packages to make the hardware run as I intended it to run.

Install facetimehd-firmware

The facetimehd firmware enables the webcam. I'm not sure if it does enable the microphone as I was able to detect sound input but my browser kept prompting that a microphone was missing. Post install, both the webcam and the microphone were working so I have to believe that it does help enable to microphone too.

→ sudo apt install curl xz-utils cpio

→ git clone

→ cd facetimehd-firmware

→ make

→ sudo make install

→ cd ..

→ sudo apt install kmod libssl-dev checkinstall

→ git clone

→ cd bcwc_pcie

→ make

→ sudo make install

→ sudo depmod

→ sudo modprobe -r bdc_pci

→ sudo modprobe facetimehd

→ sudo vim /etc/modules

add facetimehd in /etc/modules and exit vim with :wq

I then went ahead and installed laptop-mode-tools and powertop. powertop requires cpufrequtils as a dependency. You can install tlp instead of laptop-mode-tools and powertop.

→ sudo apt update

→ sudo apt install laptop-mode-tools powertop cpufrequtils

// or

→ sudo apt install tlp

// Enable tlp:

→ sudo tlp start

// Check that it's running:

→ sudo tlp-stat -s

Installing Macfanctld

For the fans to come up, I installed macfanctld after adding it from the ppa.

→ sudo add-apt-repository ppa:eugenesan/ppa

→ sudo apt update

→ sudo apt install macfanctld -y

→ macfanctld --help

// you can remove macfanctld by running:

→ sudo apt remove macfanctld -y

I have a dislike for Gnome as it's not what I am used to. The way Unity handles workspaces is great. I miss that. Although, before using Ubuntu and Unity, I was using windows extensively, I wasn't even a developer back then and I didn't care much for operating systems and desktop managers. Unity just grew on me and I guess, with some patience and memorizing keyboard shortcuts, Gnome will too. Also, Gnome feels better polished on Ubuntu 20.04 than on Ubuntu 18.04.

After installing Ubuntu on my 2017 Macbook Air, I do understand one thing and that is - why MacOS is better than any other operating system currently on offer. The color profiles for the display, the thoughtful touchpad gestures, the support for Adobe suite of apps and the developer friendly nature of the operating system are a handful of things to point out.