On 10/31/2017 08:21 PM, Uwe Stöhr wrote: > El 31.10.2017 a las 03:05, Richard Heck escribió: > >>> I realized that Linux's monolithic kernel is a problem. Every device >>> driver needs to be part of the kernel. >> >> This is a confusion. Linux supports kernel modules, which are the exact >> Linux equivalent of a device driver, and which can be installed >> separately from the kernel itself. > > OK, but the WLAN driver is part of the kernel, not of a kernel module. > This bug cost me many hours to investigate until I learned that I need > to recompile the kernel with the fixed driver. I can also not e.g. use > another version of the Mesa driver - it has to be compiled with the > kernel too. So why are the drivers no modules?
This is a question you could ask of the people at your distro. They made a decision to compile the kernel so that iwlwifi was integrated into it and not a module. This page from gentoo https://wiki.gentoo.org/wiki/Iwlwifi specifically explains how one can configure the kernel to make iwlwifi a module, if one wants to do that, so I'm not making it up. One can do this with almost any device driver. Granted, you may not want to reconfigure the kernel yourself. My point was just that it has nothing to do with Linux. It's a choice your distro made when they configured your kernel. The distro could perfectly well decide to configure the kernel so that iwlwifi was a module. Then they could offer updates to it without having to update the whole kernel. That's up to them. >>> Someone in a forum explained me that the kernel needs to be >>> compiled using the fixed driver before it will work. But compiling the >>> kernel as a normal user? No chance. >> >> In the Windows world, you do not even have this option. You have to wait >> until Microsoft or the manufacturer decides to issue a patch. > > No, there I can always go back to a previous driver version that is > known to work. For my WLAN problem I found out that there were older > driver versions without the bug but I could not use them. Why can't you use an older kernel? Just install it. You can even install it alongside the newer one you already have. I have done that many times. If your distro doesn't offer older kernels, then that is a problem you have with them, again. >> Wait until they issue a patch. I'll bet that Linux distros are faster >> to do that >> than Windows is. > > That is my point. Waiting is a no go in real life. Every hour a person > is not productive produces costs. That is why companies have 24h > support contracts. I mean if you cannot e.g. transfer parts from your > CAD to the CAM software of the machine, the machine is not running. > This costs a lot of money every hour. And my point is that bugs are a fact of life, and if you have a bug you will get it fixed a whole lot faster by the Linux community than you will by some commercial monopoly. If you want to pay for support, then you can have someone compile the new kernel for you. You can even pay people to fix bugs for you. Much as with LyX. You do not have any of these options with closed-source drivers. And of course you can compile the new kernel yourself. I compiled my own kernel very shortly after I became a Linux user, for a reason not unlike yours. Compiling things on Linux is so, so much easier than on other platforms, and compiling the kernel is no more difficult than compiling LyX. It's actually very easy, especially if you just want to use the same configuration (what drivers are included, etc) as your default kernel, which in your case would be fine. You just need to fix a bug, not activate a driver your distro didn't include (which is what I needed to do, since I had a weird wifi card). Here's how to do it. Get the source for the kernel you are currently using. Apply the patch you need to fix the bug that's affecting you. (Or get the source for a new kernel.) What follows then happens from within the source directory. # copy the existing configuration cp /boot/config-`uname -r`* .config # create the new configuration make defconfig # build the kernel # this will take a while! make # install the new kernel sudo make modules_install sudo make install # update the bootloader sudo update-grub2 Now reboot and choose your new kernel as the one you want to run. See this page https://kernelnewbies.org/KernelBuild for more info. Note the remarks at the end about how, if the only change was to a module, you only need to recompile that part of the tree. That was all for Ubuntu. You may have to make some minor changes, but they won't affect how easy it is. You may also have to install some packages in order to compile the kernel. Obviously, e.g., you need a compiler! > There must be a reason why no production company I know uses Linux for > other things than server applications. Many massively parallel machines run Linux: http://www.zdnet.com/article/almost-all-the-worlds-fastest-supercomputers-run-linux/ LucasFilms does their video editing on Linux (for a long time now): http://www.linuxjournal.com/article/6011 Google uses Linux on the desktop. Etc, etc. I'm not sure why you didn't know about that. ;-) > Maybe the driver architecture is one reason. I don't know. As I said, there is no problem about driver architecture. What's true is that modules are always tied to a particular kernel, so you can't just take a module from one kernel and use it with a different one. But there is no "monolithic" architecture, and a module can easily be recompiled for a new kernel without re-compiling the whole kernel. The dkms and akmod frameworks exist to make this happen automagically. See https://unix.stackexchange.com/questions/47208/what-is-the-difference-between-kernel-drivers-and-kernel-modules for more info. Richard PS There also exists the possibility of 'device drivers in user space', but this is an entirely other topic.