Linux Desktop on Apple Silicon/M1 in Practice
gist.github.com
gist.github.com
My own practical practice is to use both a very fine System76 Linux laptop and also a super fast, if constrained, M1 MacBook Pro. Depends on what I am doing, or sometimes just what I feel like using.
To be perfectly open though, I had considered switching to just using Linux until the M1 was released. The thing that held me back was spending $3500 on a commercial Common Lisp implementation 11 months ago. Going all in on Linux would have cost me more money.
SBCL and Emacs are great, use them often, also.
>Okay, so Apple just went and released M1 support files as binaries in their latest XNU source code dump.
There is no specific license applied to these binary files, therefore the top-level APSL license applies.
AFAIK ANGLE (and MoltenGL) only provide GLES2.x and GLES3.x over Metal, so out of the box those wouldn't be very useful for providing desktop-GL compatibility.
Apparently Zink on top of MoltenVk on top of Metal works, but that looks like a Jenga tower of emulation layers.
Ideally, Apple would rewrite their OpenGL framework on top of Metal (if it hasn't happened yet), and keep that working at least into the 2030s.
I thought Wayland implementations considered one of those a base requirement.
My recommendation is to use Wayland, and to play serious games on macOS (although such games are not available on Linux AArch64 anyway...)
However, as feature_list in src/vrend_renderer.c shows, some features are unavailable and cannot be emulated. It is good enough but not perfect (and I think it is reasonable.)
The other patches are not submitted yet because they require a little change for Epoxy, which is not merged yet, or I'm being lazy. Maybe I should open a MR as a RFC.
No worries, the storage is fast enough to stand-in for RAM via swap! You always wanted your RAM to be a wear item, right?
I tally about 500-1000 MB doing my job – if I can close the browsers that I do admittedly need to read documentation.
The problem is containers. Some development workflows appear to require running a container for every piece of software needed, and that adds up (and feels incredibly wasteful).
None of my development workflow requires containers locally, so I get by just fine with 16gb.
This would all be needless if there was an OS that allowed you to switch to another "env" wiping the RAM in the process (like, storing a snapshot of it for when you switch back), with guaranteed isolation at the filesystem level (perhaps able to still read-only link into common libs), able to install things without touching other "envs". If you're working in any webdev related environment, that is itself the definition of insanity.
It's like buying a hammer from the carpenter at the end of the road and giving access to all your house to him in the process, including your wife. Everything becomes a nail.
Their role is precisely to orchestrate the cooperation and interdepndency of those millions of lines of code. I don't understand why people have started turning those distros into glorified delivery vehicles for containers.
From the tabs Gmail was pointing to +1GB - a browser email client consuming +1/3 of the memory a VM running an OS plus a database.
I sometimes have another VM, another 2 ssh conns, more tabs open including youtube and never noticed any slow/sluggish behaviour.
I also feel like running VMs is wasteful, but it seems we are not able to create OSes with proper native tools for isolation.
Even this makes little sense unless your containers are really poorly sized. I used to run a mini Kubernetes cluster on my desktop with 6 nodes. Some of them running big Java projects, Postgres, Elastisearch, and Ruby. And I still had enough memory to run Rubymine or IntelliJ along with Slack and whatever other local stuff I needed.
my ~/.config/chromium-flags.conf file:
--ignore-gpu-blocklist
--enable-gpu-rasterization
#--enable-zero-copy
--disable-sync-preferences
--disable-reading-from-canvas
--disable-smooth-scrolling
--wm-window-animations-disabled
--enable-low-end-device-modeThere are projects that you cannot link if you have under 32 GB; but that is not enough to say that desktop environment you use while compiling is unusable under 32 GB.
The post I was replying to said something very different and much weirder.
The M1 is Apple’s low-end chip, currently available only on their cheapest computers. It’s like complaining that a Corolla can’t keep up with a Ferrari on a race track. The most charitable interpretation is that the person doesn’t understand the market position of the two items.
Even still, my experience of desktop Linux under memory pressure has been frustrating, even with fast SSDs, and overspeccing the memory is an inexpensive guarantee that my system will never start thrashing during an important screenshare demo or something, so it's an obvious choice if I'm shopping for a new computer.
When I built this computer last year the cost difference between 16 and 32GB was like $40...easy to justify a 2-3% premium on the overall cost of the machine to never have to give a second thought to conserving memory. That said, Apple charges $400 for the same upgrade (in their machines that support 32GB), so the calculus there is a bit different.
Honestly, I could probably do with 16GB right now, but I'm planning on keeping this machine for at least 5 years; it was worth the few hundred bucks extra to future-proof it.
I personally close my browser at night and load it in the morning.
Or a web browser with a lot of tabs.
The person isn't the one that's failing to understand the market position of the two items, Apple is the one that failed to brand it appropriately. It should have been a Macbook Air & Macbook, not a Macbook Pro.
Although realistically at this point "Pro" has lost nearly all meaning in Apple's lineup. It's like an R badge on a car. Used to mean something specific, now just means a generically higher premium option.
They still do. The Intel, 4-port, 13” MacBook Pro is still available, and can be configured with 32GB of RAM. I don’t think it would be a sensible purchase at this point though.
That 2-port Pro has no reason to exist IMO. Even on Intel it used a chip with a TDP closer to the Air than the 4-port models; now on ARM they’re using the exact same part. Yeah it has a fan but most workloads will never turn the thing on.
Massive projects. Or a couple VM's.
The first laptop I saw running a VM was a Dell Precision M50 (?), it was 2" thick and almost 10lbs. It had something ridiculous (at the the time) like 1 or 1.5GB of RAM.
A sales guy was demoing a product to us, and it spun up a Windows 2000 VM for IIS and another for SQL server, it probably took 10 minutes to get started but he could then demo the app through the browser. Sounds silly but it worked.
"But can't you just run it on a server somewhere"
Yes. That'd be cheaper and faster. But at this high end of the market, it might make more sense for some people.
https://docs.filecoin.io/get-started/lotus/installation/#min...
So, realistically, at this point I need a 32 GB machine to effectively do my job. Minority? Sure. But I think there are enough people in my boat that it's a legitimate market to have an option for.
edit: I love how I got downvoted because my work can't fit into a toy Mac M1
8GB is plenty for normal work, my current 16GB is plenty for development work including a 4GB Windows 10 VM running on top of Linux.
And we used to run Vmware with Windows (on Linux) or Linux (on Windows) in 2005 just fine, on laptops with a couple GB at best...
Dozens of devs I know in a company I work with have 8GB Macs (and 2-3 years old at that), and run Vagrant and Docker with no issue. And those are mostly Airs with shared GPU too...
I think people with 32GB laptops hugely overestimate how many other devs also are on 32GB...
Could this be because they don't understand how much faster it can be -- the slowness is an accepted cost of doing work?
I've recently run virtualbox/vagrant/docker on an air from ~3 years ago, and it's painfully slow compared to my 3-yo system with 32GB RAM. It works perfectly fine, but it's slow.
> I think people with 32GB laptops
That may be true. It may also be true that people with 8GB laptops vastly underestimate the benefit of having more memory available for development workloads.
Maybe some companies should give their employees two systems. Your average way too expensive bragging rights laptop, and a smaller older one which is the only one you're allowed to do your code review/productive commits on.
And if you still work on your laptop but have your personal server box as a CPU slave, that still leaves some issues. You might be able to do your build steps on the machine, but your IDE still runs on your laptop, so that needs to be beefy enough -- never mind auxiliary applications like browsers, Photoshop, CAD etc. Also, it's quite hard to get a slow laptop with decent ergonomics, unless you buy used (not that much an option for companies).
Also, once you go headless server, it's better to just put it online anyway, as you don't need 24/7 access
https://www.tomsguide.com/news/macbook-pro-m1x-benchmarks-ju...
It should be adequate for a non-entry level laptop.
One of the fairly accurate Apple leakers, Jon Prosser, has said that one of his proven sources has informed him that the leak is legit.
That dovetails with my own experiences. I installed tomb raider on my m1 air, and while it was playable i was not impressed with its graphical abilities. The m1 is great for integrated graphics, but not on par with dedicated graphics. CPU-wise it is the fastest computer I have though, noticeably faster than the i5 9600K in my desktop.
>The first Apple-built GPU for a Mac is significantly faster than any integrated GPU we’ve been able to get our hands on, and will no doubt set a new high bar for GPU performance in a laptop. Based on Apple’s own die shots, it’s clear that they spent a sizable portion of the M1’s die on the GPU and associated hardware, and the payoff is a GPU that can rival even low-end discrete GPUs.
https://www.anandtech.com/show/16252/mac-mini-apple-m1-teste...
For me, it is completely fine. I just develop some softwares with little graphics load, and use Web applications and watch some videos.
You have no luck here if you are going to play modern games, but modern proprietary game engines do not support AArch64 Linux anyway. It would be difficult time for Linux desktop if other PC vendors migrate to AArch64.
Note that I haven't really optimized it yet. Certainly there should be low-hanging fruits, but I don't dare to get them as it is good enough for me as GNOME is no longer laggy and I know some overheads cannot be eliminated.
If I have to do graphics-intensive workload, I would simply run it on macOS or buy another accelerator as M1 is not the best performant graphics accelerator in the market anyway.
He gets 700fps and close to OpenGL benchmarks he runs...
The main issue with XQuartz nowadays is that it doesn't support Retina displays in windowed mode. Everything runs pixel-doubled by default.
There are only two options: hack Virgil 3D or hack XQuartz. You cannot "just" run XQuartz and solve problems. And I choose hacking Virgil 3D because it should have less communication overhead and work with Wayland.
/edit: oh, and yeah, if you patch xrandr not to return, I suspect that the resolution change will persist on switching between macOS and the unix desktop, though I haven't tested that yet.
"I think ARM is a very promising platform," he said. "At the same time, the ARM community has never had the notion of a standard platform. ARM never had the PC."
https://www.networkworld.com/article/2220438/linus-torvalds-...
UEFI + ACPI is required on Arm if you want to boot Windows or RHEL/CentOS, which do not even try to boot on non-standardised 64-bit Arm systems.
A Jobs-less alternate Apple universe might've been interesting though. He both canned the licensed Apple clones and made OpenStep into the next major MacOS revision. If Copland would've been OS 8 or BeOS as OS X, there could be viable clones, and thus maybe enough critical mass to keep PowerPC alive a bit longer.