Install Ubuntu 20.04 LTS on MacBookPro14,1
victorleungtw.com
victorleungtw.com
For the MacBook Pros 2016 and up I put significant effort into trying to get mainline Linux running as smoothly as possible by documenting and coordinating the efforts to have drivers for all internal devices [1], but just have a look where we're at over three years later: Audio doesn't work properly, Wifi does neither (expect for the non-TouchBar models, like the one the OP uses), hibernation is still somewhat broken and let's not even start talking about the advanced abilities of the TouchBar or support for TouchId. I could go on.
Models with T2 chip (2018 and up) are even worse in some regards and I believe it won't get better anymore. Next year we might see MacBooks with custom ARM SoCs and that's where I expect the driver situation will get even more dire. As Apple continuous to use more and more custom designed components, the effort for proper Linux drivers for such hardware only increases.
Most of these problems could be easily solved if Apple would simply make documentation for their hardware available. There are lots of great people passionate about running Linux on Macs out there, but reverse-engineering the hardware is what makes it really complicated to produce robust drivers for it.
I sincerely hope my predictions are wrong and Linux will still go strong on Macs in future as well, but for the time being I'm done with Macs.
Not the wifi one. The problem there is that the firmware itself is broken in the paths that linux implements the wifi stack. (fullmac) Mac is not affected, but practically the firmware is still broken. It's also a known/won't-fix case, so the documentation itself won't help.
What would you recommend if I need to run both Linux and Windows alongside MacOS? Virtualisation? Or would I be better off using more than one machine?
That particular functionality worked fine on Mojave.
It works fine as long as I keep my VDI files on my system drive, but that can be a pain since they're so large.
We're stuck in a situation where fixed-size disk images are too large to use if you care about your host's disk space (unless they're created with an "almost full" target usage), and dynamic sized images tend to grow to unwieldy sizes unless you regularly zero-out empty spaces from the guest (cat /dev/zero >somefile on Linux, sdelete -z C on Windows IIRC), then VBoxManage modifyhd --compact the image from the host once the VM is off.
But it shouldn't be this way. VirtualBox added support for TRIM years ago, and guest OSes could very well happily live inside dynamic images - if it worked at all.
In practice (AFAIK, for the few who ventured to use it) - it doesn't work:
To triple-boot, you start with OSX, then install Windows via Boot Camp, then resize the Windows partition to make some empty space after it for your Linux install. Then you install refind, and follow up with installing Linux.
You need to do it that way because Boot Camp won't let you leave any empty space on the drive, and you can't put your Linux partition in front of the Windows partition, because the Hybrid MBR partition table that Windows needs can only count to 4 (or something like that).
On the bright side, I think triple-booting is more robust than it used to be. It's been a while since the last time I borked Windows.
A hybrid MBR by definition is not GPT compliant. And failure to comply does in fact routinely result in the loss of user data. It was always appalling incompetency by Apple that Boot Camp ever used hybrid MBR for even one day. To still be doing this in 2020 I consider bordering on malicious.
There's no legitimate technical reason for this.
WSL is just a linux syscall wrapper around the Windows kernel, so it isn't a perfect replica, but WSL2 runs a customised linux kernel alongside windows, so it should very close.
Long running (and pausing) VMs behave better on fusion. I see better stability when pushed hard. Better use of the hardware. Been a long time since I ran benchmarks, but the same VM was about 4-10 seconds faster on a 2 minute process. Not enough to matter for most. The native disk access helps with things that are IO sensitive.
The UI drivers are better... so if you open up and run a Linux desktop, it feels much more native, if that is a thing.
I don't think I've even opened virtualbox in the last couple years... so my comparisons may be dated. YMMV
Vbox graphics performance also left much to be desired: e.g dragging a terminal window around was slow, produced insane tearing and huge performance impact, and no amount of tuning would help; I’m not even talking about 3D stuff, this is just some plain X lightweight WM without a compositor. No such issue on Fusion, where I just imported the same VM.
But it also depends if you using VMware Fusion on MacOS or VMWare Workstation on Windows and Linux.
But if you use Linux I would suggest using KVM/QEMU and on Windows, Hyper-V.
You can use Vagrant with both KVM and Hyper-V.
I can't use Windows boxes with Vagrant on Linux. It doesn't seem to work that great.
OTOH if you try to install Linux on any recent MacBook Pro, you are in for hours and hours of googling weird shit with like only 2 comments on forums you have never heard of, and you will still never get Wi-Fi, sound, and sleep/hibernation all working at the same time.
It's just not worth it. If you are so hardcore about software freedom that you demand to install Linux natively on the metal then you should absolutely not, now or ever, buy a Mac.
OTOH if you just need to like, build some shit that only builds and runs on Linux, and you have $200 — VMWare. I don't like VMWare in theory (the Monsanto of tech companies) but I sure like them a lot in practice.
I have needed a Mac/Windows/Linux laptop for my job for the past decade. In former times, I installed Windows and Mac OS X, and ran the latest Ubuttnu in either VMWare Workstation or VMWare Fusion.
But since 2016 I just use VMWare Fusion for both Windows and Linux. If you want to use a Mac, I am confident that's the "best" approach.
(For me, that means "runs all GUI and CLI programs reasonably well, with the minimum hours per year spend fucking with shit just to make it work. But if you actually need efficient GPU acceleration or real high performance (like not a web app or GUI app, but some kind of computationally expensive whatever) under Linux — well, then get something other than a Mac.)
The small investment in VMWare Fusion was worth it but I still need some dedicated machines.
I just have a few issues:
Problem #1: Disk space requirements. I have a late 2013 MBP and windows gobbles up a min 60GB for the image, which is 1/4th my SDD. This is why I ended up buying cheap beige boxes for every other OS (or AWS).
Problem #2: Clipboard on VMWare is a trainwreck. Same goes for VNC and Microsoft Remote Desktop which I also use. My workaround is to use a text file on my router's USB drive so that I cut and paste through that in each OS.
----> I would pay someone $1,000 to come to my house and fix my clipboard problems.
Problem #3a: The magic mouse blows chunks on anything but macOS. And even running Excel on macOS is impossible with a magic mouse. The left-right slop makes it difficult to scroll vertically without drifting diagonally... I don't know how macOS apps solve that.
Problem #3b: I would kill for a mouse with a real middle button, not a scroll+button. Unix/X middle click paste is a feature I sorely miss on macOS and Windows.
> ... not a scroll+button. Unix/X middle click paste is a feature I sorely miss on macOS and Windows.
You phrased it in context like you thought using a Mac was preventing you from using a mouse with a middle button, especially when it was right after the section complaining about the Magic Mouse.
Command-C and Command-V are just so much better. Learn to love them.
So you don't need a MacBook or an iMac to run MacOS.
But it might be worth it, depending what you need to do.. I tend to do my actual work writing code and on the Mac side, even if the code is running on Linux, so for me it makes sense to keep the Mac experience the native one.
This really depends on whether you prefer Apple hardware or not. If you want Macbook hardware, use virtualization. If you want any kind of desktop or a laptop where everything isn't soldered and epoxied together, get whatever PC you want and then put the cheapest available Mac Mini in a corner and access it with remote desktop or similar as necessary. Another good solution is to buy a used Macbook which is old enough to have a rundown battery but not so old it won't run a recent macos, and then you get a better price and the battery doesn't matter because you're not actually using it as a laptop.
That's what I would do.
I assumed it was because this machine didnt fall into the “newer Macs that have issues with Linux” bucket
> Audio doesn't work properly, Wifi does neither (expect for the non-TouchBar models, like the one the OP uses)
Wifi has a (pretty stable) proper workaround now, you might want to see this[0].
But I think the crux of the problem is that people are trying to run commodity software on custom hardware. That just won't work long-term.
Linux is commodity software, that runs great on white box commodity hardware. macOS is custom software that runs great on custom hardware. Each has its place and purpose.
It's like driving a car on train tracks. Yes, it will get you somewhere, but it's not the right match of tools and environment. And it's inevitably going to be a bumpy ride.
Any application that pushes frames/performance would do better on Linux/Windows on the equivalent amount of silicon. What's missing because the hardware and drivers is so closed is the feedback loop between application/game devs and the vendors. If I have an issue with what I'm building, I can hop into a chat and immediately talk to Nvidia/AMD/Intel folks/etc. In some cases, they share code, in some cases they release a driver update. In pretty much all cases, the code I'm working on gets better. Apple lacks this feedback loop, and their drivers are garbage.
There may be exceptions, but I never had anything like the graphics glitching that the Nouveau drivers had or known problems that would lock up Intel GPUs every one 1-2 days or consistently in some workloads [1], or broken Intel WiFi drivers. The recent Intel driver problems literally took months 4-5 months to fix, while they show-stopping errors were in an LTS kernel release that was rolled out in various distributions.
If I have an issue with what I'm building, I can hop into a chat and immediately talk to Nvidia/AMD/Intel folks/etc. In some cases, they share code, in some cases they release a driver update.
You mean like asking NVIDIA for Wayland support following the same standards as everyone else? That worked well.
Everyone's drivers are bad, but I don't believe for a second that Apple's are measurably worse than Linux or Windows drivers.
[1] https://linuxreviews.org/Linux_Kernel_5.5_Will_Not_Fix_The_F...
[2] https://www.phoronix.com/scan.php?page=news_item&px=Linux-5....
Mac's are not as custom as you think, and it wouldn't be that hard for them to give out enough information to get Linux running on MBPs. In fact I hope we have a large community of folks making sure we can reverse engineer everything.
LLVM and the likes are great compilers, but Apple is leading exactly where Stallman warned about - a computer you can't write software for.
I mostly did just coordination and verification. The only code I contributed are very small workarounds for the NVMe controller and webcam. Nothing noteworthy. The serious work of reverse engineering and implementing custom drivers was done by others which are to be applauded much more!
There is one person I want to point out in particular and that's roadrunner2 [1] who took the existing input driver for the 12" Retina MacBook and not just made it work with the MacBook Pro's, but also implemented support for the TouchBar and ambient light sensor. As this driver is based solely on reverse-engineered workings of the input system and Apple does very unique stuff there this was so much effort. Including very subtle, but surprising bugs (e.g. [2]) which could've easily avoided if documentation would've been available.
roadrunner2 is also the one to applaud for bringing the support for keyboard and touchpad to mainline Linux. As that not just required an input driver, but also touched other subsystems and required serious refactorings that was quite an achievement as well and is the reason keyboard and touchpad even work out of the box after booting a Linux distribution nowadays (although it's still not perfect as some distributions don't enable the applespi driver yet).
[1]: https://github.com/roadrunner2/macbook12-spi-driver [2]: https://github.com/cb22/macbook12-spi-driver/issues/53
[1] https://www.nextplatform.com/2018/06/20/a-deep-dive-into-cis...
My worry is that while Apple is continually making their machines less and less useful for development (meaning macOS as an environment), that the Linux laptop story remains bad even on the Dell “Ubuntu Certified” machines or the Lenovo line of newer Thinkpads.
I think this means I’m resigned to “No, I would rather ssh to a Linux workstation” because I want to spend ~0 hours per year fighting with “WiFi doesn’t work, Audio doesn’t work, or Suspend sucks”. A recent set of threads here suggested buying a sufficiently old Thinkpad that the Linux community has worked out the bugs. Thoughts?
Edit: Thanks for the responses! (Sounds like a year or so back is plenty for solid support).
If you want to stick with a specific brand (eg. I usually buy Lenovo) the trick has always been to buy one gen back. Laptops are all custom hardware by nature and if the manufacturer isn't spending the time to make sure Linux works on it then it is up to the community, and they can't do it until it is available. Once available it seems to take a year or so to get everything ironed out (assuming it is a major brand popular among Linux users). This really applies equally well to small, token lines, like Dell's, as they are really only a few steps ahead of the community due to limited resources.
Regarding the need to fix occasional problems when using Linux: There is no silver bullet. While Linux has some advantages over the other operating systems, it also has its disadvantages. One disadvantage is that it's still quite niche, which I believe is the main reason for such problems. However from my experience it has already gotten _a lot_ better over the past two decades. More people are using Linux nowadays which results in companies putting more effort and resources into Linux development which then results in a better overall experience for everybody.
If your goal is to spend no time at all fixing or tweaking your system, I'd say Linux isn't the right choice for now.
[1]: https://fwupd.org/
I've seen that github go from quite a hopeless situation, to a surprisingly complete amount of things working, under your watch.
I do agree with your assessment that the ARM future isn't looking good, but I'm still hopeful, and we really won't know until people try it out. Many of us, like me don't need all features working e.g. I can do without WiFi if need be, so I don't feel as defeated as you, due to having not as complete a goal set.
I urge you to put a clear message at the top of the github about your current status of involvement. It may encourage others to step up and take the reins for a while? You've done an amazing job, maybe a break is in order!
No worries, I'm still accepting PRs and occasionally moderate discussions when they are in need of moderation.
Ignorance is not helping either side.
Disclosure: I own a lot of Apple products, though I still prefer Ubuntu to MacOS.
And your beliefs about what you presume other people imply should probably stay out of this discussion.
Apple makes kick-ass machines, but I see Macbook Pros everywhere. How many people in the real world need a $2000+ computer? If these people aren't buying it for the logo, what are they buying it for?
Apple has positioned themselves as a lifestyle brand. How can you deny that?
I'm looking at buying a laptop right now and I can either buy an apple MBP ... OR a MONSTER laptop with much better specs for the same-or-less price. I'm hand-wringing over it.
With past laptops I've only been disappointed by the non-Apple laptops I've had. Bad ram, bad battery, bad battery again, bad battery AGAIN, slow-for-hardware-misfiring issues... or the Apple that has been a truly reliable machine for going on nine years.
Trust in Quality.
That's my "denial".
But all that is a shitty landscape, opinions are mine. I meant no offense. But you see how things work out there.
Then work gave me a Mac. Suddenly I had a Linux machine without the headaches. It took me about 6 months to get used to the OS, but by then I loved it and bought one for the house.
I now have a Linux machine at work and am spending my weekend upgrading the operating system because my video card goes insane and it takes me 3 days of fiddling to finally get it working again.
YES, SPEND MY WEEKEND WORKING SO MY VIDEO CARD WILL WORK.
But my Mac has VIM, grep, awk, cron, sed, and find. A real Linux shell, in other words. It also runs most of the Linux apps I want to run.
Also, I know they didn't stealthily give me a cheap-ass battery that's going to need replacing right outside of warranty. I know it'll be fine.
My laptop isn't a status symbol for you to see and adore.
Honestly?
I wish I could hide the fact that I had a Mac so that I wouldn't worry that it'd be stolen at conferences!
...
Anyway. I humbly suggest that you may be the thing you despise: An Apple snob. Just not the kind most people know. Maybe you're the "Granny Smith" type of Apple snobs. ;-)
I've upvoted your comment since we've clearly misunderstood each other. I don't think we're at disparity, the bloke tried to install Ubuntu on a mac after all. It's all good.
The quality on this laptop is amazing. The keyboard works (have a friend who took his new MBP to Apple 3x in the first month due to keyboard issues). The trackpad is amazing (they used to not be so). I'll be on these machines for the coming years (probably ~6-10 based on my history, then back to OSX).
Edit: it was also ~$1000 cheaper for equivalent specs as the MBP.
1. Shitty 1080p TN or barely IPS panels with laughable color accuracy, horribly bad color reproduction, viewing angles that just plain suck, 300 or 250 nits brightness and no 100% coverage of even sRGB.
2. Completely overkill and expensive 4K panels with HDR, touch, OLED, all the bell and whistles that somehow forgot that they are in laptops and drain battery at ridiculous levels.
Apple, on the other hand, have displays that have the perfect pixel density for laptops so their battery drain is manageable, have excellent color space coverage (even the 999$ Air has 100% sRGB) and perfect color accuracy and viewing angles.
Then comes the trackpad and it's not even a contest. On a macbook, I really don't need a mouse unless I am doing something high precision like Illustrator or video editing. Even there the trackpad is workable.
And then something that is more on a personal level, but no one apart from Apple has their high end devices available in India quickly. The new dell XPS might come very close to the macbook, but getting it in India is not possible, even after 4 months after launch. Even if it arrives, it will be one or two base models with limited availability or the completely overkill models. Not so with Apple.
I still think than MacBooks's resolution is the best compromise though
For various reasons my main OS is Windows, however due to my past life as Linux fanboy during the university, when I decided to buy a travel netbook, Asus were the ones getting my money for a 1215B with Ubuntu pre-installed.
Sure it had a couple of issues later, more due to the way that Canonical managed the transition of the wlan and Brazos drivers, but it served the message to which vendors I wanted to support.
Don't want to use either Windows or hate Apple's behaviours? Then support the OEMs trying to ship Linux on their hardware.
Another thing is Thunderbolt, but IDK if that’s supported under Linux? So that might be a moot point anyhow.
All my years of StarCraft have me a wiz at mouse and keyboard. Plus I doc to 3 screens.
Onthego, I have touch screen which I use surprisingly often.
I'm less enamored with the rest. My daily driver laptop is a 32G i9 from 2018(?). While I have enough RAM to run a couple docker containers, most of the folks I work with are stuck with the 16G version, which are constantly out of resources and have no upgrade plan. For being a 'pro' spec machine, it does not have the cooling it needs to be pushed like I do.
Aren't most Mac laptops screens glossy though? I don't really care how good the screen is if it acts like a huge mirror all the time.
As for the trackpad, if you are proficient with the keyboard (or use a tiling wm) it does not really matter anymore.
There’s also no way around using the trackpad sometimes. Using i3 and Vim keybindings wherever possible, I still need my trackpad enough that its relatively poor quality is annoying.
I guess it must be subjective, because I find they are horribly glossy. I'm still using an old matte Macbook for this reason.
I bought Macs way back in the day - my last one was a 2006 Mac Mini to use as an HTPC. But every time I get ready to buy a computer, Macs don’t seem to have any advantage. I would be installing the same software I use for Windows - Chrome, Visual Studio Code and various language runtimes, Visual Studio (or Rider), a bit torrent client, Plex, etc.
I can buy a Dell a lot cheaper - of course from the MS store to avoid all of the crapware - and have more options.
I still recommend Macs for other people though who have the budget. They are still slightly less of a hassle than Windows and they can go to an Apple Store if they have any issues.
A while ago I installed a pristine Windows 10 (retail) copy on my NUC, just to see where Windows is at. I'll skip the Candy Crash Saga criticism. But I was really surprised that besides the drivers, it also auto-installed some crappy RealTek application and some crappy Intel application (for tweaking GPU settings or whatever). No vendor driver CDs or whatnot. Just letting Windows idle for some time and these applications were installed.
Is it really possible to get a pristine Windows install these days?
My previous Windows laptop had a super annoying constant display flickering, even on a fresh installation.
After months, I learned that I had to disable "auto-resfresh display" (or something similar) that in an Intel app because it was enabled by default (and re-enabled after every major update). Compared to macOS/Gnome, I think that Windows shows poor taste in many aspects
It's excessively expensive though. It's a business expense for me, but otherwise I would've bought one of those laptops that come with Linux pre-installed.
Most likes Linux laptops are in the same pricing ballpark as a MacBook Air or MacBook Pro. And they don't have macOS.
For me, the MacBooks still have the best build quality, trackpad, speakers, display resolution (instead of the FHD vs overkill 4K choice) and, more importantly, I just prefer macOS and its approach on laptops. Furthermore, you can still sell a used macbook after years for quite high prices compared to the Windows alternatives. Granted, I'd never buy some of Apple's products/configurations (like an iMac, the Mac Pro or the 16 MBP with 64 GB of RAM), but a base MBP with 16GB of RAM is more than adequate for me nowadays and it's not much more expensive than the alternatives.
If you don't care about the OS (or prefer Windows/linux), then obviously a macbook doesn't make any sense these days
Why are MBs and MBPs used in the tech industry? Many types of dev roles can only be done well on Linux or OSX (or BSD), because they're writing software for servers or their software runs on servers. The company has to choose. Some companies go exclusively Linux for their desktops and OSX for their laptops. Some go exclusively laptop. Linux does have mature enough laptops for consumers, but for business use on the laptop side Linux hasn't gone far enough. I have yet to run into a company that doesn't offer laptops because of remote and partial remote work being so common, along with needing to take your work computer into meeting rooms from time to time.
In short, it depends on the industry you're in, and if you're not in those industries you probably haven't seen it, but what fuels most Macbook sales is businesses.
RAM and docker were very important for our product and whoever chose the MacBook ended up regretting it (devs only, I mean).
Requiring docker from the get go sounds painful, but maybe that just comes from my inexperience never having to use it. Like, does CLion, PyCharm, and similar even support building into docker from the get go? Wouldn't that increase build times instead of just building it natively on your machine? Any extra level of complexity is painful until you automate it in a bug free and efficient way, I suppose.
So, setting aside the price and performance, compare the machines setting those aside. Most other machines feel clunky by comparison. I bought an XPS 15 and had audio driver issues. The fans blow out of the bottom, which seems pretty lame for having a laptop, say, on your lap. It has a lame plastic flexy feel compared to a MacBook. A lot of people mention the XPS line as an alternative to the Macs, but I bought one to leave the Mac ecosystem, and it felt so clunky that I still just went ahead and bought another Mac after that.
So, I really think it makes perfect sense if the price and performance don't much concern you.
On the other hand, even if Kubuntu (my preference) run perfectly on a Macbook, I'd still go for a Thinkpad, because of the keyboard and the touchpad.
I have a 2011 MBA whose battery still lasts an hour and it can do all the "daily driver" tasks except gaming.
(Meanwhile I replaced my other laptop's battery 3 times in that time!)
THe MBA's mobo finally went out so I'm in the market for a new laptop NOW and want to justify buying an EIGHTH GEN i5 MBP for over $1000 when there are laptops with TENTH gen i7's and >1tb hdd's for similar money.......
I mainly go back to the batteries I had to buy for one laptop.
But... are we talking about the same XPS laptop? My wife's 13" XPS purchased ~2016 has had horrible reliability. The charging port died a long time ago, fortunately, it charges over USB-C. But now it no longer keeps a charge, won't sleep/hibernate properly (will cook with the lid closed), and more. A friend of mine bought the same one at the same time and his is also breaking down (keyboard problems).
I've tried to get her to switch to Mac, but she prefers Windows, so next time I'm buying her a Surface Laptop. HTH anyone considering the XPS.
Last I tried this was on a 2016 X1 Carbon.
I have a macbook 15 for work and am extremely disappointed in its battery life, so I think the Lenovo matches up well.
I do have tlp running on it.
You might check out your old model here, just to see if there are important tweaks: https://www.thinkwiki.org/wiki/ThinkWiki
If HW reliability is a concern and you want to choose Apple, couldn't you BootCamp it or run Windows in a full screen VM?
I looked at the 2020 Macbook Air (the $~1300 model), and it seems to offer the same or better specs (depending how much you value the display) for the price. Are we at the point where we must pay a premium NOT to run OSX, or am I missing something? I don't love the direction OSX has headed, but I'm still content enough running it and using Linux remotely where needed.
The Lemur looks interesting (nice you can get it with more than 16GB RAM in 14")... wonder how the quality is on it though
I ended up going with a 15' XPS and installing Ubuntu. The annoying part was the wifi card which sometimes Ubuntu would stop finding, so I'd have to re-install the drivers. For simplicity sake, I didn't bother having hybrid graphics since the only time I really needed the video card was simulations or computer gaming (which I did with booting in Windows).
I had a 15 XPS (Skylake version?) a few years ago with Ubuntu - I just ended up buying an Intel Wifi card for $25 and replacing the oem one. The nice thing about that XPS was it was user serviceable.
I used a 2015 Macbook Pro to experiment with making the leap to Linux desktop (though Macbook was essentially just a Linux terminal already).
I think everything worked (this was a year ago) - what pushed me to an XPS was when I realized (pretty quickly) that I have 0 interest in figuring out which arcane key sequence on the Mac keyboard was equivalent to a certain special key on a "PC" keyboard.
I was a 10+-year MacOS power user, and I'd felt it would be impossible to be "happy" (more like "unannoyed") with anything else - I'd re-evaluate that question every year.
I've been happily using Linux Mint on an XPS 15 since Sept last year. Cannot believe what a non-issue the change has been. I have hardly thought about my Macbook - been on it maybe 2 or 3 times to test something Mac-specific. Had I known, I would have switched a few years earlier, rather than "powering through" the unpleasant last few years.
I wouldnt want to fight with Apple hw with Linux. Apple doesnt want to make it doable any longer...
You can follow the instructions to create a patched Ubuntu installer, or you can just download the image.
For such a technical post, I’m surprised this is the recommendation. There are a million ways to copy the iso to the usb drive and make it bootable. The easiest in my opinion is:
cat Ubuntu.iso > /dev/diskI'd suggest you virtualize a normal Linux host on your machine (under VMware for example) and run Docker there.
The reason it doesn't work on WSL1 is because of the whole Linux kernel not being there, the features required for Docker to work don't exist. But since WSL2 is a (rather performant for certain tasks) VM, it works fine.
[1] https://nickjanetakis.com/blog/setting-up-docker-for-windows...
The problems started when I docker-compose up'd a pretty basic nginx-php-mariadb stack.
A short description, a bit old, but still useful:
So even if Docker supported a native container system on MacOS, it would be useless because no Linux Docker images could run on it.
(Ok, expanding the memory to a decent size is a little more work)
https://support.apple.com/en-us/HT201300
This is a model without Apple T2, which probably simplifies Linux support.
I pay the premium for Apple precisely because everything just works, and works well. (Barring the occasional bugs...)
As far as I am aware of how the Linux kernel is structured, these patches would have to be submitted as BSP 'quirks'. Most of the ICs (such as the audio IC) that Apple used are standard components with Linux drivers available, but Apple often uses different pinouts or configurations requiring modified (patched) drivers to make them work.
In the current state I don't think the patches meet Linus's quality standards to be accepted into the kernel, but it shouldn't be too hard to polish that up.
Should be a fun project to work on of you are looking at contributing to the Linux kernel. You'll need basic knowledge of electronics and embedded systems, but it shouldn't be that hard. Judging from Louis Rossman's youtube channel the schematics for each Macbook board should be available.
Heck, now that I think of it: I would like to give it a try, if only I had a Macbook available to do this with.
It mentions adding the touchbar, keyboard drivers[1] and fixes for the non-working wifi[2], all without an external keyboard or anything. You can just boot up your Ubuntu virtual machine, execute some commands in the chroot environment & make an bootable ISO.
This gist[3] and this GitHub repo[4] might also be worth to check out - although it looks like a bit lagging in information (the wifi fix, added last November isn't reflected yet).
This is my command checklist (tweaked from this[0] to match my prefs), might be helpful for someone?
### check if pwd is ~/Download
# ask password beforehand
sudo -v
# mounting iso and copying to current file
sudo mkdir -p /mnt/iso
sudo mount ubuntu-20.04-desktop-amd64.iso /mnt/iso
mkdir customiso
rsync -a --exclude=casper/filesystem.squashfs /mnt/iso/ customiso/
sudo unsquashfs /mnt/iso/casper/filesystem.squashfs
sudo umount /mnt/iso
# chrooting
sudo mount --bind /dev squashfs-root/dev/
sudo chroot squashfs-root/
PS1="(chroot) $PS1"
LC_ALL=C
HOME=/root
export PS1 HOME LC_ALL
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devpts none /dev/pts
# updating
mv /etc/resolv.conf /etc/resolv.conf.bak
echo 'nameserver 1.1.1.1' | tee /etc/resolv.conf
### change apt mirror list
apt update
apt upgrade
apt dist-upgrade
apt autoremove
apt -f install
# installing driver
apt install git dkms
echo -e "\n# macbook12-spi-drivers\napplespi\nappletb\nspi_pxa2xx_platform\nintel_lpss_pci" >> /etc/initramfs-tools/modules
git clone https://github.com/roadrunner2/macbook12-spi-driver.git /usr/src/applespi-0.1
dkms install -m applespi -v 0.1
cat > /etc/udev/hwdb.d/61-evdev-local.hwdb << 'EOF'
# MacBook8,1 (2015), MacBook9,1 (2016), MacBook10,1 (2017)
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBook8,1:*
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBook9,1:*
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBook10,1:*
EVDEV_ABS_00=::95
EVDEV_ABS_01=::90
EVDEV_ABS_35=::95
EVDEV_ABS_36=::90
# MacBookPro13,* (Late 2016), MacBookPro14,* (Mid 2017)
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro13,1:*
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro13,2:*
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro14,1:*
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro14,2:*
EVDEV_ABS_00=::96
EVDEV_ABS_01=::94
EVDEV_ABS_35=::96
EVDEV_ABS_36=::94
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro13,3:*
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro14,3:*
EVDEV_ABS_00=::96
EVDEV_ABS_01=::95
EVDEV_ABS_35=::96
EVDEV_ABS_36=::95
EOF
cat > /etc/udev/hwdb.d/61-libinput-local.hwdb << 'EOF'
libinput:name:*Apple SPI Touchpad*:dmi:*
LIBINPUT_MODEL_APPLE_TOUCHPAD=1
LIBINPUT_ATTR_KEYBOARD_INTEGRATION=internal
LIBINPUT_ATTR_TOUCH_SIZE_RANGE=200:150
LIBINPUT_ATTR_PALM_SIZE_THRESHOLD=1200
EOF
### edit wifi driver(https://bugzilla.kernel.org/show_bug.cgi?id=193121#c52)
# exiting chroot
mv /etc/resolv.conf.bak /etc/resolv.conf
umount /dev/pts
umount /sys
umount /proc
exit
sudo umount squashfs-root/dev/
sudo rm customiso/casper/filesystem.squashfs
sudo mksquashfs squashfs-root customiso/casper/filesystem.squashfs
cd customiso
sudo rm md5sum.txt
sudo find -type f -print0 | xargs -0 sudo md5sum | grep -Ev "./md5sum.txt|./isolinux/" | sudo tee md5sum.txt
cd ..
sudo xorriso -as mkisofs -r -V "ubuntu-for-mac" -R -l -o ubuntu-for-mac.iso -c isolinux/boot.cat -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat customiso/
[0]: https://nixaid.com/linux-on-macbookpro/[1]: https://github.com/roadrunner2/macbook12-spi-driver
[2]: https://bugzilla.kernel.org/show_bug.cgi?id=193121
[3]: https://gist.github.com/roadrunner2/1289542a748d9a104e7baec6...
But FWIW: on Linux key bindings are always completely customizable.
I'll have a dig for customising them