I have been using Apple computers close to full time since mid-90’s. Originally because I used Photoshop extensively for processing confocal microscope images and Macs were the standard platform for that. It helped that they were also relatively safe from viruses and generally stable. I switched to more computational work in the early 2000’s, and Apple was right there with Mac OS X, which still is a great interface to a Unix-like system. I have owned an Apple laptop continuously since around 2000.
For me, the extra I had to pay for these laptops has been a good value for money. For one, the Apple premium was not that high given the specs. In addition, the quality of build, reliability, and excellent customer service were worth paying extra for. I also like the Apple design approach. My job involves writing open-source software for scientific applications. It has to be easily transferable to servers that usually run some version of Linux. Most of my colleagues, who are the target audience for my development, use Macs or Linux. The Unix flavor provided by Mac OS allows me write my code for any flavor of Unix, but there have always been pain points. For example, Apple moved to LLVM as the C/C++ compiler (I am a C++ developer), but the version they include is pretty old. It is possible to install GCC and most other things via third-party package managers (like Homebrew), but things do break every once in a while. Apple has always aimed for a tight integration of software and hardware, which is great for its users but not for portability. In short, while it is quite possible to use Macs for open-source development, this is not what Macs are designed for.
I put up with the (relatively minor) annoyances I was experiencing with Mac OS as a developer platform for two reasons: (1) I really liked the hardware and (2) I had software needs that were not directly related to development work but were required for other aspects of my job. On the hardware side, the Apple Retina displays changed my life. I have to stare at text on the screen most of the day, and the sharpness delivered by Retina very noticeably reduced eye fatigue for me. The other specs I care about (processor speed and RAM) have been good enough, and I do not use many external devices so was never upset about Apple’s port shenanigans. On the software side, my colleagues (and, now that I am out on my own, my clients) use Microsoft products extensively. I have to be able to look at and edit these files. I occasionally need to make vector-graphic illustrations. I used to use the Illustrator from Adobe, but switched to Graphic, which is a lot cheaper and does everything I need (I am not really a power user). I use desktop replacement laptops because I work from different locations. I can do 95% of my computational work on a high-end laptop, and off-load to a server or AWS if a need for some really serious data processing arises.
Over the past few years, many other manufacturers have started to catch up to Apple laptops in design and specs. Apple, on the other hand, seems focused on thinness and lightness. For my use case this is close to irrelevant. The price I have to pay now for a high-end MBP is becoming hard to justify. I am also thinking of adding GPU computation to some of the code I write. Apple’s GPU offerings are really not up to scratch for these purposes. The software that was holding me back from switching to Linux is available on the iPad. I have the 11" iPad Pro, a great device for editing Word documents, PDFs, or making illustrations. I also use it for most of my e-mail and reading. Although I been using BBEdit for years as the scripting editor, I have switched to Vim a couple of years ago. Vim blows BBEdit out of the water for my needs. So when it came time to upgrade my 2015 15" MBP (still one of the best machines ever made), I decided to try out the System76 Oryx Pro. Some of my colleagues tried other System76 laptops and seemed generally happy with them. I ordered the 15" version with the HiDPI display, 32G of RAM and 250G NVME drive. I added my own 1TB SSD to the extra slot. I did not need to get an extra cable, everything was ready to just plug the drive in and it worked.
Overall, having used this laptop full time since the end of November, I am very happy with it. There are small manufacturing glitches here and there, something I notice because I am spoiled by Apple’s obsessive perfectionism in industrial design, but no deal-breakers. The keyboard is amazing, and has fun back-light options. The only minus is that there is no indicator light on the caps lock. It feels very good to type on, better than any laptop keyboard I have personally tried (even the excellent ThinkPad keyboard). The trackpad is OK, Apple is way ahead of everyone on that, but I use a trackball most of the time. I note that the Oryx Pro line-up recently changed and they no longer have a HiDPI screen offering. That is too bad, the display is excellent. Although I am not a big user of various ports, it is nice to have the wide range of them available (even an ethernet port!). Battery life is not great, especially when using the GPU, but that is not a concern for me. It is enough to last through a meeting with a client, otherwise I have it plugged in.
System76 laptops come with a choice of Ubuntu or their own Ubuntu front-end they call Pop! OS. Pop! OS is well-designed, but after distro-hopping for a while I decided to go with Arch. My main reason was to educate myself about how Linux works. Since I have been on Mac OS X since its beginning, I feel fairly confident about fixing anything that goes wrong. I only needed to contact Apple support over a system software issue once. I noticed that most of my queries about Linux ended up at the Arch wiki, so I figured I should just install the thing rather than try and figure out how the answers there apply to Ubuntu. Below is the short version of the instructions to install Arch on the Oryx Pro. The full instructions are here, including details on how to compile R with Intel’s MKL library for fast linear algebra. I like open source software, and release source code of everything I write, but I am not super ideological about it. I am happy to use free offerings from Intel and NVIDIA.
I want to have full-disk encryption, with the exception of the boot partition and I am installing with WiFi. There is a discrete NVIDIA graphics card. I would like to use it for OpenCL/CUDA and for an external monitor.
I used the archlinux-2019.01.01-x86_64.iso
, put it on a USB flash drive using dd
(standard procedure).
Inserted the USB drive, booted while pressing F7
on boot to enter the boot disk picker. Once there, press e
to enter kernel command line options. Add video=1920x1080
to enlarge the console fonts (I have the 4K screen version of the Oryx Pro and the default resolution makes the letters tiny) and module_blacklist=nouveau
to switch off the NVIDIA GPU for now. The commands should be separated by space and entered at the end of the line. Switching off the nouveau
driver is necessary, otherwise any hardware listing (such as lspci
) will hang with fans blazing. The WiFi card has functional firmware, checked by running
|
|
List WiFi networks, pick the relevant and follow prompts to connect:
|
|
Set up time and date.
|
|
I want to use LVM on LUKS to get full-disk encryption, including the SWAP. /boot
will be unencrypted.
Partition the target disk (here, it is /dev/sda
).
To list partitions:
|
|
System76 requires the EFI partition to be in /boot
so that it can do firmware updates. I leave the secondary disk alone. It is already formatted and has data on it. I use gdisk
to set up GPT.
|
|
p
to list current partitions
o
to delete them all and create an empty GPT partition table
n
to create new
p
to check if everything looks sane
w
to write (THE DISK WILL BE ERASED AT THIS POINT)
Format the EFI boot partition (left unencrypted):
|
|
Create the non-boot file systems. The following will require coming up with a passphrase. I followed the instructions in Encrypting an entire system.
Encrypt the future LVM container:
|
|
I have to use luks1
because GRUB does not support luks2
as of this writing. That is not an issue in the ThinkPad set-up, as far as I can tell because I am booting from BIOS there rather than EFI. Prepare the logical volumes:
|
|
Mount the EFI boot partition:
|
|
Install Arch:
|
|
Generate fstab
:
|
|
Edit /mnt/etc/crypttab
to add a line
|
|
The discard
option enables TRIM support. There are security implications, but not serious enough for my use case. Read the linked documentation to decide for yourself. An easy way to transfer the UUID without typing it is to do
|
|
and edit the crypttab
file to make it correct, or use :read
in vim.
There is an issue with GRUB and LVM which causes grub-mkconfig to hang and grub-install to keep probing LVM devices. For the workaround, prepare the following:
|
|
Move into the fresh Arch installation on the main disk. Note that the paths will no longer require /mnt
in front.
|
|
To deal with the GRUB/LVM problem, run
|
|
Edit /etc/mkinitcpio.conf
(this is now on the target drive):
|
|
Use blkid
to list UUIDs of devices. Edit /etc/default/grub
to modify variables. Append “lvm” to GRUB_PRELOAD_MODULES
. Uncomment the GRUB_ENABLE_CRYOTDISK=y
line. Append cryptdevice=UUID=UUID-of-/dev/nvme0n1p2:cryptlvm root=/dev/MainVolGroup/root resume=/dev/MainVolGroup/swap ec_sys.write_support=1 video=1920x1080 module_blacklist=nouveau
to GRUB_CMDLINE_LINUX_DEFAULT
. The resume=...
part is for suspend to disk support. Install GRUB on EFI:
|
|
Make the GRUB config:
|
|
Activate NetworkManager:
|
|
Time zone and locale specification (I am in New York, yours may be different).
|
|
Uncomment all en_US
entries in /etc/locale.gen
.
|
|
Set LANG=en_US.UTF-8
in newly created /etc/locale.conf
.
Network settings:
Create /etc/hostname
and write nerv there (that is the name I gave the laptop; substitute what you like). Edit /etc/hosts
to add
|
|
Exit chroot
, optionally unmount -R /mnt
, and shut down the computer. Remove the USB drive and start the laptop again.
Start by connecting to WiFi
|
|
and enter the WiFi password (if any) at the prompt.
Start by installing the NVIDIA drivers:
|
|
The System76 drivers are available from AUR. Cannot install these using root, so I generate my root password and add a regular user first.
|
|
To enable sudo
for the user, uncomment the %wheel ALL=(ALL) ALL
line in /etc/sudoers
. I like to reboot etc without entering a password, so I also add %wheel ALL=(ALL) NOPASSWD: REBOOT
. I add /sbin/shutdown
to the REBOOT
alias. Reboot the laptop. Login as the regular user and proceed with driver installation. First install kernel headers:
|
|
Now install the kernel modules (mostly following the instructions here):
|
|
I mostly follow the instructions here. I activate the NVIDIA card
|
|
I add the file 10-nvidia-drm-outputclass.conf
to /usr/share/X11/xorg.conf.d
. This file contains
|
|
I also put the following script in /etc/lightdm
to check if the NVIDIA card is on at startup, and add an external monitor if it is connected.
|
|
I keep the screens (I have a 4K external monitor, and the HiDPI screen on the laptop) at the full resolution, but enlarge fonts and follow some suggestions on the Arch HiDPI wiki page. I am really happy with the text rendering with this set-up. Running the screens at 1080p made everything larger, but noticeably fuzzier.
I am running the i3-gaps fork of the i3 tiling window manager, with LightDM. My dotfiles are here. Things that work on this set-up:
Things I have not tested:
I heavily use Vim, with YouCompleteMe for C++ and some of my own keybindings for Sweave code in R and for LaTeX. For the latter two, I like to have a PDF window (using zathura) side-by-side with the code. The zathura PDF viewer auto-updates when the file on disk changes, so I can see the type-set document essentially in real-time. The tiling window manager makes it easy to arrange the windows and the HiDPI screen ensures that all the text readable and crisp.
To cap everything off, here is the obligatory screen shot: