Laptops and free software

Published on Sun 02 June 2013. Filed under . Tags .

Users of free GNU/Linux distributions often choose computers that can be optimally used without installing nonfree software. This article is based on many discussions of such hardware and problems making this a nontrivial issue.

There are no free laptops: all use CPUs that the user cannot study, manufacture nor modify and many complex parts with this issue. (There are free CPUs like OpenSPARC, none of them are used in notebook computers.) For this reason we use less strict criteria, like for the FSF hardware endorsement which currently only a small number of modified laptops fulfil: Gluglug X60 and other Intel i945 and gm45 laptops running libreboot.

In this article the word free means libre or freedom-respecting software. (I don’t discuss gratis laptops, most probably they don’t respect user’s freedom.) Firmware refers to software running on other CPUs or boot firmware.

I don’t know ARM well, so this article focuses on machines of the x86 and MIPS architectures (no free distro supports other architectures); ARM devices nearly always need nonfree graphics drivers and usually have nonfree boot firmware which is often cryptographically restricted from being modified. The FSF has a list of some computers with these issues.

Boot firmware

Most modern computers and nearly all laptops run nonfree software before starting the operating system. On x86 it’s usually called BIOS, while now it often has a new interface called UEFI. Although UEFI is often criticized for difficulties with installing free operating systems, its implementations have the same important problem as older BIOSes: it is nonfree software and users usually cannot replace it with free solutions.

There are three projects making free boot firmware:

  • coreboot, often equated with free software boot firmware while for some systems it includes nonfree software, CPU microcode and needs other nonfree software extracted from the original boot firmware: VGA BIOS for integrated cards.
  • PMON2000 for Loongson devices (but all supported systems except for the YeeLoong using Loongson 2F have nonfree VGA BIOS). For me the most interesting feature is it working as bootloader completely replacing GRUB for my uses: it loads kernels from ext2 or FAT filesystems and supports network booting (via TFTP).
  • GRUB: while it’s primarily a powerful and portable bootloader, it can replace PMON2000 on YeeLoong and FuLoong based on Loongson 2F (freeing the FuLoong from its default nonfree VGA BIOS).

There are two main issues with mostly free boot firmware: CPU microcode and VGA ROM which I explain in the following sections. Recent systems need much more blobs.

Boot firmware is more difficult to install than operating systems: chips are often soldered, flashing custom code might brick the machine; hardware modifications are used for some boot firmware development. (It’s easier on desktop machines with more motherboards having socketed boot firmware chips.)

Several laptops support completely free boot firmware: Thinkpad X60/X60s/X60t, several Thinkpad T60 models and Lemote YeeLoong (not the Loongson 3A laptop called YeeLoong 8133). There is a fully free binary distribution of coreboot for the Lenovo laptops: libreboot, maintained and used by Gluglug.

Chromebooks are often marketed as devices running coreboot on recent Intel systems. This is true, while they need nonfree software included in the boot firmware, some of which is cryptographically restricted from being replaced by users. Samsung Exynos Chromebooks don’t have Intel ME, while they use a signed and encrypted first stage bootloader and have integrated wi-fi requiring nonfree firmware. (The Acer Chromebook 13 with NVIDIA Tegra K1 is most hopeful, while its soldered wi-fi requires nonfree firmware and limited non-replaceable storage and connectivity options would make it an unusable laptop for me. I don’t know what other nonfree software it needs.)

CPU microcode

CPUs are complex and have bugs, most x86 ones have microcode updates fixing some of these. The hardware includes microcode, boot firmware has updates for it and operating systems might include them. All such microcode is nonfree.

To have free boot firmware, we need to use the original microcode from the CPU chip, while we don’t know which Intel or AMD processors work without updates provided with boot firmware.

MIPS and ARM CPUs usually have no microcode, making support for completely free boot firmware easier. This has a potential disadvantage in having more hardware bugs (userspace programs can hang Loongson 2F CPUs; there are assembler fixes making it unprobable, while no CPU fix is possible without replacing hardware).

Some Intel CPUs have surveillance antifeatures implemented in hardware or boot firmware.

These issues make only a non-x86 system a long-term solution for the boot firmware freedom issue.

Graphics

Only Intel graphics supports 3D acceleration without nonfree software provided by the operating system (i.e. working on free distros).

Both AMD and NVIDIA graphics chips need nonfree VGA BIOS when using free drivers, so no completely free boot firmware supports these systems. A free replacement is used in coreboot on some systems with Intel graphics; this is made easier by the GNU/Linux graphics driver using the BIOS only for data, not code (it previously worked on systems with no VGA BIOS at all), and Intel releasing more documentation of its graphics chipsets.

I personally believe 3D acceleration is not important. Trisquel works well without it and I think this is a reason why there are incorrect reports on h-node suggesting it working on AMD systems. Vendors disagree, Rhombus Tech plans separate CPU cards for the FSF endorsement due to this issue.

