POSTS
New laptop! An M2 MacBook Air
- 4 minute readI've been in the market for a new laptop for a long, long time. I bought my last laptop in 2011 and have run Linux on it, but I've been very disappointed with the hardware (a ThinkPad X220T). I had dreams of using the Wacom tablet built into the screen to make artwork, but it just didn't work out, and it wasn't cheap either. It was time for a change. Maybe every other laptop can be for Linux. Sorry, Linux, it's not you, it was the hardware.
Ideally I want a setup at home similar to what I have at work: a MacBook Pro with a large monitor and an external keyboard. Ergonomics are important to me and at least for the Java I hack on at work, being able to see more code at once helps a lot. However, at home I'm quite space constrained so the only thing from above that I got was an external keyboard. Instead of an external monitor I bought a Curve Flex stand to get the screen much closer to eye level.
As for the laptop itself I went for an M2 Macbook Air. I was especially focused on increading the display resolution from 1366 by 768 pixels on my old ThinkPad. I did consider a Linux-based Dell XPS but the resolution was too low. The base prices are below but I did double the RAM to 16 GB.
Name display resolution diagln weight price
old Thinkpad 1366 by 768 pixels
MacBook Air M1 2560 by 1600 pixels 13.3" 2.8 lbs $ 999
MacBook Air M2 2560 by 1664 pixels 13.6" 2.7 lbs $1199
MB Pro 14" M2 3024 by 1964 pixels 14.2" 3.5 lbs $1999
MB Pro 16" M2 3456 by 2234 pixels 16.2" 4.8 lbs $2499
Dell XPS 13 1920 by 1200 pixels 13.4" 2.6 lbs $ 989
This is my first experience with an ARM processor in a computer and it's… interesting. The first Apple silicon chip in a laptop was the M1, of course. A colleague at work has one and he hasn't had much trouble that I know of.
Most apps are installing just fine on the M2. Firefox, Element, VS Code, and Inkscape don't seem to have any trouble. (Inkscape does have a warning about Ventura, macOS 13.0, not being supported, but I haven't hit any problems yet.) I did open a bug for Quiet not working on the M2 without Rosetta.
Containers are keeping me busy. On my Mac at work I've been using Docker for years but I thought I'd give Podman a try. Between Podman, the M2, and my grasp of only basic Docker commands, I've been struggling a bit. The fact that I'm trying zsh instead of bash is also slowing me down here and there. I did alias docker to podman, as instructed.
docker run hello
works just fine and shows me some cute seals:
!... Hello Podman World ...!
.--"--.
/ - - \
/ (O) (O) \
~~~| -=(,Y,)=- |
.---. /` \ |~~
~/ o o \~~~~.----. ~~
| =(X)= |~ / (O (O) \
~~~~~~~ ~| =(Y_)=- |
~~~~ ~~~| U |~~
Great! Then I moved on to docker-aio (all in one) from Dataverse and had problems that I'll probably worry about on work time.
A much smaller Docker is example is from my notice project where I use a Tidyverse image from Rocket rather than installing all that R stuff on my laptop. Here's the warning/error was getting:
% docker create --name extract pdurbin/notice
WARNING: image platform ({amd64 linux [] }) does not match the expected platform ({arm64 linux [] })
After much poking around I made a commit that seems to help. It amounts to adding --platform linux/x86_64
here and there, which I picked up from a Rocker issue. I did smile at a comment in another issue:
Isn't Docker supposed to prevent just this kind of problem?
Yes, you'd think so.
Now that I'm writing up this blog post and hacking some more I'm realizing that I may not need that --platform
flag after all. The last step of copying out the image was failing this this:
% docker cp extract:/results/figure.png /tmp
Error: 2 errors occurred:
* copying to host: copier: put: error resolving "/tmp": open /tmp: too many levels of symbolic links
* copying from container: io: read/write on closed pipe
The fix was pretty simple. In the docker cp
I changed /tmp
to /tmp/out
(it could be any subdirectory of course). I'm guessing this is necessary because I switched to Podman. Like I said, lots of change. New chip architecture, new container software, new macOS version. I'm not surprised I'm hitting some bumps.