Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have acquired a new wireless keyboard, and I've tested it out on both a Windows and a Linux box.

It worked on both, but with an initial difference - Windows took a minute or two, to look up the keyboard's (Logitech's) drivers on the Internet and install them. It visually notified my of doing so and displayed its progress.

However, when I plugged it into my Debian computer - I did not notice such a progress. Also, I was almost immediately able to use it, and I'm not sure how it got working so fast.

Is Linux using a combination of a generic Bluetooth dongle driver and a generic keyboard driver?

share|improve this question
1  
Your system log should be contain information about the events that occurred when you attached the keyboard. Check dmesg or, if it wasn't very recently, /var/log/messages. –  tripleee Jul 9 '13 at 21:04
1  
What's more baffling is that Windows insists on looking for drivers for every single piece of equipment you attach; sometimes, it seems, every time you attach it. –  tripleee Jul 10 '13 at 4:45
    
@tripleee - exactly. I attached the dongle to another port. Can you guess what happened? Yes, another two minutes of installing the exact same drivers - again. WTF? –  jco Jul 10 '13 at 19:08

1 Answer 1

up vote 7 down vote accepted

Linux hardware drivers are kernel modules. Because of the open source model and licensing of the kernel, very few of these are written by hardware manufacturers; most of them are reverse engineered or based on standardized public protocols. Pretty sure bluetooth is in the later realm, and also that things like mice and keyboards are in most cases totally generic.

The modules are part and parcel of the kernel source tree; i.e., if you download the linux kernel source, it comes with the code for all the available modules. You do not have to include all of them when you build it, of course.

Linux distros (generally) are a collection of pre-built binaries, and this includes the kernel. The kernel itself is one binary; modules may either be built into this, or separate binaries which the kernel can load and unload. Since building all the available modules into the one binary would result in a massive and ridiculous kernel, and the distros want to cover as much hardware as possible, distro kernel packages include a broad array of individual binary modules.

You can see these in /lib/modules. Driver modules are registered with the kernel and built at the same time; the kernel is aware of what is available on the system. When you plug in some new hardware, it identifies itself to the system and the kernel chooses an appropriate driver from /lib/modules to load.

You can see all your currently loaded modules with lsmod.

share|improve this answer
2  
For specialized hardware, you might have to compile a module from source. Distros try to make this reasonably straightforward, but you need the sources (or at the very least the headers) for your specific kernel version. –  tripleee Jul 10 '13 at 4:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.