Skip to content

Instantly share code, notes, and snippets.

@elliotwutingfeng
Last active October 26, 2024 15:27
Show Gist options
  • Save elliotwutingfeng/36d66be1f4d2d5e9ea8a9b9a05c29b49 to your computer and use it in GitHub Desktop.
Save elliotwutingfeng/36d66be1f4d2d5e9ea8a9b9a05c29b49 to your computer and use it in GitHub Desktop.
Installing Ubuntu 24.04 on a 2014 Macbook Air

Installing Ubuntu 24.04 on a 2014 Macbook Air

  • Recommended: Use LVM + Encryption.
  • Expect slow installation speeds (the ports are USB 3.0 but are stuck at 2.0 speeds during installation)
  • Do not bother with installing proprietary components during OS installation; it is too slow. Do it post-installation.

Wi-Fi

  • Wi-Fi will not work out of the box. You will need a USB Wi-Fi dongle to download Wi-Fi drivers from the Internet.

  • After installing the OS, plug in your Wi-Fi dongle and run the following commands to update the system, install Wi-Fi drivers, and upgrade snap packages.

    sudo apt update && 
    sudo apt upgrade -y && 
    sudo apt install bcmwl-kernel-source -y && 
    sudo apt autoremove -y && 
    sudo systemctl daemon-reload && 
    sudo snap refresh
  • Finally, reboot the system.

Fan Control

Check that applesmc and coretemp have been installed

lsmod | grep -e applesmc -e coretemp # You should see applesmc and coretemp in the output

Install mbpfan

sudo apt install mbpfan -y
sudo systemctl enable mbpfan.service
sudo systemctl daemon-reload
sudo systemctl start mbpfan.service

Edit fan control settings

sudo nano /etc/mbpfan.conf

TLP

TLP optimizes battery life of your Macbook by implementing Powertop's recommendations out of the box.

sudo apt install tlp -y
sudo systemctl enable tlp.service
sudo systemctl daemon-reload
sudo systemctl start tlp.service

Set USB_AUTOSUSPEND=0 in /etc/tlp.conf.

Mute boot chime

Switch to root user

sudo su # Enter your root password when prompted

Then, as root user, run the following

chattr -i /sys/firmware/efi/efivars/SystemAudioVolume-7c436110-ab2a-4bbb-a880-fe41995c9f82
printf "\x07\x00\x00\x00\x00" > /sys/firmware/efi/efivars/SystemAudioVolume-7c436110-ab2a-4bbb-a880-fe41995c9f82
chattr +i /sys/firmware/efi/efivars/SystemAudioVolume-7c436110-ab2a-4bbb-a880-fe41995c9f82

Reboot your machine. You should not hear any boot chime.

Disable Thunderbolt

The old Thunderbolt adapter draws a lot of power (2W+) even when idle. If you do not use Thunderbolt, it can be disabled to reduce power consumption.

sudo nano /etc/default/grub

Append this kernel parameter acpi_osi=!Darwin to the string at the GRUB_CMDLINE_LINUX_DEFAULT field. Then save and exit.

Now update GRUB.

sudo update-grub

Finally, reboot your machine.

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment