Go to file
marcosfad 3ba94cc850 Update kernel 5.6.17 2020-06-08 17:00:33 +02:00
files Add extra params to kernel and stop blacklisting thunderbolt 2020-05-31 11:25:29 +02:00
.gitignore Working Touchpad and keyboard 2020-04-27 13:39:47 +02:00
.travis.yml Add extra params to kernel and stop blacklisting thunderbolt 2020-05-31 11:25:29 +02:00
README.md Add method to get pulseaudio working 2020-05-26 10:16:09 +08:00
build.sh Update kernel 5.6.17 2020-06-08 17:00:33 +02:00
build_file_system.sh Add extra params to kernel and stop blacklisting thunderbolt 2020-05-31 11:25:29 +02:00
build_image.sh Update kernel 5.6.11 2020-05-06 21:25:05 +02:00
build_in_docker.sh Initial commit 2020-04-17 13:30:24 +02:00
create_iso.sh Fix installer and GRUB 2020-05-04 00:27:07 +02:00
prepare_iso.sh Fix installer and GRUB 2020-05-04 00:27:07 +02:00

README.md

mbp-ubuntu

The ISO in from this repo should allow you to install ubuntu without using an external keyboard or mouse on a MacBook Pro 16,1. It work in my MacBook Pro 16,1.

Build Status

If this repo helped you in any way, consider inviting a coffee to the people in the credits or me

UBUNTU 20.04 ISO with Apple T2 patches built-in (Macbooks produced >= 2018).

Apple T2 drivers are integrated with this iso.

This repo is a rework of the great work done by @mikeeq

I'm using the Kernel from - https://github.com/marcosfad/mbp-ubuntu-kernel

Using additional drivers:

Bootloader is configure correctly out of the box. No workaround needed.

Installation

  1. Reduce the size of the mac partition in MacOS
  2. Download ISO file from releases.
  3. Copy it to a USB using dd (or gdd if installed over brew):
diskutil list # found which number has the USB
diskutil umountDisk /dev/diskX
sudo gdd bs=4M if=ubuntu-20.04-5.6.10-mbp.iso of=/dev/diskX conv=fdatasync status=progress
  1. Boot in Recovery mode and allow booting unknown OS
  2. Restart and immediately press the option key until the Logo come up
  3. Select "EFI Boot" (the third option was the one that worked for me)
  4. Launch Ubuntu Live
  5. Use Ubiquity to install (just click on it)
  6. Select the options that work for you and use for the partition the following setup:
    • Leave the efi boot as preselected by the installer. Your Mac will keep on working with out problems.
    • Add a ext4 partition and mounted as /boot (1024MB)
    • Add a ext4 partition and monted as / (rest)
  7. Run the installer (In my case it had some problem removing some packages at the end, but this is no real problem)
  8. Shutdown and remove the USB Drive
  9. Start again using the option key. Select the new efi boot.
  10. Enjoy.

Configuration

# /etc/modprobe.d/hid_apple.conf
options hid_apple swap_fn_leftctrl=1
options hid_apple swap_opt_cmd=1
  • I switch the touchbar to show f* by default. If you like another configuration, change /etc/modprobe.d/apple-tb.conf or remove it.
  • To update grub, run: grub-mkconfig -o /boot/grub/grub.cfg

Update to newer kernels

IF YOU UPDATE THE KERNEL, REMEMBER TO ADD THE REQUIRED DRIVERS AGAIN.

The easy way:

sudo apt install dkms
sudo apt install linux-headers-<mbp-kernel-release>-mbp linux-image-<mbp-kernel-release>-mbp
sudo git clone --branch mbp15 https://github.com/roadrunner2/macbook12-spi-driver.git /usr/src/apple-ibridge-0.1
sudo dkms install -m apple-ibridge -v 0.1 -k <mbp-kernel-release>-mbp
modprobe apple-ib-tb
modprobe apple-ib-als
sudo git clone --branch aur https://github.com/marcosfad/mbp2018-bridge-drv.git /usr/src/apple-bce-0.1
sudo dkms install -m apple-bce -v 0.1 -k <mbp-kernel-release>-mbp
modprobe apple-bce

Another way:

Check https://github.com/marcosfad/mbp-ubuntu/blob/master/files/chroot_build.sh to see how it is done.

Know issues

  • Sound is not working after the install. Follow the instructions detailed by @kevineinarsson: https://gist.github.com/kevineinarsson/8e5e92664f97508277fefef1b8015fba
    On MBP 16,1, you might also need to disable realtime scheduling if the above gist doesn't work, because the pulseaudio server might get killed if the realtime budget is exceeded (https://bugs.freedesktop.org/show_bug.cgi?id=94629). Just add realtime-scheduling = no to /etc/pulse/daemon.conf.
  • Wifi is not working for bali (MBP 16,1). I'm using a 10$ usb wifi.
  • Checksum is failing for 2 files: md5sum.txt and /boot/grub/bios.img
  • I'm having troubles shutting down ubuntu. Screen is black but fan keeps on working. I have to force shutdown.

Not working (Following the mikeeq/mbp-fedora)

  • Dynamic audio input/output change (on connecting/disconnecting headphones jack)
  • TouchID - (@MCMrARM is working on it - https://github.com/Dunedan/mbp-2016-linux/issues/71#issuecomment-528545490)
  • Thunderbolt (is disabled, because driver was causing kernel panics (not tested with 5.5 kernel))
  • Microphone (it's recognised with new apple t2 sound driver, but there is a low mic volume amp)

TODO

  • ISO is using gzip initramfs. It would be great to change it lz4
  • Optimize the software installed.

Known issues (Following the mikeeq/mbp-fedora)

  • Kernel/Mac related issues are mentioned in kernel repo
  • ctrl+x is not working in GRUB, so if you are trying to change kernel parameters - start your OS by clicking ctrl+shift+f10 on external keyboard

Docs

Ubuntu

Github

Credits

  • @mikeeq - thanks for the amazing work in mbp-fedora
  • @MCMrARM - thanks for all RE work
  • @ozbenh - thanks for submitting NVME patch
  • @roadrunner2 - thanks for SPI (touchbar) driver
  • @aunali1 - thanks for ArchLinux Kernel CI
  • @ppaulweber - thanks for keyboard and Macbook Air patches
  • @kevineinarsson - thanks for the audio settings