Setup & Software Discussions
Linux on recent Macs!
 

Linux on recent Macs!  

  RSS

DrEGPU
(@dregpu)
Trusted Member
Joined: 1 year ago
 

Ever since apple started putting the T2 security chips and running an altered version of iOS on it, getting Linux installed on 2018-2019 Macs has been impossible. Apple routes A LOT of the functions/drivers through that chip and Apple has not provided a Linux driver. Luckily, the linux community is on it and someone with reverse engineering skills has made a preliminary kernel patch to allow linux to mount the nvme SSD internal drive, which has previously been invisible/inaccessible to linux.  

Here's the github issues page:
https://github.com/Dunedan/mbp-2016-linux/issues/71

...and the discord server:
https://discord.gg/Jayz5f5

Stop by if you know anything about writing drivers or reverse engineering, or if you just want to give some kudos to MCMrARM, the main author!

MBP 2018 15 inch + 2X Aorus gaming box 1080 in BootCamp and MacOS 10.13.6
2011 13-inch MacBook Pro + Razer Core X@10Gbps-TB1 (Zotac RTX 2080 Ti Amp) + Ubuntu 18.04


nu_ninja and itsage liked
ReplyQuote
itsage
(@itsage)
Illustrious Member Admin
Joined: 3 years ago
 

@dregpu This is an excellent share! I’m glad installing Linux on Apple T2 chip-Macs is now possible. There are other challenges still but this is a good start. I gave up installing Linux on my MacBook Pro and use an Alienware 13R3 with Pop!_OS. It’s one of the few distros that provides Nvidia support in the ISO and has very good power management. Using Pop!_OS my AW13R3 can run on the battery for more than 8 hours. This is impossible with Windows. I’d be lucky to get half that.

external graphics card builds
best laptops for external GPU
eGPU enclosure buyer's guide


ReplyQuote
DrEGPU
(@dregpu)
Trusted Member
Joined: 1 year ago
 

@itsage Well, it's possible with a big but (and I cannot lie!, <sorry!>). MCMrARM is currently working to get things like the keyboard, touchpad, and basically everything else behind the T2 chip, so newer MacBooks are aren't fully operational on linux quite yet. However, getting it installed on the machine is huge progress in my mind. That said, it seems like a real chore to try and a figure out how Apple configured everything, so progress is going to be slow. Then there's the issue of how incorporate this work into linux distros (kernel mods? drivers?). So the more help, the better!

MBP 2018 15 inch + 2X Aorus gaming box 1080 in BootCamp and MacOS 10.13.6
2011 13-inch MacBook Pro + Razer Core X@10Gbps-TB1 (Zotac RTX 2080 Ti Amp) + Ubuntu 18.04


itsage liked
ReplyQuote
joevt
(@joevt)
Prominent Member
Joined: 2 years ago
 

Does the list of problem Macs include the Mac Mini 2018? It has a T2 chip. Using my Mac Mini 2018, I followed some instructions I found on the web to install Ubuntu to an external USB drive as there's no driver for the Apple internal NVMe drive. I think you have to make sure the Ubuntu installer doesn't try to access NVRAM, otherwise it hangs. This means running the installer from terminal using the -b flag:

sudo ubiquity -b

This installs Ubuntu without installing grub. I wish there was a simple way to install grub without it trying to mess with NVRAM boot variables. I just need the grub files in the correct locations. Then I can use macOS to set the boot variables, or I can use the Apple Startup Manager (hold option at boot) to select the grub boot loader. Anyway, without grub, you can still boot the Ubuntu kernel using rEFInd which will fully boot Ubuntu.

Mac mini (2018), Mac Pro (Early 2008), MacBook Pro (Retina, 15-inch, Mid 2015), GA-Z170X-Gaming 7, Sapphire Pulse Radeon RX 580 8GB GDDR5, Sonnet Echo Express III-D, Trebleet Thunderbolt 3 to NVMe M.2 case


ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 2 years ago
 

Looks like keyboard and trackpad support is coming in linux kernel version 5.3. https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.3-MacBook-Key-Trackpads

Mid-2012 13" Macbook Pro (MacBookPro9,2) TB1 -> RX 460/560 (AKiTiO Node/Thunder2)
+ macOS 10.15+Win10 + Linux Mint 19.1


ReplyQuote
DrEGPU
(@dregpu)
Trusted Member
Joined: 1 year ago
 
Posted by: @joevt

Does the list of problem Macs include the Mac Mini 2018? It has a T2 chip. Using my Mac Mini 2018, I followed some instructions I found on the web to install Ubuntu to an external USB drive as there's no driver for the Apple internal NVMe drive. I think you have to make sure the Ubuntu installer doesn't try to access NVRAM, otherwise it hangs. This means running the installer from terminal using the -b flag:

sudo ubiquity -b

This installs Ubuntu without installing grub. I wish there was a simple way to install grub without it trying to mess with NVRAM boot variables. I just need the grub files in the correct locations. Then I can use macOS to set the boot variables, or I can use the Apple Startup Manager (hold option at boot) to select the grub boot loader. Anyway, without grub, you can still boot the Ubuntu kernel using rEFInd which will fully boot Ubuntu.

Yes, the reversed engineered patches and newest kernels will work with the Mac Minis. Someone in Discord or maybe it was github, tried it on a mac mini.

Does anyone have a step by step writeup on how to apply the nvme patch for installation? I can compile the patch and insmod to a working linux installation, but trying to get that to install on the MBP's has eluded me. To be fair, I haven't devoted a lot of time to this, since I'm desperately working on a grant at the moment.

This post was modified 4 months ago

MBP 2018 15 inch + 2X Aorus gaming box 1080 in BootCamp and MacOS 10.13.6
2011 13-inch MacBook Pro + Razer Core X@10Gbps-TB1 (Zotac RTX 2080 Ti Amp) + Ubuntu 18.04


ReplyQuote
DrEGPU
(@dregpu)
Trusted Member
Joined: 1 year ago
 

For those not following this issue, Mike has created a Fedora 30 Linux for Macs with T2 chips that is almost 100% functional out of the box. 

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

MBP 2018 15 inch + 2X Aorus gaming box 1080 in BootCamp and MacOS 10.13.6
2011 13-inch MacBook Pro + Razer Core X@10Gbps-TB1 (Zotac RTX 2080 Ti Amp) + Ubuntu 18.04


mac_editor and itsage liked
ReplyQuote
Proto42
(@proto42)
New Member
Joined: 4 months ago
 

Hey @dregpu,
have you tried it on your MBPro15 and does the TB3 work?
I have been waiting for a workable Linux distro with TB3 support to get myself a Razer Core X.
I'll post it where needed, but my experience on Linux with Macs and eGPU has not been successful so far (even on an iMac 2017, which works pretty nicely under any Linux distro since not having any T2 chip).

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
DrEGPU
(@dregpu)
Trusted Member
Joined: 1 year ago
 

@proto42 I have not yet messed around with it on my MBP15Pro. I plan to in the near future since the same guy has also worked on audio and other stuff:

https://github.com/MCMrARM/mbp2018-bridge-drv

Someone else created a DKMS thingy (called "bce").

Someone also put together some packages for arch linux:

https://github.com/aunali1/linux-mbp-arch

 

MBP 2018 15 inch + 2X Aorus gaming box 1080 in BootCamp and MacOS 10.13.6
2011 13-inch MacBook Pro + Razer Core X@10Gbps-TB1 (Zotac RTX 2080 Ti Amp) + Ubuntu 18.04


ReplyQuote