Gentoo vs. MX Linux on old-ish laptops
I have a pathological dread of waste. The idea of disposing of something that works, just because there’s a newer, shinier alternative, makes me sick to my stomach. Maybe that’s a generational thing: I grew up in a time and place where nothing was wasted. I find that I am drawn to things that were made to last, and can be repaired. Nowhere is this more apparent than in my choice of computers: I own no computer more recent than 2017. My favourite desktop computer, in fact, runs CP/M; I built it myself, with a soldering iron.
Linux has long been the go-to operating system for computers that, while not necessarily ancient, aren’t based on the latest technology. In fact, there may be no alternative, with that kind of hardware. So it dismays me to see Linux becoming increasingly inappropriate for this kind of use. Nobody much cares about keeping ten-year-old PC hardware alive; in fact, I suspect there’s more interest in CP/M and the Z80. A ten-year-old laptop has no retro charm: the only reason for continuing to use it, is that to do otherwise would be wasteful.
Laptop computers present a particular challenge in this area: they are usually too poorly cooled to realize the full power of their CPUs. Why that’s such an issue –and, with Gentoo, it is – is a point I’ll return to later.
I’ve been on a bit of a mission lately: to find which Linux distributions are most effective on old laptops. For the last three months I’ve been migrating my old hardware to Gentoo Linux, but I continue to search for a more practical alternative.
In this article, I’ll report my experiences with MX Linux, particularly how it stacks up alongside Gentoo. Now, it’s true that this is hardly a like-for-like comparison: Gentoo isn’t really a Linux distribution in the way that, say, Fedora and Ubuntu are. It’s more a collection of tools for building a Linux installation according to certain rules. Historically, Gentoo users have compiled most of their software from source, although recently there have been moves towards a measure of pre-compiled binary provision. Nevertheless, my criterion for comparison is simply this: how easy do these competing Linux variants make it, to keep old laptops alive and useful? So the comparison seems fair to me.
Gentoo on old laptops
The great strength of Gentoo is that you can, with patience, construct a Linux installation that is highly optimized for a particular application. If you want a Linux that uses nothing but good-ol’ ALSA for audio support, for example, you can have it. You can configure the build system (‘Portage’) for ‘ALSA only’, and applications like Firefox and VLC will get built without support for anything but ALSA as their audio handler. Similarly, if I don’t want to use Wayland, or systemd, or Bluetooth, support for these things can be compiled out.
The build rules affect not just how software is built, but which software is built. That is, the dependency relationships between software packages are governed by the same rules that control the build process. With care and patience, you can install a Linux that contains all of what you want, and little of what you don’t. In principle, this is ideal for old hardware, which has no resources to spare.
But here’s the catch: to use Gentoo to install Linux on old laptops, you’re going to need new computers to do all the actual compilation. This is because the further your needs are from the mainstream, the more software will have to be compiled from source. Although Gentoo now has a binary repository, it mostly holds software that has been configured for mainstream use. And running on old hardware is, sadly, a non-mainstream use of Linux these days. I can build a version of Firefox that has ALSA support for audio, but I’ll have to build it: I’m unlikely to be able to get a pre-built binary package for it. And building Firefox on a 2015 laptop can easily take three days. Yes, days.
Now, the Gentoo maintainers are aware of this problem, and have workarounds, of a sort. Despite what I just said, you can get a pre-compiled Firefox package with ALSA support: but it’s a trick. This package provides the Pulse Audio variant of Firefox – which is widely available as a pre-compiled binary – and a shim library to adapt it to ALSA operation. This works, and all the messiness is largely invisible to the user but, still, it’s ugly. Firefox will use a bit more memory, and load the CPU a tiny bit more, than a pure-ALSA build.
The Gentoo binary repository provides, in some selected cases, multiple binary variants of the same package, with different features enabled. This makes it more likely that you’ll find a binary to suit a non-mainstream installation but, in my experience, there isn’t enough provision of this kind to make a significant difference to the amount of compilation.
In short, unless you’re willing to compile software for your old computers on a new one, you’re going to have to make compromises: do you want to use more binary packages, at the expense of a sub-optimal final installation, or live with more compilation? I should point out that compiling all the software I use, to get the Linux I really wanted, took nearly three weeks of round-the-clock compilation on a 2015 laptop.
Laptops are particularly badly hit by this compilation burden, because they are usually inadequately cooled. It shouldn’t take three weeks to compile a Linux installation on a ten-year-old i7 CPU – that it does is a result of the fact that the CPU will have to be severely throttled to keep its temperature under control, when running at full CPU load with no breaks.
All in all, running Gentoo on an old laptop is a job for enthusiasts, not for people who just want to use Linux for running applications. To work well there will need to be a lot of compiling, and this will probably have to be repeated every time there’s a significant update. Desktop and server computers are less problematic in this area, because they can usually run at full load without throttling. But, all the same, the amount of compilation shouldn’t be underestimated, even there.
Don’t be fooled by the people who tell you that they’re running Gentoo on decades-old Pentium systems and the like. Yes, this can be done. But it’s done as an enthusiast’s exercise, like running Doom on your refrigerator control panel – it’s possible, but it’s not for day-to-day use.
I know I’ve said it before, but Gentoo’s unique advantages are hardest to exploit where they would be most useful.
I also have to point out – for the purposes of the comparison that follows – that Gentoo has no automated installer. You’re expected to install it using command-line tools. However, the Gentoo documentation is excellent, and the installation isn’t difficult; the time it takes to read the documentation is a trivial part of the overall installation time, if you’re building much of the system from source.
MX Linux on old laptops
MX positions itself as a ‘midweight, stable, simple’ desktop operating system. It’s unashamedly a desktop system: there’s no server-class or embedded installation. Like Gentoo, MX does not force the use of systemd, and that’s usually a sign of a thoughtful approach to software provision. MX is available with various integrated graphical desktops, but its most popular variant is Xfce4. I use Xfce4 on Gentoo and Fedora already, so I have some basis for comparing the MX implementation with these alternatives.
MX is based on Debian, and can use software from the same binary repositories as Debian and its derivatives, like Ubuntu. However, MX has a whole stack of graphical software of its own, for customization and administration. I found this software to be well-implemented and functional; I sometimes even use it, rather than searching for a command-line way to do something, which is my usual approach.
MX is more mainstream that Gentoo in that it provides a graphical
installer, as well as this bunch of graphical tools. This installer does
allow for a measure of customization, particularly as regards the disk
layout. It can cope with a disk that has existing partitions that have
to be preserved – not all Linux installers can, sadly. However, I didn’t
find the graphical partition manager any easier to use than simply
running fdisk
at the prompt, as I had to with Gentoo.
Either you understand how Linux works in this respect, or you don’t: the
available tools won’t explain it to you. The installer offers relatively
little choice of which software to install – it’s optimized to create a
general-purpose desktop system. Still, this does make the installation
fast compared with, for example, Fedora. It’s not fair to compare the
installation time with that of Gentoo, because Gentoo will have so much
software to compile from source.
MX does not claim to be a minimal Linux and, although its basic
desktop installation is slimmer than, say, Fedora with Gnome, it’s still
general-purpose. If you’re trying to make every byte of memory and every
CPU cycle count, you’re going to have a lot of post-installation work to
do. For example, I only use ALSA for audio, not just because frameworks
like Pipewire and Pulse can use a heap of memory, but because it just
works better for me. The MX installer provides Pipewire, and all the
applications it installs are set up to use it. It’s not difficult to
disable Pipewire and go back to using ALSA – and I have – but this
requires making a lot of changes to the desktop configuration. I have to
replace the Pulse volume control with an ALSA one, for example. I also
have to install apulse
and change everything that runs
Firefox to run apulse firefox
instead, because the Firefox
binary has no ALSA support. None of these changes are rocket surgery,
but they do require a fair amount of knowledge, and some patience. Of
course, some users of old laptops will be happy to live with the
overheads of Pipewire, in exchange for the convenience it offers; but
some of the stock MX installation is nothing but eye-candy, and an enemy
of resource-efficiency. Again, to be fair to MX, I accept that MX does
not position itself as a minimal Linux installation, and I’m aware that
many will justifiably find my objections petty.
Both cosmetically and ergonomically, the Xfce4 set-up is slick. It looks nice, and the elements of the desktop are conveniently laid out. But, as I said, there are places where cosmetic impact has been chosen over efficiency. For example, the default install uses Conky to display date/time and system status information over the desktop wallpaper. This is eye-catching, but uses a non-trivial amount of memory and CPU (particularly updates every second) with little practical benefit on a low-resource system. Of course, Linux being what it is, you can turn this off, but you have to know how.
Compared with Ubuntu and Firefox I found it easier with MX to remove
and disable things that I don’t need, to conserve resources. For
example, I have no need for the tumblerd
thumbnail
generator and, when I did apt remove tumblerd
to get rid of
it, this didn’t strip out a whole chunk of the desktop with it. That’s
the kind of thing that tends to happen with Fedora and Ubuntu – all the
software is so tightly integrated that it’s hard to remove one thing
without breaking something else. On MX, the Thunar file manager
complained (just once) when I removed tumblerd
, but
removing it didn’t take Thunar with it.
MX’s real competitor, if that’s the right word, is not Gentoo, but the Xfce4 ‘spin’ of Fedora. Both are less bloated than the Gnome/KDE behemoths that most Linux maintainers favour, but I suspect that MX has the edge – just – where low resource usage is crucial. Also, Fedora uses systemd, for better or worse, while MX does not have to.
I feel I should point out that, although I’m no fan of systemd, removing it does not by itself make Linux better. No, really, it doesn’t. That’s what sets MX apart from, say, Devuan: MX has a character of its own, that goes beyond mere ‘lack of systemd’. Still, doing without systemd probably saves a hundred megabytes or so, and that might be significant on some hardware.
Comparison
In terms of RAM usage, Gentoo is the clear winner; in fact, it’s not even close. Running Xorg and the basic Xfce4 desktop components requires about 1.4Gb for MX, and only about 500Mb for Gentoo. That’s not just because there are fewer processes running – although that’s part of it – each process on Gentoo uses less memory than the same process on MX, even when these are of the same version. So, for example, the Gentoo build of Xorg (mostly compiled from source) used about 70Mb on my 2015 Thinkpad, against 140Mb on MX (a pre-compiled binary, of course).
I found these memory differences applied across the board. Even Gentoo components that I hadn’t built from source used less memory than their MX counterparts. I don’t know if that’s because Gentoo binaries are built with better consideration for optimization, or if they just include less code, and potentially can do less. Whatever the explanation, the differences were evident.
Gentoo runs common applications a little faster, too – on the same hardware many applications were noticeably snappier than they were on MX (or Fedora, or Ubuntu, for that matter). Again, it’s not entirely obvious why this should be the case, for applications that weren’t built from source.
But…
There’s no getting away from the fact that Gentoo is a total bear to install on an old laptop, and an even larger bear (a grizzly?) when it comes to routine maintenance. I can set up MX and install most of the applications I use in a couple of hours. Setting up Gentoo took weeks on a 2015 laptop. This isn’t practical unless you have some way to spread the compilation load. Of course, you can mitigate this up-front set-up burden by configuring the system to be able to take advantage of more pre-compiled components, but this will have implications down the line.
I’ve heard of all sorts of tricks to make Gentoo’s compilation burden more manageable on a laptop. Apart from the obvious one of doing the compilation somewhere else, I’ve heard of people using cooling pads and desktop fans, standing their laptops end-on to improve convection, installing faster fans, and so on. All these measures are for the enthusiast, as it using one computer to compile for another. I just want to run applications.
I think the typical Gentoo user is like somebody who buys a Ferrari, and then spends every weekend fiddling with the engine, so it can do 180 mph rather than 170. But I just want a Volkswagen.
So, stretching this metaphor a little further, I guess MX Linux is the Volkswagen Golf of the Linux world. It will be practicable for many people, and will work tolerably well with little maintenance. But it’s not going to, um… fly on ancient hardware. OK, this is a mixed metaphor, as well as a stretched one. But perhaps you get my point.
At present, I am persevering with MX Linux on my old laptops, but I haven’t ruled out the possibility of going back to Gentoo, should the need arise. I have back-ups of the Gentoo installation, of course, because the prospect of another three-week set-up time hardly bears thinking about.