Hacker News new | ask | show | jobs
by wheats 1271 days ago
Someone correct me if I am missing some nuance here but I think the two MacBook options aren't contenders for best laptop running Linux. The drivers simply don't support basic things like the touchpad or wifi (at least not without extensive reworking and a modified kernel). Perhaps in some years Asahi Linux will be functional as a daily driver on the newer ARM/Apple Silicon but it's definitely a hobby laptop right now, and not close to being "best laptop for Linux".
4 comments

Linus himself uses Asahi over an M2 Macbook Air: https://arstechnica.com/gadgets/2022/08/linus-torvalds-uses-...
I mean to be fair he is the Linux power user.
You'd think so, but from his own account he's not. Pre Asahi he used Fedora because it was easy to get working and he found Debian too hard to install. Could just be dry Finnish humour.
For me personally it's much easier to install and maintain Arch based distros than Debian based ones. It is very simple and doesn't try to do everything in your place. ¯\_(ツ)_/¯

Ubuntu/Debian/Fedora and others are great if they work out of the box. As soon as some proprietary GPU or other driver gets involved it can get painful. I recently installed Fedora on latest Thinkpad with dedicated Nvidia GPU and could not get it to work properly on Fedora. Driver crashed and did not load during startup. After trying a bit I switched to Arch and while the initial setup took longer, everything works and I can actually update it without requiring to add some shady 3rd party repos or compiling essential packages after each update manually myself.

It's probably in his interest to run on the least stable environment possible to better identify kinks for prioritization.
He actually believes the opposite. He wants to work from a reliable system so he can focus on the important work, not fiddling with drivers for touchpads or dealing with bugs that are secondary.
I believe he also runs it in console mode and doesn't use graphics, X.org, Wayland, etc. So, keep that in mind.
I've never read that about Torvolds, who I believe uses fairly standard GNOME. Could you be confusing him with Stallman who does things like use wget for browsing the internet?
Linus' announcement is here:

https://lore.kernel.org/lkml/CAHk-=wgrz5BBk=rCz7W28Fj_o02s0X...

