Skip to content

Repository files navigation

This project has reached the end of its development. Please start using packages/readmes co-authored by t2linux group.

Migration to t2linux/fedora

  1. First update your mbp-fedora installation to the latest (possible) version of Fedora by following the tutorial from down below (section: How to upgrade current mbp-fedora installations)

    1. I was able to only update mbp-fedora to F39 with the latest version of mbp-fedora-kernel
  2. Add t2linux copr repo and install newer kernel and config packages

sudo -i

### Execute as root

## Create yum repo and change $releasever in baseurl= line to the latest one available here (i.e.: 41): https://copr.fedorainfracloud.org/coprs/sharpenedblade/t2linux
vi /etc/yum.repos.d/t2linux.repo

#########
[copr:copr.fedorainfracloud.org:sharpenedblade:t2linux]
name=Copr repo for t2linux owned by sharpenedblade
baseurl=https://download.copr.fedorainfracloud.org/results/sharpenedblade/t2linux/fedora-$releasever-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://download.copr.fedorainfracloud.org/results/sharpenedblade/t2linux/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1
priority=80
#########

### i.e.:
#########
[copr:copr.fedorainfracloud.org:sharpenedblade:t2linux]
name=Copr repo for t2linux owned by sharpenedblade
baseurl=https://download.copr.fedorainfracloud.org/results/sharpenedblade/t2linux/fedora-41-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://download.copr.fedorainfracloud.org/results/sharpenedblade/t2linux/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1
priority=80
#########

## remove mbp-fedora-t2 packages and proceed with t2linux ones

dnf remove mbp-fedora-t2-config mbp-fedora-t2-repo
rm -rf /etc/yum.repos.d/mbp-fedora.repo
dnf upgrade --refresh
dnf install t2linux-config
  1. Update to the latest version of Fedora once again by following the tutorial from down below (starting from the point 3, we don't need to update mbp-fedora-kernel as we are now using t2linux fedora kernel) (section: How to upgrade current mbp-fedora installations)
  2. Cleanup manual changes and install all t2linux packages:
dnf remove t2linux-config
dnf install t2linux-release t2linux-repos
rm -rf /etc/yum.repos.d/t2linux.repo

reboot
  1. To modify TouchBar configuration go to: /usr/share/tiny-dfr/config.toml
    1. i.e. to enable media keys as default modify line: MediaLayerDefault = false to MediaLayerDefault = true and restart tiny-dfr service systemctl restart tiny-dfr.service
    2. or to come back to stock stop tiny-dfr service: systemctl disable tiny-dfr

mbp-fedora - DEPRECATED

Build Status

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

All available Apple T2 drivers and patches are integrated into this ISO.

Kernel: https://github.com/mikeeq/mbp-fedora-kernel

Kernel patches: https://github.com/t2linux/linux-t2-patches

Tested on: Macbook Pro 15,2 13" 2019 i5 TouchBar Z0WQ000AR MV972ZE/A/R1 && Macbook Pro 16,2 13" 2020 i5

Boot ROM Version:	220.270.99.0.0 (iBridge: 16.16.6571.0.0,0)
macOS Mojave: 10.14.6 (18G103)

How to install

How to upgrade current mbp-fedora installations

# Docs: https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/
sudo -i

# 1. Make sure your OS is up to date
dnf update -y --refresh
reboot

# 2. Update mbp-fedora-kernel
## update_kernel_mbp has built-in selfupgrade function, so when it fails it's just due to script update - please rerun everything should be good on second run
KERNEL_VERSION="6.4.16-f38" UPDATE_SCRIPT_BRANCH="v6.4-f38" update_kernel_mbp
reboot

# 3. Update your OS to include all changes made in mbp-fedora-t2-config RPM
dnf update -y --refresh
reboot

# 4. Install dnf-plugin-system-upgrade
dnf install -y dnf-plugin-system-upgrade

# 5. Upgrade to new OS version
## If you're trying to upgrade older version of mbp-fedora to latest version, please repeat a process by upgrading only to one major release of Fedora, i.e.: Fedora 36 -> 37 -> 38, 38 -> 39 by changing the number passed to `--releasever` argument

dnf system-upgrade download -y --releasever=39

# 6. Reboot your Mac
dnf system-upgrade reboot

# 7. After reboot clean old packages
dnf clean packages

## 7.1 Clean all dnf cache
dnf clean all

## 8. Clean all unneeded packages
dnf autoremove -y

## 9. Update your new version of Fedora
dnf update -y --refresh
reboot

Not working

  • TouchID - (@MCMrARM is working on it - Dunedan/mbp-2016-linux#71 (comment))
  • Internal Microphone (it's recognized with new apple t2 sound driver, but there is a low mic volume amp)

Partially working

  • Suspend - really unstable, I recommend disabling it. If you would stuck in sleep mode, try to keep pressing power off button for a while to force poweroff and then turn on the Macbook.
  • Touch Bar, if you encounter any issues, I recommend reboot to MacOS/Windows to initialize TouchBar and then back to Linux - it should fix the problem.

TODO

  • disable not working camera device
    • there are two video devices (web cameras) initialized/discovered, don't know why yet

      ➜ ls -l /sys/class/video4linux/
      total 0
      lrwxrwxrwx. 1 root root 0 Aug 23 15:14 video0 -> ../../devices/pci0000:00/0000:00:1d.4/0000:02:00.1/bce/bce/bce-vhci/usb7/7-2/7-2:1.0/video4linux/video0
      lrwxrwxrwx. 1 root root 0 Aug 23 15:14 video1 -> ../../devices/pci0000:00/0000:00:1d.4/0000:02:00.1/bce/bce/bce-vhci/usb7/7-2/7-2:1.0/video4linux/video1
      ➜ cat /sys/class/video4linux/*/dev
      81:0
      81:1

Known issues

  • Kernel/Mac related issues are mentioned in kernel repo
  • internal iBridge network interface
    • Anaconda sometimes could not finish installation process and it's freezing on Network Configuration step, probably due to iBridge internal network interface
    • internal iBridge network interface is getting discovered and causing slow OS boot

workaround - two kernel modules responsible for loading it are disabled by default in mbp-fedora

echo "# Disable Unused Apple Ethernet
blacklist cdc_ncm
blacklist cdc_mbim" | sudo tee -a /etc/modprobe.d/apple_internal_eth_blacklist.conf
  • Macbooks with Apple T2 can't boot EFI binaries from HFS+ formatted ESP - only FAT32 (FAT32 have to be labelled as msftdata).

workaround applied - HFS+ ESP is reformatted to FAT32 in post-scripts step and labelled as msftdata fixed in upstream

  • 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

Fedora

Github

Old

Other

Credits

  • @MCMrARM - thanks for all RE work
  • @ozbenh - thanks for submitting NVME patch
  • @roadrunner2 - thanks for SPI (touchbar) driver
  • @aunali1 - thanks for Kernel Patches
  • @ppaulweber - thanks for keyboard and Macbook Air patches
  • @AdityaGarg8 - thanks for support and upkeeping kernel patches
  • @kekrby for T2 Audio config
  • @Redecorating for Arch support

Releases

Sponsor this project

Used by

Contributors

Languages