by Dunedan · 6y ago · 0 comments
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.
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.
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.
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....
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...
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.
> 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].
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?
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.)
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.
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.
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.
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.
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.
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
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.
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:
That's what I would do.
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.
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).
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/
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.
I assumed it was because this machine didnt fall into the “newer Macs that have issues with Linux” bucket