Questions tagged [kernel-modules]

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 feature such as a filesystem.

Filter by
Sorted by
Tagged with
4 votes
2 answers
6k views

Debian does not detect serial PCI card after reboot

I have installed a PCI card with two serial and one parallel port on it. the chipset is MCS9865. I downloaded the latest driver(V1.0.12) from here. I ran make and make install. now the two serial ...
Majid Azimi's user avatar
  • 3,098
131 votes
2 answers
193k views

What is a tainted Linux 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 ...
bwDraco's user avatar
  • 3,273
56 votes
4 answers
107k 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.
TheMeaningfulEngineer's user avatar
17 votes
2 answers
17k views

Are driver modules loaded and unloaded automatically?

On Ubuntu 14.04, I found that when I don't plug in my external wireless adapter, its module rt2800usb is still shown in lsmod. when does automatically loading a driver module happen? Is it when the ...
Tim's user avatar
  • 102k
97 votes
14 answers
229k views

How to unload kernel module 'nvidia-drm'?

I'm trying to install the most up-to-date NVIDIA driver in Debian Stretch. I've downloaded NVIDIA-Linux-x86_64-390.48.run from here, but when I try to do sudo sh ./NVIDIA-Linux-x86_64-390.48.run as ...
Rodrigo's user avatar
  • 1,832
92 votes
6 answers
101k 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: ...
JohnnyFromBF's user avatar
  • 3,496
75 votes
4 answers
100k 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 discover ...
Totor's user avatar
  • 20.1k
28 votes
5 answers
149k 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 ...
Naftuli Kay's user avatar
  • 39.7k
116 votes
5 answers
329k views

How to list all loadable kernel modules?

I'm looking for a few kernel modules to load i2c-dev and i2c-bcm2708. But the modprobe command returns: sudo modprobe i2c-dev modprobe: module i2c-dev not found in modules.dep How do I list all the ...
UserK's user avatar
  • 2,424
34 votes
1 answer
60k 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 usb-...
linsek's user avatar
  • 450
13 votes
2 answers
13k views

How to block drivers built-into Kernel, i.e. drivers who are not a module

I configured and compiled Linux kernel with nouveau driver built-into kernel, i.e. with <*> as opposed to <M> when doing make menuconfig inside Linux kernel source directory. Now, I ...
Megidd's user avatar
  • 1,559
12 votes
2 answers
34k views

What is the sequence loading linux kernel module on startup? How priority is set to them?

I have a Linux kernel module which I compiled dynamically. How is it added to startup? There are lot of .ko files in /lib/modules. How is priority set for loading these modules?
ganeshredcobra's user avatar
5 votes
1 answer
10k views

Are Modules listed under /sys/module all the Loaded Modules?

I'm wondering if I can use the directory listing of /sys/module instead of lsmod to get a list of currently loaded modules. Is that the list of loaded modules only? Or maybe that combined with /sys/...
Kyle Brandt's user avatar
1 vote
2 answers
2k views

Debian Jessie Wireless Driver Broadcom Restart (rmmod modprobe) BCM43142 [14e4:4365]

My Dell laptop, running Debian 8 (Jessie), has this wireless device: $ lspci -nn -d 14e4: 02:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01) And it ...
John Lawrence Aspden's user avatar
45 votes
2 answers
102k views

systemd: automate modprobe command at boot time

My distribution is Fedora 17 Gnome. Every time I reboot/restart my computer I need to run this command as root: modprobe rt2800usb How can I make it permanent?
34 votes
7 answers
38k views

Is USB-to-USB data transfer between two Linux OSes possible?

I want to create a USB-to-USB data transfer system in Linux (preferably Ubuntu). For this I want to use no external hardware or switch (except this cable). It's going to be like mounting a USB drive ...
the_Strider's user avatar
28 votes
6 answers
64k views

WSL 2 does not have /lib/modules/

I have the source code of a hello world kernel module that works in Ubuntu 20 in a laptop. Now I am trying to compile the same code in Ubuntu 20 but inside WSL2. For that I am using this: make -C /sys/...
Carlos Garcia's user avatar
14 votes
1 answer
20k 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. ...
user avatar
13 votes
4 answers
11k views

