Thursday, July 24, 2008

Linux sucks: Hardware drivers

Today, I'm going to talk about the sad state of Linux's hardware drivers.

Drivers are something you need to use a modern computer. Computer manufactures, in order to reduce the cost of computers, constantly change the hardware a computer uses. This isn't a problem normally; one simply downloads the drivers for the new hardware and everything works fine.

Well, it's not a problem in Windows. See, Microsoft has made it as easy as possible to make a driver in Windows. Once a driver is made, that driver is guaranteed to work for years. Indeed, most XP drivers work just fine in Vista; Microsoft went to a lot of effort to make sure, when you upgrade the OS, the hardware still works.

This level of stability goes both ways. Installing Windows XP on new hardware is possible; installing a version of Linux from the same era (RedHat Enterprise Linux 3 or CentOS 3) on a new computer is impossible.

The problem is that Linux doesn't have a unified driver model. Drivers frequently break between minor kernel versions and forget about having a new driver work with an older kernel.

This is a real-world problem. I bought a Linux compatible notebook. I very specifically chose hardware that would work with Linux with the minimum of hassle. When Ubuntu proved to be unusable (the wireless driver never worked with a static IP and one day just stopped working altogether), I put CentOS 5.2 on this computer.

The video card finally worked with CentOS; X, unlike the kernel, is pretty stable about their driver API. The sound card doesn't work. I only got the networking card to work by installing a third-party driver; it's an older driver version and has an issue with crashing if I don't send traffic over the wireless interface; I usually have a process ping the gateway router once a second, which causes the problem to not manifest itself.

I wish the core kernel developers would find something more productive to do with their time than constantly changing the kernel-level API and ABI for drivers, breaking drivers and making it nay-to-impossible to backport drivers for new hardware.

This is one area where Windows clearly kicks Linux's ass: Drivers. Drivers for a given version of Windows are pretty much guaranteed to work for at least five years. This laptop has no problem working in Windows XP, a seven-year-old OS; none of this laptop's hardware works with a circa-1991 era Linux kernel (yes, I tried this), since new drivers don't work with older kernels.