Use this tag for questions about loading, configuring, or compiling them. See also /drivers for questions about which modules to use for specific hardware. A kernel module is a bit of code that can be added into the kernel by the administrator while the system is running, typically providing one ...

learn more… | top users | synonyms

21
votes
4answers
618 views

How to find the driver (module) associated with a device on Linux?

On Linux, given: a device, for example /dev/sda, and its major and minor numbers, for example 8, 0, how can I know which module / driver is "driving" it? Can I dig into /sys or /proc to ...
21
votes
5answers
8k views

What is the difference between kernel drivers and kernel modules?

When I do a lspci -k on my Kubuntu with a 3.2.0-29-generic kernel I can see something like this: 01:00.0 VGA compatible controller: NVIDIA Corporation G86 [Quadro NVS 290] (rev a1) Subsystem: ...
17
votes
1answer
10k views

How to assign USB driver to device

This question is two-fold: First, how do you manually detach a driver from a USB device and attach a different one? For example, I have a device that when connected automatically uses the ...
9
votes
3answers
5k views

Mount printers at /dev/usb and still use CUPS

Due to a new version of CUPS, I suddenly lost the direct path to my printers that was previously available under /dev/usb/lpXXX. I used this to print directly from the command line. echo "test" > ...
8
votes
5answers
3k views

Benefit of kernel module compiled inside kernel?

What's the benefit of compiling kernel modules into the kernel (instead of as loadable modules)?
7
votes
4answers
20k views

Determining cause of Linux kernel panic

I'm running an Ubuntu 12.04 derivative (amd64) and I've been having really strange issues recently. Out of the blue, seemingly, X will freeze completely for a while (1-3 minutes?) and then the system ...
7
votes
2answers
3k views

Find out which modules are associated with a usb device?

Could you recommend a way to figure out which driver is being used for a USB device. Sort of a usb equivalent of lspci -k command.
7
votes
2answers
2k views

How do I debug a kernel module in which a NULL pointer appears?

I have a custom kernel module that I compiled from this patch that adds support for the logitech G19 keyboard among other G series devices. I compiled it just fine against Ubuntu's maverick kernel's ...
7
votes
2answers
2k views

How to block loading kernel module only in single user boot when blacklist fails?

On a "Linux debian 2.6.32-5-amd64 #1 SMP" installation where loading a kernel module (mpt2sas) is desired to be delayed to be loaded after starting sshd and users can remotely login, the mpt2sas ...
7
votes
1answer
4k views

Webcam on Angström

I am running Angström on my BeagleBoard-xm. I want to use a webcam (I have Microsoft LifeCam Cinema and Logitech C310). I installed v4l-utils, libv4l-dev and kernel-module-uvcvideo with opkg. But the ...
6
votes
1answer
911 views

How to disable keyboard?

Without unplugging my keyboard I'd like to disable it from the terminal; I was hoping that this could be done using rmmod but based on my currently loaded modules it doesn't look like it is possible. ...
6
votes
3answers
2k views

Linux Kernel logical address space organisation

According to "Write Great Code" in almost all OS run time memory is organized into following regions: OS | Stack | Heap | Text | Static | Storage/BSS [In increasing address fashion] User ...
6
votes
1answer
43 views

What Linux kernel features does os-prober require to find a Windows 8 installation?

I built a new custom Linux kernel using make localmodconfig and after booting the new kernel, update-grub doesn't detect my Windows 8 installation. My distro kernel (with tons of modules I don't ...
6
votes
1answer
182 views

How's a module approved to be included into the linux kernel?

I'm now compiling the linux kernel 2.6, and finding there are more than 1,000 modules in total. How is a module approved to be included into the linux kernel?
6
votes
2answers
2k views

What does mkinitrd change when it adds kernel modules to the initrd?

When creating an initrd using mkinitrd (CentOS 5.5), the kernel modules it adds to the initrd get modified in the process. For example, the initrd's /lib/sata_via.ko is not binary identical to ...
6
votes
1answer
583 views

Grubby fatal error in Linux kernel installation

I have compiled Linux kernel 2.6.24.6 from source (without problem) and tried to install it. Specifically, after unpacking the Linux source code, I did make && make modules to compile. ...
5
votes
4answers
2k views

