Setup & Software Discussions
Linux on recent Macs!
 

Linux on recent Macs!  

  RSS

DrEGPU
(@dregpu)
Trusted Member
Joined: 9 months 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)
Famed 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.

Best ultrabooks for eGPU use

eGPU enclosure buying guide


ReplyQuote
DrEGPU
(@dregpu)
Trusted Member
Joined: 9 months 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)
Reputable 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.

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


ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 1 year 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.14+Win10
+ Linux Mint 19.1


ReplyQuote
DrEGPU
(@dregpu)
Trusted Member
Joined: 9 months 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.

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: 9 months ago
 

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.

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