Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 2849

General Questions • Re: [Software] debian12.7 systemd will modprobe some module I have not ask it to modprobe

$
0
0
Hello,
These modules(20~30 moudles) is created by myself. Now I find they will be modprobed by systemd(I am not sure which service cause it). I have disbaled systemd-modules-load.service but it not works. [..] Do you have any idea about which service or udev-rule will cause that?
According to this reference from Suse documentation:
The kernel bus drivers probe for devices. For every detected device, the kernel creates an internal device structure while the driver core sends a uevent to the udev daemon. Bus devices identify themselves by a specially-formatted ID, which tells what kind of device it is. Usually these IDs consist of vendor and product ID and other subsystem-specific values. Every bus has its own scheme for these IDs, called MODALIAS. The kernel takes the device information, composes a MODALIAS ID string from it and sends that string along with the event. For a USB mouse, it looks like this:

Code:

MODALIAS=usb:v046DpC03Ed2000dc00dsc00dp00ic03isc01ip02
Every device driver carries a list of known aliases for devices it can handle. The list is contained in the kernel module file itself. The program depmod reads the ID lists and creates the file modules.alias in the kernel's /lib/modules directory for all currently available modules. With this infrastructure, module loading is as easy as calling modprobe for every event that carries a MODALIAS key. If modprobe $MODALIAS is called, it matches the device alias composed for the device with the aliases provided by the modules. If a matching entry is found, that module is loaded. All this is automatically triggered by udev.
Therefore, when the kernel detect a device whose kernel module is a "loadable kernel module" (a not statically compiled kernel module), that it notifies it to udev that create the device in the device tree and loads the kernel module.

Statistics: Posted by Aki — 2024-09-24 22:41



Viewing all articles
Browse latest Browse all 2849

Trending Articles