8 ms·
Ask HN: Why no stable binary kernel interface for drivers?
Linux does not have a stable binary kernel interface for drivers. This enforces either that all the drivers must be in the kernel source tree or that drivers become broken with kernel updates.
I don't want to have a political debate here about free software. But I can see ideological reasons for how Linux try to force hardware manufacturers to share the code for their drivers.
The (proprietary) driver issue is a big pain for people who want to use Linux for desktop as a workstation e.g. development. I would say that it is the biggest obstacle for adaption of Linux desktop.
Why couldn't we have long term supported kernels with decoupled drivers?
Discussion: http://lkml.iu.edu/hypermail/linux/kernel/1604.0/00998.html
- Someone 9y agoAs http://lkml.iu.edu/hypermail/linux/kernel/1604.0/03993.html http://lkml.iu.edu/hypermail/linux/kernel/1604.0/03993.html states, you can get binary stability for in the order of five years from the likes of Red Hat and SuSe. I don't know where you can get binary stability for decades, but it wouldn't surprise me if some military applications guaranteed that. Since there's nothing stopping suppliers from selling it, there apparently isn't that much demand for it.
- 708145_ 9y ago> As http://lkml.iu.edu/hypermail/linux/kernel/1604.0/03993.html http://lkml.iu.edu/hypermail/linux/kernel/1604.0/03993.html states, you can get binary stability for in the order of five years from the likes of Red Hat and SuSe. Yes but why can't the kernel provide a stable interface? The stable_api_nonsense.txt is just nonsense for me.
- DonbunEf7 9y agoNot "can't," but "won't." It's not considered worth the effort; the technical benefits are too great when doing it the current way. The political side effects are a great bonus but not the main motive.
- avar 9y agoBecause the kernel developers aren't interested in assuming the maintenance burden of maintaining (possibly many incompatible and versioned) interfaces purely for the benefit of users who maintain out of tree drivers.
- mixmastamyk 9y agoI'm surprised driver interfaces are still changing so frequently. Ten years ago perhaps, but they're not largely sorted today twenty five years+ after Linux debut?
- planteen 9y agoThere have been general architecture changes. Look at DRM as a better way to do rendering versus the old Unix way, for example.
- mixmastamyk 9y agoSure, but isn't that ten years old already? It's not like these big changes come every month.
- eekthecat 9y agoStable API or not, every time there is a new NVIDIA driver, my Win10 boxes work and my Fedora/Ubuntu ones break. I doubt Microsoft is asking NVIDIA to keep their driver inside Microsoft repositories.
- mixedCase 9y ago> Stable API or not, every time there is a new NVIDIA driver, my Win10 boxes work and my Fedora/Ubuntu ones break Use a distro that ships the Nvidia driver in its repos or a repository that builds for your distro's kernel specifically.
- microcolonel 9y agoMaintaining the drivers together with the rest of the system allows subsystem maintainers to make broad improvements to the functioning of drivers, and encourages vendors to upstream them as free software. If you want a stable kernel driver ABI, then you're going to have to maintain your own wrapper which will retain all of the anachronisms that have been excised from the upstream kernel. You are perfectly at liberty to do this for yourself, just don't expect kernel maintainers to willingly make their own lives harder, reduce the quality of running kernels, and reduce the enthusiasm for releasing and upstreaming high quality drivers. As an alternative to a stable ABI, you can just go with a single LTS release, and you can expect binary compatibility on the order of four years.
- 708145_ 9y agoBut if vendors does not want to upstream them as free software, then we have a problem and an issue with the non stable ABI solution. The end user does not care if the driver is free software, they just want their machines to work. I guess this is an issue for Google too, for their Linux fork Android. Of course everyone has the liberty to write a wrapper, but that is just silly. If Windows can have a stable ABI, why can't Linux have it too? Why would it need to "reduce the quality of running kernels"?
- microcolonel 9y ago> But if vendors does not want to upstream them as free software, then we have a problem and an issue with the non stable ABI solution. The end user does not care if the driver is free software, they just want their machines to work. I guess this is an issue for Google too, for their Linux fork Android. You're saying this as though the end user experience is separate from improvements to the performance and semantics of the driver ABI. Also, on Android all of the (kernel space) drivers are free software; it's just that they're so crappy usually that they can not be upstreamed. They don't hook into much of the infrastructure in the kernel on account of ignorance, so they could easily push updated kernel module binaries, ABI compatibility does not affect that problem. Android's kernel is not a fork of Linux, it's a LTS tree with some configuration changes, and a couple of modules (most of which have been upstreamed by now). > If Windows can have a stable ABI, why can't Linux have it too? Why would it need to "reduce the quality of running kernels"? Windows doesn't have a stable driver ABI, they break driver ABIs pretty drastically every once in a while. Longhorn (later yielding Windows Vista) was the last straw, they couldn't build a good quality operating system with the same driver ABI. Furthermore, drivers from Vista often do not work with 7, 8, or especially 10. You can get the exact same sort of stable driver ABI by distributing for a specific distribution release or long term kernel tree.
- rtb 9y agoThis is addressed in the docs, at "stable_api_nonsense.txt": https://github.com/torvalds/linux/blob/master/Documentation/process/stable-api-nonsense.rst https://github.com/torvalds/linux/blob/master/Documentation/... (You might disagree with that doc, but if so you should address its arguments directly.)
- mixmastamyk 9y agoI use a Ubuntu desktop daily as a development workstation and have for a decade at least. Never really had a problem, though it slows down Virtual Box installation once or twice a year. shrugs
- catdog 9y agoThey should really mainline their stuff (or better build onto kvm)… On the other hand it's pleasantly surprising by itself that Oracle did not kill the project.
- catdog 9y ago> The (proprietary) driver issue is a big pain for people who want to use Linux for desktop as a workstation e.g. development. I would say that it is the biggest obstacle for adaption of Linux desktop. Simply don't buy Nvidia. Apart from that there shouldn't be a lot of hardware requiring blobs on the desktop.