I don't really understand how Linux handles hardware, could you explain it to me?
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I don't really understand how Linux handles hardware, could you explain it to me?
Hello,
Well, on Windows, you have to install drivers for everything, even for NIC.
Under Linux: no. I read about the kernell and what I understood is that a part of it handles the hardware with a material compatibility list that will be recognized without driver installation.
Stupid question as example: ethernet cards, they all have the same purpose, their is nothing special about it, no big secrets (compared to graphic cards). So, at which level, and how are ethernet cards automatically working under Linux distributions & not under Windows?
Other question: if I keep all my devices and cards, hard disk with a linux distribution on it and that I only change the motherboard with one that has only a better chipset (and maybe more slots) that will better fit with my CPU? I mean, under Windows, you have often to install a driver for the chipset.
Last one, for wireless devices, it almost works out of the box, and sometimes, you need a driver. And even if I see access points, does it means I don't need a driver for my wifi device?
I'm really confuse and the more I read about it, the more confuse I'm becoming!
Under Linux: no. I read about the kernell and what I understood is that a part of it handles the hardware with a material compatibility list that will be recognized without driver installation.
Stupid question as example: ethernet cards, they all have the same purpose, their is nothing special about it, no big secrets (compared to graphic cards). So, at which level, and how are ethernet cards automatically working under Linux distributions & not under Windows?
The main reason why Linux usually works out of the box and why you (in most cases) don't have to install drivers it pretty simple: It comes already with most drivers. There is no secret hardware handling that Windows couldn't do.
Quote:
Other question: if I keep all my devices and cards, hard disk with a linux distribution on it and that I only change the motherboard with one that has only a better chipset (and maybe more slots) that will better fit with my CPU? I mean, under Windows, you have often to install a driver for the chipset.
Same thing here: Usually linux has all the drivers already, if the distribution you use is recent enough.
Quote:
Last one, for wireless devices, it almost works out of the box, and sometimes, you need a driver. And even if I see access points, does it means I don't need a driver for my wifi device?
Same here. Many drivers for wireless devices are already onboard. sometimes you need a special firmware that has to be installed, in rare cases you have to install a driver. If your device sees an access point already right after installation that doesn't mean that you don't need a driver for that device, but that a driver is installed on your distribution by default.
In short: Linux, as Windows, needs drivers to get your hardware working, but most drivers are already installed in your distribution by default.
Well, on Windows, you have to install drivers for everything, even for NIC.
Windows tends to use a slightly different model for how you get your drivers; historically, Windows has been produced in a somewhat generic form, and then you get drivers (on a disc, off the 'net) from the manufacturer of the peripheral that you are trying to use. This gets modified a bit with recent versions and driver signing, but essentially it only works because some particular version of windows is such a big market that if manufacturers of, say, ethernet cards didn't produce drivers for significant versions of windows, they wouldn't have much of a market.
For Linux, the distro collects and bundles up drivers and they take care of the detection/installation routines. So, if Debian doesn't have it, there is still a chance that Fedora will.
In fact, I wonder whether the distinction between Linux (which is, technically, just a kernel, although in everyday parlance quite often refers to the kernel plus some basic utilities plus installation and detection scripts plus various management bits plus package management plus software ap-plications) and the distro isn't behind at least part of this confusion.
Quote:
Originally Posted by snicolas68
So, at which level, and how are ethernet cards automatically working under Linux distributions & not under Windows?
Automatically? really, they only work because someone has written a script that detects which card it is and instantiates the correct driver. That may or may not be 'automatic' depending on your definition; it isn't an automatic part of Linux (the kernel) but it might just be an automatic part of your distro.
Quote:
Originally Posted by snicolas68
Other question: if I keep all my devices and cards, hard disk with a linux distribution on it and that I only change the motherboard with one that has only a better chipset (and maybe more slots) that will better fit with my CPU? I mean, under Windows, you have often to install a driver for the chipset.
i) define 'better'; if that means, in some way 'backward compatible, then, ab definitio, it will work, even if not optimally
ii) if better means, eg, 'more modern, but with no compatibility, then the question is about when chipset detection is done
iii) My preference in this kind of circumstance is always to re-install, because then I know that I won't be '...getting away with the use of somewhat compatible drivers and I will be using the real thing...'. Other people do the opposite, but I'm happier knowing that I won't get bitten by some obscure bug that only shows its ugly head after some other update. YMMV. But, with the relative ease of updating a properly configured system, why not do things correctly?
Obviously, you don't have any of the idiocy of applying to Microsoft for them to decide whether you are allowed to use this software with the newer hardware (without paying all over again), because that's not how things work here.
Quote:
Originally Posted by snicolas68
Last one, for wireless devices, it almost works out of the box, and sometimes, you need a driver. And even if I see access points, does it means I don't need a driver for my wifi device?
In reverse order
If you 'see' access points, then it means that you do have a driver, the driver has been installed and configured and all of this happened automagically.
If it isn't quite working (I think that's what you are saying, but you could be discussing a hypothetical possibility)
maybe a separate thread to discuss getting it working
The problem is probably with Networkmanager/wicd (whichever you are using) or traditional networking, and their configuration, You'd have to give a lot more info to really make progress
(apologies for the extra bullet point - I seem to have done something wrong, but then I don't do nested lists often!)
You shouldn't need to reinstall the OS when changing hardware (including the motherboard - or even the whole system minus the HDD). There may be a few issues with bootloader/fstab mixing up ids (udev), but these can be resolved, and proprietary drivers should be removed before upgrading the hardware.
The only times when you might want to reinstall is if you get a new HDD with the new hardware and/or switch to a different architecture e.g. i386 to amd64 (or vice versa). So yes you can in many cases just pull the HDD from one machine, put it into another and boot up - no "blue screens", crashes - or if you even get that far "anti-piracy" restrictions. That's how it should be.
Since Linux is Free Software, many products have historically had to be reverse-engineered, and drivers written for them by volunteers. In spite of, or perhaps because of this, it now has a huge code base of drivers available for it, covering a much wider selection of hardware and architectures than any Windows release. And now that it's big business, more and more hardware companies are actively participating in diver creation, working directly with the Linux community to improve their quality as well as their quantity.
There are still some holdouts though, and hardware that cannot be easily reverse-engineered. There are also some companies that only offer binary-only secret "blobs" of driver code that can be used, but not examined or modified.
Structurally, the Linux kernel has a kind of hybrid monolithic/dynamic organization. Depending on how you compile it, a "driver" can be incorporated directly into the kernel, or loaded from an external module file (these have .ko extensions and usually reside in /lib/modules/<kernelno>). Modules can be loaded manually with programs like insmod or modprobe, or automatically by udev (the main device management process) or by hardware detection scripts.
Edit: I should also mention that it's possible to run drivers outside of kernel space with some systems, such as fuse for various file-system drivers.
http://kernelnewbies.org/LinuxChanges is a good place to see what changes are being made to kernel drivers in each kernel version, along with all the other improvements.
Last edited by David the H.; 06-13-2013 at 01:47 PM.
Reason: as stated
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.