Ask HN: How did you transition from Mac to Linux?
I have been a devoted Mac user for years, however apart from needing a Mac to build and release iOS apps, I am increasingly looking for great laptop hardware with great support for Linux, and recommendations on how to jump from the Mac to Linux (preferably Ubuntu). What pitfalls did you face? What apps and support did you miss?
148 comments
[ 5.2 ms ] story [ 237 ms ] threadAsk yourself whether working from the coffee shop or couch is really critical or even beneficial to your productivity and mental health.
My biggest realization with workstations is that they are more of a location than they are a computer formfactor. Habituating yourself to work in the work... place liberates you to not work everywhere else.
Back in the day, portable computers were luxuries for the important people in a business. Now I see the true luxury is NOT having a portable.
EDIT: Seconding both the Thinkpad recommendation as well as the suggestion to reconsider a workstation.
It does help that it's also the laptop that Linus is using: https://www.cio.com/article/3119876/linux/linus-torvalds-pic...
NixOS config: https://gist.github.com/Ortuna/b6e95d6baefd2a1683ddd848f485b...
[0] https://www.dell.com/community/Linux-Developer-Systems/New-K...
On my work computer I still have Windows which I didn’t boot into for more than a year. It was my safenet during my windows -> linux switch for full time. If stuck with task - 5 minutes and I am back to Windows. Don’t recall actually using that capability, especially after I set up free testing Windows VM on Linux.
Good luck!
So some common tips that you might find useful:
Laptops commonly come with SSDs or even NVMes today. If you have enough RAM, you can avoid enabling swap during installation, that will provide you more useful space on your expensive drive.
Enable periodic fstrim on your drive, to make sure your deleted blocks are reused.
If you are using Samsung NVMe, you might want to use bigger partition offset than just common megabyte alignment. I was recently researching this, and found out, that it can make some performance difference if you use 3 MiB offset instead of 1 MiB. It's a bit of a difficult topic, because Samsung staunchly refuse to answer questions about their NVMe erase block size. In general it's recommended to have partitions aligned to that size for best performance. You can run various testing tools like fio before setting up the system to find the optimal layout.
Prefer AMD for your GPU (Vega is the best today), it will save you a lot pain (i.e. avoid Nvidia and especially Optimus).
Also, as others said in this thread, consider if you need a laptop at all. Desktop would be cheaper for better performance hardware.
This meme should die already. Nvidia has supported Linux better than any other vendor for 10+ years, and still does. For quite a long time, it was the only way to play 3D stuff.
Today you'll be better off with AMD GPU no matter on laptop or desktop. AMD did a good job with upstream kernel integration (amdgpu) and developing Mesa for Vulkan and OpenGL (radv / radeonsi). I myself was Nvidia user for a long time and switched to AMD around a year and a half ago, when Mesa finally caught up features wise, so I know this first hand. Nvidia is clearly a worse choice today.
Thinkpads specially the T series comes with TLP [1] support. So, the battery life is very good. Apart from that, the keyboard is pretty comfortable, display resolutions are Full HD+. I cannot recommend it enough.
[1] https://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-ma...
I do miss the integration with my iphone though. I used the messages and notes app a lot in osx, so it's kinda annoying to not have that anymore.
Also, i'm using a Thinkpad. Would recommend.
*EDIT I now pretty much use the trackpoint 100% of the time, and don't miss the trackpad gestures at all.
It took me exactly 20 full minutes to make its acquaintance and start working again.
That is my transition story.
[EDIT for context: I started using Linux in 1998 with Debian and no out-of-the-box support for my Intel740, so I know a thing or two about Linux and drivers]
Last time I check ubuntu works fine from bootcamp. (But last time I checked was 2011 or something)
I'm running Arch Linux, for what it's worth. My use of several Macs over the last few years was basically confined to a web browser, Mail.app, and Terminal, where I installed a handful of GNU userland tools from Homebrew and essentially used it as if it was a Linux machine. I never bought into the Apple ecosystem with Photos, iCloud, messaging, etc. My pictures and music are organized in directories and I use open-source applications like darktable and GIMP (pictures) and cantata and mpd (music) so I didn't have any lock-in there.
Caveat: I'm on the systems / devops side, not dev.
I've loved it but I do miss the trackpad (although I've adjusted my workflow to use physical buttons now + thinkpad's trackpad). I also miss the larger screen (15" was really nice).
Whenever I go back to my RMBP 15 for moving files over, I've noticed the display is still nicer for text. Even with installing some calibrated color profiles, I haven't been able to match the same perfection the RMBP 15 had. Is this something you ran into at all / how did you tweak?
Ubuntu worked out-of-the-box, and macOS works well after a few tweaks. I also have a third partition to share files between the two halves. Clover bootloader has a friendly way to select which system to use on boot.
I'd like to use Linux full time, but the software I need isn't there.
- Cloud reliance has been key. GSuite and Dropbox have kept me from having to install much on the Budgie system.
- Budget a half day on StackOverflow, etc. for problems you may have getting Dropbox, Bluetooth and some other items working seamlessly with accessories... although some of this is unique to Budgie.
- Don't expect much interoperability with iOS products.
- Key apps I use are available natively, eg. Slack and Atom.
I'm still going back and forth some and find the desktop/UI customization available in Budgie has increased my productivity and decreased strain.
I'm missing hazel, bitbar and geektool applications quite a bit and haven't found a suitable replacement that is as supported and easy to configure as those apps. I can replicate most of the functionality with Python, conky, etc... but I haven't the time to do so.
- Alfred and all its integrations
- Dash for progamming documentation. Yes, I know Zeal etc. exist, but none of them come even close in terms of usability
- Karabiner-Elements for keyboard remapping. Might be less of problem on non-apple hardware where the modifier keys have a saner layout.
Getting geeked up over a switch is probably overdoing it. I mean...you just do it. Install Fedora on it--I mean, you could install Ubuntu, but the movement seems to be away from Ubuntu and for good reasons, in production I wouldn't run something that wasn't CentOS, and Fedora is close enough while removing a lot of the pain points of dealing with Debian derivatives--and start working. It'll suck at first, it'll suck less over time, you'll get there. You'll learn to RTFM if you haven't learned it already, and you'll get there.
As a developer, using either is basically substitutable. I still use a Mac laptop because Linux laptop support varies between okay and awful (and System76 et al make computers that feel like junk, though Dell's support is worth calling out as a positive--my next machine is probably an Alienware 15, largely because of the keyboard and the GPU) but when not on the road I use the Mac mostly for Keynote and Photoshop, not writing code.
Every Unix development tool I use (i.e., I still have Windows partitions around for good reasons), from VS Code on down the line, works on both Linux and OS X without trouble. There's really not much "switching" to be done. If you use novelty stuff like Espresso or whatever it might be a trickier situation, but I feel like most developers aren't in that boat.
Consider Dropbox or similar for syncing dotfiles, though. Sharing those across will reduce your frustration a decent bit. Just make sure to have separate files for Mac and Linux-specific stuff, where applicable, and source them appropriately.
I liked OpenSUSE when I used it. Fedora's the path of least resistance for me. I kinda feel like "Not Ubuntu" is a bigger thing, in 2018, than whether you're in on Fedora or OpenSUSE or Arch or whatever; the tide seems to have turned against it as a server operating system in my neck of the woods and I tend to think you should try to stick at least reasonably close to what you're deploying on.
The newer kernel features aren't typically as important as stability for production workloads.
- Headphones constantly crackle when they're plugged in. I've tried updating audio drivers, enabling/disabling various things, editing config files, etc. nothing fixes it. I've gotten used to listening to music with a crackle superimposed on top.
- Screen randomly flickers
- The trackpad interface is nothing short of _atrocious_. If you move around it too much it "locks up" the cursor and you can't move anymore, you have to click it several times while dragging until it starts working again. If you brush it with a single atom of your finger as you're typing, the cursor will move around wildly, often selecting most of the text you've typed and overwriting it with your next character. I've also tried updating/changing/etc libinput and it doesn't do anything.
- In an attempt to fix the above issues, I tried to update to Ubuntu 18.04 (it was on the latest 16.04). `do-release-upgrade` wouldn't recognize there was a new version available (this was a few days ago). I did `do-release-upgrade -d` without realizing it was a dev version, then after a few minutes of reading I realized it was, so I cancelled it, and rebooted my computer. Now, it just boots to a cursor on a black screen and it never changes. At this point I just decided to start using my Macbook again until I get un-frustrated enough to figure out what to do with the Dell.
Only on terminal it's with SHIFT to avoid conflict the Ctrl+C that ends a command.
In most apps, the primary selection is populated merely by selecting something, while the clipboard selection is populated by some sort of explicit user action, like ctrl-C or a context menu.
The clipboard selection is pasted with some other explicit action. Usually it's analogous to the way you copy to it, like ctrl-V, or a context menu.
The primary selection is usually "pasted" with middle mouse button. Sometimes there's also a keyboard shortcut, and if there is it's often a modified form of the clipboard-selection's paste shortcut.
Most people get confused by the fact that there is more than one "clipboardy thing". They copy to one, and then paste from the other and winner why their copy didn't work.
The fact that there isn't a consistent action to get to each doesn't help. It is consistent if you stick to apps from the same "family" (eg: Gnome/gtk+ or KDE), except terminals never use ctrl key shortcuts. (Because control characters already mean something in terminals.)
This is one of the cases where I think the Mac approach happens to work out better than Linux (or Windows): by using ⌘ instead of control as the default shortcut modifier, there's no ambiguity about whether I'm talking to my terminal (copy, paste, spawn new window, etc.) or trying to send a control character. I don't know why the Linux community defacto-standardized on control keys rather than Super (or even Alt), given the high proportion of Linux users who are also terminal users.
Let's not blame the (l)users. For example, by merely selecting the text you want to replace you may override the paste buffer content - this is a blatant POLA[1] violation.
[1] https://en.wikipedia.org/wiki/Principle_of_least_astonishmen...
I don't think stating that "people get confused" is placing blame on one party or the other. That they get confused is a fact. I said nothing about whose fault that is.
> For example, by merely selecting the text you want to replace you may override the paste buffer content
It's a trade-off. Having the mere act of selecting text copy it to the primary selection is extremely convenient. There isn't any way to have that convenience without the downside that overwriting it is also easy. If you want to copy something and not have further selections overwrite it, you use the clipboard. This is like the trade-off of having a confirmation dialog or not.
I wouldn't say "this is a blatant POLA violation". What surprises one person might seem obvious to another. There is only one intuitive user interface, everything else is learned.
The confusion starts with the fact that people typically aren't told that the primary selection and the clipboard are two separate things (and by using the term "paste buffer" to ambiguously refer to one of them you're perpetuating this). Much of this misconception comes from the fact that more popular systems (Windows and Mac) only have the one clipboard, and people assume that whatever they learned first is universally true.
Not knowing about the primary selection actually isn't a problem on its own, though. After all, if one only knows about the clipboard operations, but doesn't ever trigger pasting from the primary selection, then the fact that the primary selection even exists would be invisible to them. The clipboard selection on X works pretty much the same as the clipboard on other systems.
The real problems start when people who believe there is only one "paste buffer" are then told, or discover, that they can "paste" using operations that actually paste from the primary selection rather than the clipboard. The worst part is that this doesn't fail outright, but instead seems to work, but inconsistently. Now they're confused, because there is no way to reconcile this behavior with their mental model that "this is another way to paste from the one and only clipboard".
Upgrade are offered from LTS to LTS only once the x.x.1 has been released.
https://help.ubuntu.com/community/LiveCdRecovery#Update_Fail...
Rather than Ctrl+Alt+F1 (which switches to a TTY), you can open a Terminal instead and run 'sudo -i' to get a root shell.
Replace 'sda1' with your root disk (you may have LVM enabled, and definitely if you have full disk encryption). If you don't have disk encryption, run 'pvscan' and see if it reports anything.
To get the update to finish, you can run 'dpkg --configure --all'.
There's a good guide here :
https://wiki.archlinux.org/index.php/Dell_XPS_13_(9350)#High...
Using alsamixer, I set 'Headphone Mic Boost Volume' to be 22. Then persisted the change with 'sudo alsactl store'.
I haven't experienced the other issues with Arch, though.
I thought Dell’s XPS series was supposed to have first class support on Linux? Did you try to contact Dell? I never had problem with sound on Linux even with some very cheap hardware.
Anyway, if you’re willing to do some tinkering yourself it might be as simple as adjusting some deep alsa settings.
E.g. this guy makes it look easy[1] :)
> I've also tried updating/changing/etc libinput and it doesn't do anything.
Does it use “precision” drivers on Windows? Sometimes trackpads implement their own gesture recognition and all kinds of other weird things. Check what you get with `xinput list` and try disabling anything that is not a pointer device.
> (it was on the latest 16.04)
Was it a new Dell? If you have new hardware and old kernel then forgot all of the above as that is obviously not a great combination. You absolutely need the latest kernel for the latest hardware.
> I did `do-release-upgrade -d` without realizing it was a dev version, then after a few minutes of reading I realized it was, so I cancelled it, and rebooted my computer.
Yeah sorry, Ubuntu doesn’t offer safe upgrades. I suggest if you don’t have much Linux experience (and even if you do) OpenSuse Leap/Tumbleweed which has full snapshot & rollback support[1], and since recently fully transactional upgrades as well.
[1] https://www.youtube.com/watch?v=a1YkPtfC4LI
[2] https://www.youtube.com/watch?v=GJgWvTLo07k