Kernel module blacklist not working

I'm trying to figure out how to blacklist modules, and I'm trying it on the USB storage. Unfortunately it seems to have no effect, and I get the module in even if it's not used (apparently). My ...
bogdan.mustiata's user avatar
11 votes
1 answer
6k 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! ...
justdontdoit's user avatar
10 votes
1 answer
21k views

Cannot compile kernel: error, kernel does not support PIC mode

I have troubles recompiling my Kernel. Downloading the source package, decompress it and running fakeroot make-kpkg kernel_image leads me to the error [...] CHK include/...
user123456's user avatar
  • 5,028
9 votes
2 answers
15k views

How much strip(1)-ing is okay for kernel modules?

I regularly create packages for Slackware Linux and part of the process is stripping binaries so that they take up less space. I find that if I strip --strip-all (or strip with no options) kernel ...
amphetamachine's user avatar
9 votes
3 answers
62k 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: :...
gasko peter's user avatar
  • 5,514
8 votes
1 answer
7k views

Compile Linux kernel module without Module.symvers

I have this embedded Linux devices. I would like to add kernel-level functionality to it, but would highly prefer not to compile my own kernel to do so. (If the kernel doesn't load and get to user ...
Billy's user avatar
  • 665
7 votes
2 answers
8k 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 ...
mathematician1975's user avatar
7 votes
2 answers
18k views

Prevent usbhid from claiming USB device

Directly related: Prevent claiming of novelty usb device by usbhid so I can control it with libusb? I want to access an RFID reader (works as HID device) from a program that uses libusb-0.1. In the ...
AndiDog's user avatar
  • 241
6 votes
1 answer
11k views

Sign Kernel Modules

So i am on a debian buster 10 system and i installed virtualbox and i encountered an error which tells me to load some kernel modules manually. sudo ./vboxconfig [sudo] password for user: vboxdrv.sh: ...
programmer's user avatar
  • 1,027
6 votes
1 answer
16k views

Excluding kernel modules through /etc/modprobe.d/blacklist.conf does not work

I don't want to load the kernel module nouveau on my debian box at startup, so I put the following in /etc/modprobe.d/blacklist.conf: blacklist ttm blacklist drm blacklist nouveau I even did a ...
JohnnyFromBF's user avatar
  • 3,496
6 votes
2 answers
4k 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 part-of-the-...
rajaganesh87's user avatar
  • 1,057
5 votes
3 answers
7k views

What is iwlwifi's "lar_disable"?

I'm seeing a lot of posts reference lar_disable like this one for instance. I'm wondering what it does. modinfo iwlwifi just says, parm: lar_disable:disable LAR functionality (default: N) (...
Evan Carroll's user avatar
  • 30.9k
4 votes
2 answers
17k views

How to make EDID

I read the post here and I tried to make do with what I understood from the post but here are some questions: Where is the /lib/firmware located in for example /usr/src/linux/lib/firmware or /usr/lib/...
r004's user avatar
  • 3,459
3 votes
2 answers
5k views

Make Apple Keyboard Settings persistent in ../hid_apple/parameters/

i'm running Ubuntu 16.04 LTS and want to use an apple keyboard (wired). No i'm facing some problems whith making my custom settings permanent. I'm using the 'English internationl, AltGr dead keys' ...
Ian's user avatar
  • 53
3 votes
0 answers
843 views

r8169 stops working after a while

This issue appeared after the CentOS installation. Server becomes unavailable completely neither through ssh nor through smb protocol. It happens randomly and there is no exact regularity. It can ...
Robert's user avatar
  • 75
3 votes
2 answers
1k views

Why Linux module API isn't backward compatible?

Why isn't the Linux module API backward compatible? I'm frustrated to find updated drivers after updating the Linux kernel. I have a wireless adapter that needs a proprietary driver, but the ...
Akib Azmain Turja's user avatar
2 votes
1 answer
176 views

Am I making invalid assumptions with regard to my kernel module's shared memory?

I have written a "device driver" (see source code here: https://bitbucket.org/wothke/websid/src/master/raspi/websid_module/ ) that runs fine for most of the time (see https://www.youtube.com/...
wothke's user avatar
  • 21
2 votes
2 answers
2k views

What ELF types do kernel itself and kernel modules have?

https://linux-audit.com/elf-binaries-on-linux-understanding-and-analysis/ says The type field tells us what the purpose of the file is. There are a few common file types. CORE (value 4) DYN (...
Tim's user avatar
  • 102k
2 votes
1 answer
2k views

Want to install VirtualBox Guest Additions on CentOS 7 but get a header mismatch

I try to install VirtualBox Guest Additions on a CentOS 7 VM. I installed the prerequisites via sudo yum install perl gcc dkms kernel-devel kernel-headers make bzip2 then I "inserted" the Guest ...
halloleo's user avatar
  • 567
1 vote
1 answer
13k views

How do I fix a "module not found" error?

I want to get a bluetooth-usb-stick running. In the terminal, I enter sudo modprobe btusb, but the output is: FATAL: Module btusb not found in directory /lib/modules/5.11.0-25-generic. I am on a ...
LeonTheProfessional's user avatar
24 votes
2 answers
26k 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 ...
r004's user avatar
  • 3,459
22 votes
1 answer
9k views

Barely any commands work, no module named 'apt_pkg'

I don't know what I've done but basic commands like "ls" and "sudo" no longer work and now throw me this error message. File "/usr/lib/command-not-found", line 28, in <module> from ...
Retsek's user avatar
  • 343
19 votes
1 answer
92k views

Unable to load module: Disagrees about version of symbol module_layout

Following this tutorial to write my first driver. The Makefile is: # Makefile – makefile of our first driver # if KERNELRELEASE is defined, we've been invoked from the # kernel build system and can ...
user2799508's user avatar
  • 1,712
14 votes
2 answers
13k views

How to restart a failed amdgpu kernel module

My video card crashes from time to time. It's quite annoying but I live with it -- usually I just restart the graphics with sudo systemctl restart lightdm.service, or if needed reboot the whole system....
Dejan Jovanović's user avatar
13 votes
1 answer
57k views

Is "update-initramfs -u" needed after adding or removing a module with "modprobe"?

Most instructions that I find online about adding or replacing kernel modules in Ubuntu only mention modprobe and rmmod. However, according my experience with e1000e, the modification is reverted ...
Alexey's user avatar
  • 1,988
11 votes
3 answers
9k views

How do I disable I2C Designware support when it's not built as a module?

I have an Alienware Aurora R7, running Arch Linux. On shutdown, the kernel panics, with something like this in the panic message (omitting timestamps): BUG: Unable to handle kernel NULL pointer ...
muru's user avatar
  • 73k
11 votes
1 answer
89k views

insmod: ERROR: could not insert module 8188eu.ko: Invalid module format

I'm trying to use the TL-WN725N as an USB WiFi-Adapter with Fedora 20. I followed these insructions and the adapter worked fine and even survived two updates during the last few weeks. Then I did a ...
Merlin's user avatar
  • 235
10 votes
1 answer
8k views

Sound not working when both the sound card and HDMI use the Intel HDA driver. How to exchange their device loading order?

I have an Acer Aspire One 522 netbook which has an Intel HDA sound card based on the Conexant CX20584 chipset. Although KDE does output sound when starting up, flash and probably many other apps which ...
Claudio's user avatar
  • 572
9 votes
1 answer
4k views

Get all ioctl code and which module they map

By doc. , ioctl signature is int ioctl(int fd, int request, ...) . request is the code of ioctl. Is there any way to know what are all the possible ioctl request code that available in my linux? And ...
Keystone's user avatar
  • 231
9 votes
1 answer
3k views

Calling Linux kernel methods from a kernel module

What is the right way of calling kernel functions in a C file from a kernel module in Linux? I want to call exit_task_namespaces in linux/nsproxy.c from my first ever kernel module I am doing this: #...
Carlos Garcia's user avatar
9 votes
2 answers
5k views

lsmod shows -2 in the “Used by” column

This is what happens when i run lsmod on an arm board (banana pi) running on kernel 4.3.0 # lsmod Module Size Used by async_raid6_recov 1434 -2 async_pq 5548 -...
mijondano's user avatar
8 votes
1 answer
3k 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 ...
Naftuli Kay's user avatar
  • 39.7k