Best way to get into Kernel programming?

Not so much asking what books (although if you know of any guides/tutorials that'd be helpful) but what is the best way to start doing kernel programming and is there a particular distro that would be ...
5
votes
1answer
569 views

Linux: What is a tainted kernel?

Under certain conditions, the Linux kernel may become tainted. For example, loading a proprietary video driver into the kernel taints the kernel. This condition may be visible in system logs, kernel ...
5
votes
3answers
955 views

Disadvantages of linux kernel module?

I am trying to understand the disadvantages of using Linux kernel modules. I understand the benefits of using them: the ability to dynamically insert code into a running system without having to ...
5
votes
4answers
3k views

How to determine which module taints the kernel?

My kernel keeps panicking when connected to a certain wireless network. I'd like to send a bug report but my kernel is apparently tainted. From /var/log/messages: Apr 17 21:28:22 Eiger kernel: ...
5
votes
1answer
1k views

Custom kernel: fails to load firmware when module built-in

I'd like to have all my modules built-in, but this fails with iwlagn: iwlagn 0000:03:00.0: request for firmware file 'iwlwifi-6000-4.ucode' failed. iwlagn 0000:03:00.0: no suitable firmware found! ...
5
votes
2answers
1k views

What package could “linux-headers-3.7.5-1-ARCH” mean?

I'm debugging a closed-source software installer that seems to have some pre-conceived notions about my distribution. The installation aborts after not finding apt-get. The command it attempts to run ...
5
votes
1answer
9k views

How to generate Module.symvers?

I recently went through Unpacking kernel-source rpm off-system (OpenSuse)?; and as it took > 10 h on my machine, imagine my surprise that after doing the process described there, I find no ...
5
votes
1answer
543 views

What are EXT4 Security Labels?

During Gentoo installation of Gnome keyring, I am told to switch on EXT4 Security Labels, which is described in the kernel documentation by: Security labels support alternative access control ...
5
votes
2answers
330 views

Unclaim a device

So I am using Ubuntu and trying to use some hardware which I had some problems with before. The problem before was that the company who made my hardware sold their internal parts to another company ...
5
votes
1answer
2k views

ALSA/ASoC: How to correctly load devices/drivers?

I am using Buildroot to build an embedded Linux (2.6.39.2) system for the NXP LPC3250 microcontroller. Right now, I'm trying to get ALSA/ASoC up and running, but I'm having some issues with getting ...
5
votes
1answer
340 views

Loading speedstep_centrino kernel module

Because of a noisy fan in my laptop, I need to change CPU frequency and for this task I need to load the appropriate kernel module. The CPU in my laptop Acer TravelMate 4002WLMi is: $ cat ...
4
votes
1answer
795 views

Booting without initrd

Is it possible to boot linux without a initrd.img ? I am planning to add default drivers as a part-of-kernel itself and avoid initrd completely. What are the modules that should be made ...
4
votes
2answers
732 views

Kernel Modules: .o vs .ko

It seems that files containing kernel modules are called .o, at least that's what I figure when looking at a tutorial like this one. However, on my debian squeeze box, these files seem to be called ...
4
votes
2answers
740 views

List unused module

Is it possible to list down unused modules? lsmod would only list down dependency by modules, right?
4
votes
1answer
1k views

How to build a custom kernel with localmodconfig that support hardware of multiple machines?

When configuring a server to run a single task, like an appliance, there might rise the need to build a custom kernel. For example to save disk space. Ubuntu Core 13.10 amd64 root filesystem is a ...
4
votes
2answers
61 views

Trigger an init script when a specific device is up and a kernel module has been loaded

On my ubuntu 12.04 servers, I need to write an init.d script that waits until the infiniband interface (device: mlx4_0, interface: ib0) is completely up, and until the knem kernel module is loaded. ...
4
votes
2answers
2k views

Can I detect if my custom made kernel was built with module support?

I have been provided with a vendor supplied minimal linux installation. From an answer to a previous question I discovered that it is possible to build a kernel with or without module support. I have ...
4
votes
2answers
13k views

How to solve “building the main Guest Additions module Failed”

I tried to install the VirtualBox Guest Additions module in a VM guest running CentOS but I get this error message when everything else was okay: building the main Guest Additions module Failed ...
4
votes
1answer
434 views

When should I keep debugging symbols in kernel modules?

When installing kernel modules, I have the option to strip out debugging symbols using INSTALL_MOD_STRIP=1. This saves significant disk space. Does it also save memory? Why should one keep the ...
4
votes
3answers
7k views

How to remove kernel module if it's still in use?

[rootSERVER ~]# rmmod -f cifs ERROR: Removing 'cifs': Resource temporarily unavailable [rootSERVER ~]# modprobe -r cifs FATAL: Module cifs is in use. [root@SERVER ~]# lsb_release -a LSB Version: ...
4
votes
1answer
1k views

How to know whether the Linux driver for the real-time network device was built into the kernel?

From here: http://www.xenomai.org/index.php/RTnet:Installation_%26_Testing#Debugging_RTnet The Linux driver for the real-time network device was built into the kernel and blocks the hardware. ...
4
votes
2answers
335 views

How to debug an inserted kernel module?

I would like to debug a loaded kernel module I don't have the source code to; I suspect it's a virus. Is there a way to feed it into GDB for analysis?
4
votes
2answers
535 views

kernel module function call

I write a kernel module which has initialize and end function. I want one more function and want to call it from the user space process at any time i want. Is it applicable ? If so, how ? I am ...
4
votes
1answer
465 views

Automatically apply module patch and compile kernel when updated?

I've recently applied a one-line patch to drivers/bluetooth/btusb.c in order to enable compatibility with my Bluetooth device. However, whenever I get a kernel upgrade, the patch will be lost until ...
4
votes
1answer
647 views

FedUp, unable to upgrade to Fedora 20

I am upgrading my Fedora OS to the latest version 20 as the current one is nearing end of life. Fedora introduces a new upgrade method called FedUp that allows user to perform an upgrade over the ...
4
votes
2answers
207 views

How can I prevent iptables from counting bytes and packets on empty chains?

Background I occasionally have firewall rules that I need to use for maintenance windows, but don't want active (and therefore consuming CPU cycles or slowing the network interface) the rest of the ...
4
votes
3answers
264 views

Why do I need to comment out the floppy in /etc/fstab in new-ish Debian versions?

I'm using a box with Debian that has gone through many updates (at least lenny, squeeze, wheezy). After a long time, I wanted to mount a floppy again which didn't work as it used to. I found a ...
3
votes
2answers
2k views

Why does modinfo say “could not find module”, yet lsmod claims the module is loaded?

According to the man page of lsmod the command shows “what kernel modules are currently loaded”. I wrote a script that uses modinfo to show what kernel object (.ko) files are actually in use: ...
3
votes
2answers
2k views

Adding a new System call to Linux 3.2.x with a loadable kernel module [closed]

I want to add a particular new system call in the linux kernel 3.2.x but as a loadable kernel module (as I don't want to recompile the kernel again and again) I read through many posts on internet ...
3
votes
1answer
135 views

How to submit a Linux module upstream?

I've written a useful kernel module for a specific fan controller that I want to submit upstream. Where can I find an address to submit my module? Do I need it make GPL or can I use a less ...
3
votes
2answers
278 views

“Linux supports the dynamic loading of kernel modules. ”

I read in a book written by Robert Love that: Linux supports the dynamic loading of kernel modules. He said this is the difference between Linux and Unix, but I seem to recall there is also KLD ...
3
votes
2answers
1k views

BSD Kernel Vs. Linux kernel? [closed]

I wanted to know in technical terms; what is the difference between BSD Kernel and Linux Kernel. In Linux, we can download the source kernel then patch it and make and make modules it. Even we have ...
3
votes
2answers
169 views

Using multiple layer of kernel modules for interfacing a hardware device?

I am trying to get a conceptual understanding of the purposes the kernel modules can have. The motivation for this question was a realization that interface to an actual hardware goes through multiple ...
3
votes
2answers
1k views

How do I build the iptables kernel module for a loaded kernel?

I've built a kernel with loadable module support for various reasons, one of them the possibility to compile modules and load them without rebooting. This is supposed to be useful when I need a module ...