And more context (I am not sure if it's accurate):

https://twitter.com/asahilinux/status/1553968394734813184

Driver support for bare metal use on the M2 Air was really, really poor at the time. Linus mentions Asahi Linux, so he probably wasn't running virtualized Linux under macOS. Maybe he SSHed into the box, or it wasn't an M2 model after all.

They may be referring to how he uses that specific laptop.

> uses fairly standard GNOME.

Last I heard he is(was?) a Fedora user

Literally THE Gnome distro lol...
>Last I heard he is(was?) a Fedora user

Which uses GNOME.

>>Last I heard he is(was?) a Fedora user

>Which uses GNOME.

Fedora's primary distribution may have Gnome, but there are many other desktop environments that are available "out of the box", as I'm sure you know. I've been running Fedora on dozens of systems over the last decade and I've never used Gnome -- because it's annoying and supremely unintuitive.

XFCE FTW.

Sounds like if you want to be a true Linux fanboy that’s the route you should be taking anyway..
You do miss some nuance here. Touchpad and Wifi does work great. I do use Asahi since more than 6 months as daily driver on my MacBook Pro M1 Pro. It works great, and now we even have a quite ok GPU Driver since like a month or so. I even run IntelliJ for Java/Scala dev. The only things not working I am waiting for is webcam and speakers. My bet in 2023 the whole system will just work for everyone and will be the killer laptop for Linux enthusiastics.

Best Linux laptop I ever had, using ThinkPads and Dell for many many years (14 years in total now)

Did flashing it with Linux have any impact on battery life? The main reason I switched from a Thinkpad T480 (2017) to a M2 Air two months ago was the horrible battery life of the Thinkpad. The M2 has been lasting me almost two days of work, compared to only 3 hours on the Thinkpad. But I miss quite a lot from linux
15 hours idling or something like 8 hours of use. https://social.treehouse.systems/@marcan/109348054803945724
Asahi is surprisingly good already including GPU support and the installer script is excellent. Well worth checking out if you happen to have an M1 mac. I actually thought I would kill a few hours on a day off installing it but everything was up and running in 15 minutes.

But if Linux is a tool for your job I wouldn’t daily drive it yet.

I haven't any major issues running Linux in a VM on an M1. Not my first choice, perhaps, but it's certainly functional.
How do you do this? I'm relatively new to mac, tried UTM and everything was stuck in QEMU modes and had terrible performance.
I've been using vftool with arm64 Ubuntu server cloudimg. Directly uses the virtualization framework, easy to work with once you get it going.

https://github.com/evansm7/vftool

my command: vftool -k vmlinuz -i initrd -d disk.img -p 4 -m 2048 -a "console=hvc0 irqaffinity=0 root=/dev/vda"

Run ARM Linux in virtualization mode. Don't emulate intel linux.
You could just use the beta of vmware fusion for apple silicon. I have only used Parallels for windows but it was such a great experience it would surely be fine for linux. Ubuntu multipass is a little finicky but it works fine as a remote deskop.
UTM is working fine for me, provided I'm using an arm distro. Chip emulation is a hard no.
I would like to know as well. UTM isn't great at the moment
Parallels. I use an Ubuntu VM via Parallels on a Mac Studio M1 Max and the performance feels native.
Parallels on M1 runs Win11 arm64 and Ubuntu arm64, those are as default installed templates, included inside VM installed AddOns. They are fast, because they do not emulate full CPU like amd64. Win11 arm64 can run amd64 software, it's CPU emulation stuff included in Win11 itself. So Win11 arm64 and run amd64 versions of MS Office, AmigaForever, etc amd64 software.
parallels cost money? or am i wrong about that?

There's no qemu equivalent on mac I don't think.

Yes, Parallels costs money, and if you run Win11 arm64, buying license for that also costs money.

UTM is Qemu.

Qemu can be compiled for macOS and Linux. I just today figured out how to compile Qemu on arm64 (actually using OrangePi that has 16 GB RAM and is arm64, similar like Linux on M1) so that it can run ReactOS. OrangePi has 8 cores (shown with "nproc"), so I used "make -j8" to make compiling use all cores, compiling faster:

Networking examples for various OS: https://wiki.qemu.org/Documentation/Networking

Slirp required to be included when compiling, to have user networking: https://bugs.launchpad.net/qemu/+bug/1917161

sudo apt -y install git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev ninja-build git-email libaio-dev libbluetooth-dev libcapstone-dev libbrlapi-dev libbz2-dev libcap-ng-dev libcurl4-gnutls-dev libgtk-3-dev libibverbs-dev libjpeg8-dev libncurses5-dev libnuma-dev librbd-dev librdmacm-dev libsasl2-dev libsdl2-dev libseccomp-dev libsnappy-dev libssh-dev libvde-dev libvdeplug-dev libvte-2.91-dev libxen-dev liblzo2-dev valgrind xfslibs-dev libnfs-dev libiscsi-dev meson

git clone https://gitlab.com/qemu-project/qemu.git

cd qemu

git submodule init

git submodule update

git clone https://gitlab.freedesktop.org/slirp/libslirp

cd libslirp

meson build

ninja -C build install

cd ..

mkdir build

cd build

../configure --enable-slirp

make -j8

sudo make install

sudo apt install qemu-utils

wget reactos-32bit-bootcd-nightly.7z

7z x reactos-32bit-bootcd-nightly.7z

mv reactos*.iso ReactOS.iso

qemu-img create -f qcow2 ReactOS.qcow2 20G

qemu-system-i386 -m 3G -drive if=ide,index=0,media=disk,file=ReactOS.qcow2 -drive if=ide,index=2,media=cdrom,file=ReactOS.iso -boot order=d -serial stdio -netdev user,id=n0 -device rtl8139,netdev=n0

Native?

Are you comparing emulated x86 to native Windows ARM via dual-boot?

Windows arm64 can not boot natively on M1/M2. There is no drivers for Windows to do that. It's just about running Win11 arm64 in Parallels in macOS.

Asahi Linux has modified kernel where is M1/M2 drivers, and remaining of Asahi is from Arch Linux. Asahi is installed like new version of macOS, notification about it goes to Apple, Apple just does not know it's actually Asahi Linux install. M1/M2 hardware has possibility for Linux by design, Apple most likely had some minimal Linux running on it for test purposes. There are also other FOSS distros for M1/M2, they use partially same packages and ways to make installing dual boot OS possible.

It's also possible to install macOS and Asahi Linux to external SSD drive and boot from there. But part of boot is still at internal drive, so it's not like boot at any computer yet.

Currently I'm booting M1 Air 16 GB RAM version from external 2 TB Samsung T7 Shield SSD, because it has more space for Mac software.

https://www.uubyte.com/blog/how-to-install-macos-ventura-on-...

Internal 256 GB disk has dual boot macOS and Asahi Linux.