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.

A kernel module is a collection of code that can be loaded into the kernel at runtime, without recompiling the kernel. Each one typically provides one "feature", such as a single device driver, file system, or communication protocol. Additionally, some modules provide library functions to aid in implementing other modules.

This tag covers questions about loading, configuring, and compiling kernel modules. Questions about which module to use for a particular piece of hardware should instead be tagged .

A module typically conforms to one or more well-defined interfaces -- usually one from the user-side of the module (e.g., the Unix read/write/ioctl interface) and one or more from the upstream-side of the module (e.g., the USB I/O subsystem interface).

1160 questions
129
votes
2 answers

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 error messages (oops and panics), and through…
109
votes
5 answers

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 available modules in the system? In which…
UserK
  • 2,334
  • 5
  • 21
  • 25
92
votes
6 answers

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: NVIDIA Corporation Device 0492 Kernel driver in…
JohnnyFromBF
  • 3,476
  • 10
  • 32
  • 42
91
votes
14 answers

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 suggested, an error message appears. ERROR: An…
Rodrigo
  • 1,732
  • 2
  • 16
  • 29
73
votes
4 answers

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 that?
Totor
  • 19,302
  • 17
  • 75
  • 102
52
votes
4 answers

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
  • 5,735
  • 15
  • 64
  • 113
45
votes
2 answers

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?
somethingSomething
  • 5,721
  • 18
  • 58
  • 98
34
votes
1 answer

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-storage driver. usbview output Vendor Id: xxxx Product…
linsek
  • 450
  • 1
  • 6
  • 12
34
votes
7 answers

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 to a system, but in this scenario one of the Linux…
the_Strider
  • 485
  • 1
  • 6
  • 10
27
votes
5 answers

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 will reboot. This system is overclocked, but very…
Naftuli Kay
  • 38,686
  • 85
  • 220
  • 311
26
votes
6 answers

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/modules/$(shell uname -r)/build M=$(PWD)…
24
votes
3 answers

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 Module.symvers anywhere! When I search for "generate…
sdaau
  • 6,668
  • 12
  • 57
  • 69
24
votes
2 answers

BSD Kernel Vs. Linux kernel?

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 multiple tools to edit the kernel config such as…
r004
  • 3,339
  • 8
  • 29
  • 51
22
votes
1 answer

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 from CommandNotFound import CommandNotFound File…
Retsek
  • 343
  • 2
  • 5
22
votes
3 answers

Is developing/testing a linux module safe using a virtual machine?

I'm in an operating systems class. Coming up, we have to do some work modifying kernel code. We have been advised not to use personal machines to test (I suppose this means install it) as we could write bad code and write over somewhere we…
entimaniac
  • 323
  • 1
  • 6
1
2 3
77 78