15 ms·
Linux Desktop on Apple Silicon/M1 in Practice
- rubatuga 6y agoThis is amazing, and I'm not sure if I will end up using the M1 port of Linux if QEMU is good enough.
- cozzyd 6y agoI imagine memory will be quite constrained here for a lot of M1 systems.
- pengaru 6y ago> I imagine memory will be quite constrained here for a lot of M1 systems. 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?
- aodaki 6y agoIndeed, it is. 16GB is too constrained even for native Linux desktop environment.
- rubyist5eva 6y agothis is just nonsense
- turbinerneiter 6y agoRunning Fedora/GNOME on an i5/8gb laptop, never ever felt memory constrained.
- cozzyd 6y agoMy 5-year-old laptop is an i5/8GB with Fedora/GNOME (my primary machine is a desktop) and that is usually ok, but there are certainly things I can't do (like use Google Earth while having slack or a web browser open).
- stjohnswarts 6y agoYou won't but I think some HN people have to push around a lot data and the fastest way to do that is to get as much of it in memory as possible. Others love their electron apps and docker suites and VMs.
- vetinari 6y agoLinux desktop environment runs fine with 4GB.
- ekianjo 6y agoGood luck compiling large sources on 4gb
- vetinari 6y agoSince when compiling large sources is a desktop environment? There 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.
- deleted 6y ago[deleted]
- anthk 6y ago2GB of RAM user here, done that with clang as it uses far less memory than GCC.
- stjohnswarts 6y agoI mean really how many people are recompiling their entire code base every single day? Is their make/build environment so bad that they can't trust incremental compiles? I'm getting along just fine on my 8GB laptop. I know some people work with big datasets and video and such but holy cow. Most of us are probably just writing code for a browser/backend/library/test and not pushing around terabytes of data.
- anthk 6y agoMaybe these people never heard of ccache.
- NullPrefix 6y agoCan confirm, my VMs default to 4GB of memory and run just fine.
- theodric 6y agoI suppose it's what you do with it. I use about 6GB of an 8GB system, with the rest allocated to buffer cache. Firefox, VS Code, terminals, mapping software...I can't use 16GB unless I spin up a VM.
- Toutouxc 6y agoWhat the hell, enough with this! My main dev machine until a few months ago was a Dell laptop with 8 GB of RAM on Ubuntu. I ran RubyMine on it all day, some Sublime, Spotify, Slack, MariaDB, Thunderbird, LibreOffice, and I had no problems whatsoever. The only reason it ever ran out of RAM was a memory leak in Firefox.
- _gqhf 6y agoThat's good for you and I'm glad you're happy but for some of us, considering the work with are doing, sometimes even 32GB is not really enough. Different people, different needs.
- tapia 6y agoToo many electron apps? :P
- stjohnswarts 6y agoBoy isn't that the truth. I actively avoid them but sometimes you just can't like with signal-desktop. I actually have to keep it running because I don't want to reach for my phone every 10 minutes. Something as simple as that interface doesn't need electron but oh well. Maybe a lite version with just text and contacts would be acceptable. I don't need stickers, gifs and emojis.
- Toutouxc 6y agoThat's fine, but people like these are mostly outliers in the dev community, they exist on Linux, Windows and even macOS and they definitely KNOW perfectly well what their requirements are and why. The post I was replying to said something very different and much weirder.
- skohan 6y agoWhat do you need 32GB for? Video editing? ML training on CPU? I have to imagine this is a minority.
- coldtea 6y agoIs it? Up until now most devs still go with 16 or even 8 GB laptops. 32GB laptops are far between (Macs or not), and much fewer people use desktops... 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...
- TheRealDunkirk 6y agoI have a 2019 MBP with 32GB of RAM. I bought it thinking that I would be running a Windows VM under Parallels, on which I would then let my company install the execrable Microsoft "mobile iron" access control. (You know, the one where they can wipe the machine remotely.) But then they changed so that even machines with this enabled cannot access the company resources on Azure. It must be one of their own machines. (So what's the freaking point?) Anyway, if it would have worked out, that's definitely a use case for more than 16.
- GrinningFool 6y ago> no issue. 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.
- aodaki 6y agoI mean, Android Studio eats memory too much.
- chupasaurus 6y agoI run KDE with other JetBrain's IDEs and a 2 GB VM in the backround every day and the maximum memory usage was 14 GB.
- mhd 6y agoFor a regular user, probably not. Contemporary dev work with spurious containerization on the other hand… 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.
- dec0dedab0de 6y agoHow about an undersized laptop for testing and coding. But a personal server for under their desk with k8s already installed.
- mhd 6y agoPeople, for some kind of reason, really like their laptops. They also have more brand recognition, thus the "bragging right" part, when you get your new X1/Macbook every 2 years. 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
- gspr 6y agoAre you joking?! That depends entirely on what you're doing! I could do my day to day work on 16 GB just fine. I could probably live fine with 8 GB if I actively closed web pages that I didn't actually need to keep open.
- londons_explore 6y agozswap helps a lot. One can get ~30% compression rates with a not-too-big performance impact.
- GeekyBear 6y agoThe M1x benchmarks that recently leaked show that it supports 32 Gigs of RAM, has twice the number of big CPU cores, and twice the GPU cores. https://www.tomsguide.com/news/macbook-pro-m1x-benchmarks-just-leaked-and-intel-should-be-scared 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.
- skohan 6y agoHow does the current M1's graphics performance compare to, say, a mid-range NVIDIA laptop GPU?
- Joeri 6y agoIt is 30% to 50% slower than a 1050ti according to https://ikarios.wordpress.com/2021/01/09/comparing-a-macbook-air-2020-m1-with-my-nvidia-1050-ti-gaming-pc/ https://ikarios.wordpress.com/2021/01/09/comparing-a-macbook... 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.
- skohan 6y agoThanks - so it sounds like a 100% speedup would put it into "decent" territory
- mekpro 6y agoA bit slower than GTX 1050 mobile
- GeekyBear 6y agoThe Apples to Apples comparison (if you will) is to other integrated GPUs. >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-tested/3 https://www.anandtech.com/show/16252/mac-mini-apple-m1-teste...
- erwincoumans 6y agoUbuntu Desktop (arm64) works pretty well under Parallels in MacOS on M1 (hypervisor).
- seisvelas 6y agoi agree but 'pretty' is the operative word. Sometimes the network gets suuuper slow inside the vm for me and i still have no idea why.
- erwincoumans 6y agoIt could be related to how many cpu's you allocate for the vm. I use 1 single cpu, and networking is extremely fast, very low ping times. (mainly usr the headless server version, no x11)
- jbverschoor 6y agoCan’t you just run X11 on the Mac and Linux in a vm?
- CyberRabbi 6y agoYou could but then you would still be in the MacOS desktop environment. I think he doesn’t just want to run Linux applications but instead wants the Linux desktop environment.
- csande17 6y agoDesktop environments on Linux basically just draw into a full-screen X window, don't they? (And then the programs you run are children of that root window.) I wonder how hard it would be to hack up XQuartz to support that...
- duskwuff 6y agoYou wouldn't even have to hack it up. There's an option in XQuartz to make it run full-screen, at which point you can run a standard X11 DE. The main issue with XQuartz nowadays is that it doesn't support Retina displays in windowed mode. Everything runs pixel-doubled by default.
- aodaki 6y agoI haven't tried XQuartz at all because I didn't think that kind of software has plenty of resource and is well maintained. Retina support is just one problem caused by lack of maintenance. 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.
- deleted 6y ago[deleted]
- ithkuil 6y agoXquartz doesn't have hidpi support (or if it has, please tell me how to enable it!)
- perryizgr8 6y agoWhy is this such a big issue? Can't you install any ARM Linux distro from a flash drive? Does that not work? I get that device drivers may not be perfect for any new laptop, but it should mostly work.
- x3sphere 6y agoThere’s a lot of proprietary hardware inside the MacBook M1s. The only reason device drivers exist is thanks to reverse engineering efforts. For this reason, no you can’t just install any vanilla ARM distro and expect things to work.
- apichat 6y agoLinus Torvalds: ARM has a lot to learn from the PC : "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--arm-has-a-lot-to-learn-from-the-pc.html https://www.networkworld.com/article/2220438/linus-torvalds-...
- uncledave 6y agoWe did actually but Acorn canned it https://en.wikipedia.org/wiki/Phoebe_(computer) https://en.wikipedia.org/wiki/Phoebe_(computer)
- guerrilla 6y agoThat's not what he means by PC. He means an open standard that anyone can build against with comparability between products.
- uncledave 6y agoThat’s exactly what it was. Two other vendors were going to launch as well.
- guywhocodes 6y ago
- cromwellian 6y agoAwesome achievement, but like most OpenGL bridge techniques, 15fps with artifacts is not usable.
- CyberRabbi 6y agoThe demos run from the terminal seem to run at a much higher frame rate. Firefox webgl demo slowdown may be due to other factors.
- aodaki 6y agoRight. Frame rate heavily depends on workload. 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.
- CyberRabbi 6y agoIt’s still a really large discrepancy. I would guess something is broken somewhere. What is the webgl frame rate on native Mac? Have you tried running those webgl demos with chromium?
- aodaki 6y agoYou can see native Mac demo at: https://www.youtube.com/watch?v=ezvQPREjN1s https://www.youtube.com/watch?v=ezvQPREjN1s 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.
- coldtea 6y ago15fps on the browser? Just fine. Who cares for WebGL performance on the browser for dev work unless he's in that racket? He gets 700fps and close to OpenGL benchmarks he runs...
- ianlevesque 6y agoSome of these have been pain points on QEMU (such as Android emulation) for a really long time. The coreaudio fixes and sparse block storage alone are fantastic.
- imwillofficial 6y agoI loving see people beat problems into submission.
- blinkingled 6y agoWhat's the story with OpenGL on macOS? I know it is abandonware in favor of Metal but are there reasons Apple will at least keep it in the OS / drivers for foreseeable future? Do any of the ANGLE type things help when they finally take it away?
- flohofwoe 6y agoIt still works and at least somebody still seems to work on it going by the somewhat random GL-related fixes and regressions in macOS Betas since GL was declared deprecated. 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.
- phkahler 6y ago>> 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. I thought Wayland implementations considered one of those a base requirement.
- my123 6y agoIn fact, OpenGL on Apple M1 is implemented through AppleMetalOpenGLRenderer.
- aodaki 6y agoVirgil 3D renderer provides some desktop GL emulation, so it is still somewhat usable. But a serious application expecting desktop GL would see glitches. My recommendation is to use Wayland, and to play serious games on macOS (although such games are not available on Linux AArch64 anyway...)
- shadeslayer 6y agoVirgl3D should support emulating GL on GLES usecases. If you're seeing issues, please open bug reports on https://gitlab.freedesktop.org/virgl/virglrenderer/-/issues https://gitlab.freedesktop.org/virgl/virglrenderer/-/issues and we can try and look into them :)
- mark_l_watson 6y agoI like the attitude of author of this gist. Just make it work. 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.
- nathell 6y agoOut of curiosity, which commercial CL implementation would that be? LispWorks? Allegro?
- selectodude 6y agoMust be LispWorks. Nothing else is anywhere near as expensive.
- lars-b2018 6y agoI use Common Lisp daily on macOS and Linux, but use SBCL and Emacs with Sly. Never tried out a commercial implementation so I cannot compare to Emacs and SBCL. Are they worth the money vs. the open source tools?
- tachyonbeam 6y agoHow could they be worth it? Vendor lock-in has a huge cost IMO. You're going to have to keep paying for these insanely expensive licenses for years, maybe decades?
- pjmlp 6y agoIf one wants to use Lisp as the Lisp Machines/Interlisp-D allowed for, only the commercial versions offer such experience.
- mark_l_watson 6y ago
- wayneftw 6y agoWould any of this work be useful to run Linux on an iPad?
- aodaki 6y agoMaybe, but it still requires more efforts.
- thoughtsimple 6y agoThe A12x and A12z don’t have hypervisor support. So the hvf accelerator isn’t going to work.
- fulafel 6y agoBasic ARM can run VMs under paravirtualization, ala https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/virtualization-on-arm-with-xen https://community.arm.com/developer/ip-products/processors/b...
- smoldesu 6y agoSigh. I wish Apple would just release these drivers as a sign of goodwill to the rest of the community. I think these machines could make decent development workstations if they had an M.2 port and native Linux support on day 1. It really feels like the least they can do considering their transgressions against the open source community over the past few years...
- dr_zoidberg 6y agoThis is way beyond wishful thinking. Apple will do what it makes most sense in their business strategy. Due to their past transgressions against the open source community, what makes you think that community fits in their business strategy?
- ianlevesque 6y agoI'm not sure what transgressions you're referring to, but releasing some specs would be nice, or updating the open source copy of XNU to a version with M1 in there.
- GeekyBear 6y agoAlready happened. >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. https://twitter.com/marcan42/status/1355907966541565957 https://twitter.com/marcan42/status/1355907966541565957
- ianlevesque 6y agoUgh, binaries. I wonder what the motivation was to keep those closed.
- shadeslayer 6y agoHi! Virgl3D developer here. Could you please open a MR with your patches so we can look into integrating them into master?
- aodaki 6y agoThank you for your work & reply. I already submitted some and a few were merged and one is in review. 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.