The choice between free 3D acceleration and free boot firmware was made harder by AMD’s partial support for coreboot with their chipsets (while their graphics cannot be used without nonfree software) and Intel’s anti-competitive behaviour. AMD helped solve this dilemma by requiring nonfree software for their newer CPUs.

The AMD free GPU drivers need nonfree software, they are literally 95% free except for a necessary part without which they don’t work resulting in unaccelerated graphics or black screen and kernel panics.

Nouveau, the reverse engineered free driver for NVIDIA GPUs, supports 3D acceleration for many older devices, while too new or too old ones are not well-supported. It doesn’t solve the problem of requiring the nonfree VGA BIOS. Despite this it’s an important and effective project. All other modern GPUs that I know about have no vendor-supported free drivers, many have reverse engineering projects.

Wi-fi

Since most currently available systems have nonfree boot firmware that normally isn’t replaced by users, it’s widely accepted. Another common issue is lack of free wi-fi drivers or firmware used by them.

Nearly only Atheros cards work without nonfree software. On GNU/Linux they use the ath5k, ath9k, ath9k_htc and carl9170 drivers, while there are other drivers for less popular cards needing nonfree firmware. Their devices supporting the newer 802.11ac standard are different: their atk10k driver requires nonfree firmware, like all 802.11ac chipsets. (Many Atheros cards integrated in laptops support also Bluetooth that requires nonfree firmware.)

Atheros is the only company that used to free wi-fi firmware: the carl9170 and ath9k_htc drivers use firmware with free source code available.

USB 802.11g cards using the Realtek 8187B chipset work without nonfree firmware while most other Realtek cards don’t.

For Broadcom cards there is reverse-engineered firmware for older cards while Broadcom now makes free drivers they still require nonfree firmware.

There are two problems with replacing internal wi-fi cards in laptops: boot firmware whitelists in devices of IBM, Lenovo, HP, Dell, Toshiba and possibly other vendors (allowing using the machine only with wi-fi cards of the same vendor, usually only ones requiring nonfree firmware) and multiple card format standards. (Some laptops have irreplaceable internal wi-fi.)

USB cards are an often recommended solution for these problems, since many use the Atheros chipset with recently freed firmware (it needs a recent Linux-libre kernel and the separately available firmware); ThinkPenguin offers the card for which the firmware was freed, Tehnoetic sells them in Europe. Buying such devices from other vendors is not reliable: they usually don’t show what chipset is used and change it without changing the model name. This is partially solved by users reporting compatibility of specific versions, while not all vendors show the version number before the device is bought. I’ve written a separate article discussing some tricks for finding compatible cards and the whitelist antifeature.

Not releasing free drivers nor firmware is bad for users and vendors. I know several arguments used by vendors for nonfree firmware: FCC rules that the Software Freedom Law Center considers to accept free firmware (the release of Atheros firmware source clearly shows that at least some hardware designs can have free firmware); complex algorithms that can be used in devices of other vendors; and licensed third party code that they cannot release.

Embedded controller

Even if a laptop has free boot firmware and runs a completely free operating system, it still probably has nonfree software running on other processors. The EC firmware is an important case of such software.

An embedded controller is a microcontroller running software for power management and other laptop-specific functionality. Its firmware is nearly always nonfree, while there is a project for its replacement on OLPC devices. Some Chromebooks have free EC firmware, while their other blobs might have bigger issues.

Nonfree EC firmware has three practical problems: it has bugs (like all software), it’s often undocumented (making support in free boot firmware and drivers harder: this affects power management and hardware monitoring) and makes replacing boot firmware harder.

Since it normally isn’t changed by users and vendors don’t recommend updating it as often as boot firmware, it’s sometimes considered as hardware as the chips that it uses.

There is a similar issue with hard disk and SSD firmware: it’s a big and complex nonfree program using patented algorithms with significant performance, reliability and privacy implications. Since users rarely change it, it’s treated as a part of hardware, not software.

How can this be improved

We should support vendors of mostly free solutions who offer compatible devices and support development of completely free drivers, by e.g. buying 802.11n Atheros wi-fi cards or ThinkPenguin products.

We can also buy used machines, so vendors won’t get money for new non-user-friendly ones. (It’s also better for the environment, like not buying computers that are not needed.) There are social problems with this approach: it motivates people to buy the same device or sell them, so other users pay for new machines. It’s also difficult to buy used devices recommended by others or replace them when they break, since vendors sell them for much less time than they can be used for. Gluglug provides an important partial solution to these issues: their X60 laptops have fully free boot firmware and a compatible wi-fi card preinstalled, while no new devices are manufactured now (so Lenovo won’t be rewarded for their antifeatures and blobs that Gluglug removes) and it is still possible to get replacement parts for them.

Since in important areas most drivers are not supported by vendors, reverse engineering projects are the best way to improve them.


Comments

Submit comments on this post to <mtjm@mtjm.eu>.