date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,631,655,996,000 |
What is the difference between these two modules
pcspkr: PC-Speaker driver
snd_pcsp: PC-Speaker driver
different tutorials call for different ones
|
pcspkr is the standard module; it allows you to control the PC speaker via the input layer. The canonical symlink is /dev/input/by-path/platform-pcspkr-event-spkr. You can send events to the speaker by writing to it (most other input devices will produce events, which you read from the input device node). The PC speak... | Linux modules for PC speaker: pcspkr vs snd_pcsp |
1,631,655,996,000 |
The EDID sent by my monitor when directly connected to my graphic card is ok, I dumped it in /lib/firmware/edid/viewsonic.bin.
I want to access my monitor through a KVM-switch, an HDMI-audio-extractor and an HDMI splitter. With that setup, the EDID received by my computer is broken, and even the UEFI can't detect my s... |
I got an answer on IRC from #intel-gfx on freenode.
The problem is that i915 module as well as others are calling the drm_(do_)get_edid which ignores the edid firmware given to the drm_kms_helper.
There exists a patch for linux (I applied it to linux 4.12 with minor conflict resolution) to change that behavior. It req... | How to force HDMI audio (intel card) to be enabled despite receiving broken EDID |
1,631,655,996,000 |
I'm trying to build kexec as a module, but I'm running into a weird problem. My obj-m is:
obj-m += kexec.o machine_kexec.o relocate_kernel.o
When I run the makefile, it complains that there's "no rule to make target relocate_kernel.c, needed by relocate_kernel.o"
How should I be telling it to include the assembly f... |
As always, RTFM. Answering this and leaving it up to help others that may come across this. Per the Linux documentation project, I was using obj-m wrong:
Sometimes it makes sense to divide a kernel module between several source files.
Here's an example of such a kernel module.
[ Source files ... ]
And finally, th... | Assembly files in obj-m list when building kernel modules |
1,631,655,996,000 |
Some articles say that modules/drivers belong to kernel space as it take part in forming the kernel; (reference: http://www.freesoftwaremagazine.com/articles/drivers_linux)
While others say that only Ring0(directly interact with hardware)can be called kernel space(excluded modules/drivers as they are at Ring2). (ref... |
On AMD64 and clones, and ix86, Linux uses only ring 0 and 3. No other common architecture has the "rings" anyway, so using them fully would be totally non-portable. Besides, Linux is monolithic. The whole ring idea is to be able to run the microkernel on ring 0, and have service processes run on higher rings so they c... | Does linux modules/drivers belong to kernal space or user space |
1,631,655,996,000 |
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 that I had not enabled in the kernel config.
Now, with drivers like nouveau, it's as easy as going to the source direc... |
Just go to your kernel source directory, make the changes you want, and make, then make modules_install.
That's all it takes.
If you want to build only one specific module, use:
make M=path/to/module/directory
For instance (from the kernel toplevel directory):
make M=fs/ext4
make M=fs/ext4 modules_install
To activat... | How do I build the iptables kernel module for a loaded kernel? |
1,631,655,996,000 |
In kernel versions 2.X through 4.X, you could have easily overwritten the 16th CR0 bit in kernel modules with:
write_cr0(read_cr0() & (~ 0x10000));
This way it used to remove the write protection on the syscall table. Now, on versions 5.X, however, this doesn't seem to overwrite the CR0 bit. If you try hijacking the ... |
Yes, sensitive bits in CR0 and CR4 are pinned since version 5.3, at least via write_cr0 and write_cr4. Your code fails because the write_cr0 call doesn’t clear the WP bit.
If you’re in supervisor mode, you can always write CR0 directly, which should avoid the pinning; but the pinned bits will be restored the next time... | Does Linux kernel since version 5.0 have a CR0 protection? |
1,631,655,996,000 |
I want to add a public key from the keypair that I used to sign my kernel module, into system_keyring. However, there's a problem:
With the command of cat /proc/keys | grep system_keyring, I've got the entry (ID) of system_keyring. However, when trying to add my public key with this command: keyctl padd asymmetric "" ... |
The system keyring gets its contents from five sources:
keys embedded in kernel at compile time (obviously not changeable without recompiling)
UEFI Secure Boot variable db - depending on your firmware, you might or might not be able to change this
UEFI Secure Boot variable dbx- as the previous one, but this is a blac... | How to add a public key into system keyring for kernel without recompile? |
1,631,655,996,000 |
I am compiling linux kernel on Debian Stretch:
cd linux-4.9.59/
make menuconfig
make
so far so good.
normally, I would then issue make modules_install, to copy the modules to /lib/modules/.
But this kernel is intended for another machine, so I don't want to copy the modules locally. Besides, I am not compiling as roo... |
To answer your question, this should work. The System.map was created in the just-built source directory and is required:
$ depmod -b "$INSTALL_MOD_PATH" -F System.map 4.9.59
Where 4.9.59 is your new non-running kernel's version.
Now, even the plain vanilla linux kernel source allows to build debian packages.
$ make... | kernel compilation: generate modules.dep and map files |
1,631,655,996,000 |
I apologize if the query is too simple. But I want to ask is there a difference between linux system modules and linux kernel modules. If there is a difference then where are both located. Is it that /lib/module/$(uname -r) shows kernel modules and /sys/module/ shows system modules
|
The directory /sys/module/ shows all modules in the system by their name as folders with diverse information needed by the system. The directory /lib/module/$(uname -r) contains the kernel module files, stored in a folder hierarchy according to their function.
For example, the Software Watchdog kernel module file woul... | difference between /lib/module/$(uname -r) and /sys/module |
1,631,655,996,000 |
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 kernel modules.
For example, the USB gadget driver has multiple kernel modules, where only one is used to actually com... |
What is the reason of implementing this "kernel module stack" structure?
This is the way pretty much all software is written, in modular stacks. Consider your GUI: there's all the kernel space stuff involved including a driver stack, then in userspace you have the X server, and on top of that a window manager, and ... | Using multiple layer of kernel modules for interfacing a hardware device? |
1,631,655,996,000 |
I've added few modules into mkinitcpio.conf.
Are they automatically loaded at kernel boot or with udev if I don't specify them in modules list in rc.conf?
|
The modules listed in /etc/mkinitcpio.conf are included in the intitrd when it is generated with mkinitcpio -p linux. This loads the temporary filesystem into memory, and needs to include modules necessary to create this successfully, depending on your setup.
An example would be adding raid1 to your modules line in /e... | Do I have to list modules in both `/etc/mkinitcpio.conf` and `/etc/rc.conf`? |
1,631,655,996,000 |
After I updated my Kernel to version 3.0, i always get this line when my Arch-Linux system is booting up:
Loading User-specified Modules [BUSY] [FAIL]
I have no idea what could cause this to happen. My MODULES-array in the /etc/rc.conf-file looks like this:
MODULES=(fuse wl !b43 !ssb !usblp vboxdrv vboxnetflt)
... |
Blacklisting of modules in the MODULES array is deprecated, as announced here. Perhaps this is the cause.
| Problem at boot-time: "Loading user-defined modules [FAIL]" |
1,631,655,996,000 |
I'm unable to setup host-only network in virtualbox suddenly , please see my screenshot , there's no entry in "Name" comboBox
|
In the main window of VirtualBox go to File->Preferences, select Network and click the icon on the right, showing a card with a + sign.
| VirtualBox host-only network suddenly stopped working , no interface available inside |
1,631,655,996,000 |
OS: Ubuntu 18.04.3
Kernel: 5.3.8
Hi guys :)
I'm trying to create bunch of HID gadgets by using configfs.
It was successful until setting up fourth gadget,
but kernel emits error message during creation of fifth gadget.
Error message was as below.
# 4 successive gadget creation
g_mouse1 : /dev/hidg0
g_mouse2 : /dev/... |
Yes, you can only create 4 HID gadgets, and it's a hard-coded limit: the only way to bypass it is by modifying the code and recompiling the usb_f_hid.ko module.
This limitation has to do with how Linux allocates dynamic major/minor numbers for the /dev/hidg# devices.
From drivers/usb/gadget/function/f_hid.c:
#define H... | Is there a limit to the number of USB gadget can be created with configfs? |
1,631,655,996,000 |
I'm trying to manually create my own custom usb drive, with a bunch of iso files on it, and a partition for data. I used the instruction I put here to create my key, but to sum-up, I have done
a partition /dev/sda1 for data
a partition /dev/sda2 that has grub installed
a partition /dev/sda3 that contains my iso files... |
It seems that it isn't grub related or that your conf is at fault; it seems that it is Debian related, based on this article and citing textually:
Now the first time I tried to boot the most recent Debian installer this way, I ran into a bit of a problem. It turns out that the initrd that comes on the ISO itself does... | Manually create grub entry for iso debian file : cannot copy cdrom |
1,631,655,996,000 |
Linux 3.17 has a commit which supports hotplug of thunderbolt of non-chained thunderbolt devices. But what does "non-chained thunderbolt devices" mean? Is a thunderbolt to ethernet adapter a chained or non-chained device? How about a thunderbolt to display port adapter?
|
See Apple's promo page for info about Thunderbolt. It also describes how you can chain devices together instead of needing a hub or similar. My impression is that hot-plugging such daisy-chained devices are what are not supported by the linux commit; only single devices, whatever type they are.
| linux 3.17 supports hotplug of thunderbolt of non-chained thunderbolt devices -- what is this? |
1,631,655,996,000 |
I have found a number of examples how to prevent a kernel module from being loaded. One of them is about USB storage module. The next code has been provided:
echo "blacklist usb-storage" | sudo tee -a /etc/modprobe.d/blacklist.conf
then I decided to check the name by lsmod, so I plugged a USB stick in and found it to ... |
The module names may contain both - and _ . Both symbols can be interchanged while using with modprobe or lsmod and also in the conf files in /etc/modprobe.d/ .
So that means you can use any of usb_storage or usb-storage for blacklisting.
| Which kernel module name is currently correct "usb-storage" or "usb_storage"? |
1,631,655,996,000 |
I am running AlmaLinux 9 (RedHat 9 clone) and have compiled a new kernel module. I am running in a VM with UEFI and secure boot enabled. When I insert the module I get the following error:
insmod: ERROR: could not insert module npreal2.mod: Key was rejected by service
From other posts I concluded it was related to ... |
Now (after a discussion in the comments) that you have a working but unsigned npreal2.ko kernel module, we can try tackling Secure Boot.
First, you need to create a X.509 key pair (a public key and a corresponding secret key) to use as a MOK. To do that, first create a minimal OpenSSL configuration file, as e.g. ~/x50... | Insmod causes key rejected by service |
1,631,655,996,000 |
How do I access a list of users/programs that accessed a certain module?
I run:
lsmod | grep ^uvcvideo
This returns this line when no application is using my video camera:
uvcvideo 86016 0
Well, I have something running that when "0" at the end of the line turns to anything but 0 (in practice this is ... |
Usually, there is no log file for this. There are tools you can use to make one though!
The kernel has a built-in tracepoint for the try_module_get() function. That's the function that increases the reference count of a module. This tracepoint is in the module subsystem and is called module_get.
https://stackoverfl... | Find what program accessed a kernel module |
1,530,975,852,000 |
The Scenario
I'm trying Kernel Programming for Linux, where I've created module, Inserted, Removed and checked it's output in dmesg as well
The Problem
When I have inserted module, I can verify that it is inserted successfully by firing lsmod. Yet, when I fire modinfo it returns an error saying it isn't present there.... |
modinfo by default searches in /lib/modules/<kernel-version>. So you would have to copy your kernel module in a subdirectory in there. Most likely /lib/modules/<kernel-version>/extra.
After copying your module in the right place, you also should execute depmod -a.
| modinfo does not return self inserted module's information |
1,530,975,852,000 |
I am attempting to run a process located in /usr/bin from a kernel module, and I am doing so using call_usermodehelper(). Within my module, I have:
int rc;
char *argv[] = {"/usr/bin/myProgram", NULL};
char *envp[] = {"HOME=/", NULL};
rc = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_EXEC);
printk("RC is: %i \n... |
After playing with it more and seeing some comments about needed to state environment variables explicitly since we are within the kernel, I changed my kernel module to look similar to this and the browser is now being opened with call_usermodehelper()
int rc;
static char *envp[] = {
"SHELL=/bin/bash",
"HOME=... | Issue running process from a Linux kernel module |
1,530,975,852,000 |
After upgrading my CentOS 7 kernel from 3.10.0 to 4.8.7, while rebooting the system I will get the following lines:
[ 0.641455] cpufreq: cpufreq_online: Failed to initialize policy for cpu: 0 (-19)
[ 0.641734] cpufreq: cpufreq_online: Failed to initialize policy for cpu: 1 (-19)
[ 0.641873] cpufreq: cpufreq... |
Are you using virtual machines or a hypervisor? If yes so, you should update your hypervisor host to the latest version so it can support the kernel version.
CPUFreq stands for CPU frequency scaling which enables the operating system to scale the CPU frequency up or down in order to save power.
I'm not sure why you're... | Kernel 4.8.7 failure on cpufreq - CentOS 7 |
1,530,975,852,000 |
I am using two devices, one of which requires usbserial for proper operation (a GPS, using gpsd; this guide specifies that usbserial is required), and one of which requires usbserial to be unloaded (the FTDI FT232H; this guide specifies that rmmod usbserial must be run to use the D2XX drivers).
Is there some way that ... |
You can use the unbind interface in sysfs. Please refer to this article for details. You will find instructions for automating the unbind upon discovery of the device in this answer.
| How to prevent a kernel module from opening a specific device? |
1,530,975,852,000 |
The Linux kernel documentation page for building external modules (https://www.kernel.org/doc/Documentation/kbuild/modules.txt) says this:
=== 2. How to Build External Modules
To build external modules, you must have a prebuilt kernel available
that contains the configuration and header files used in the build.
... |
ad 1. and 2. The kernel image is called vmlinux, that's right, but that's not what you actually need when you want to build external modules. It's the configuration and header files from this kernel that is needed.
ad 3. To build modules, internal or external, you need support for loadable modules in this kernel, you ... | Some questions regarding linux kernel external module build process |
1,530,975,852,000 |
We have strace to trace programs, ltrace for dynamic libraries, and others.
Is there any equivalent for kernel objects, as in tracing just like strace but for a specific .ko?
Thanks
|
You can use Ftrace. Ftrace is a tracing utility built directly into the Linux kernel. Checkout here for usage.
| Trace kernel object calls |
1,530,975,852,000 |
I have successfully followed the instructions for setting up 802.1q VLAN tagging in Fedora. Now I need to make sure that when I reboot the 8021q kernel module is loaded again.
Should I be doing this through /etc/sysconfig/modules as instructed here or should I be doing this through /etc/rc.modules as instructed here? ... |
As for Fedora, both methods will work, there is no guarantee to chose which one is preferable.
For Redhat/Centos, you should use /etc/sysconfig/modules, since when it's documented in Redhat documentation - Persistent Module Loading.
Another way you can use /etc/modules.conf in Redhat/Centos base distro. If you use Deb... | How do I persistently load a kernel module in Fedora 20? |
1,530,975,852,000 |
GRUB2 doesn't have the menu.lst file.
How do I configure a boot script.
During boot, I hit E on the kernel image that I want to modify and make my modifications. But I would prefer to make the modifications in /grub.d/ folder and then run update-grub command.
Basically, I am including certain modules at boot time, usi... |
The main config file is /boot/grub/grub.cfg. As it says at the top:
DO NOT EDIT THIS FILE
It is automatically generated by grub-mkconfig using templates
from /etc/grub.d and settings from /etc/default/grub
As you can see, /boot/grub/grub.cfg is generated by files from /etc/grub.d.
As mentioned in /etc/grub.d/README,... | GRUB2 Insert additional kernel modules |
1,530,975,852,000 |
I have an old 2.4 kernel based linux device using NIC Bonding. Instead of having the NIC Bonding module build as a module and modprobe'ed into the system, its compiled directly into the kernel. I'd like to modify the module parameters to add mode=1 miimon=100 in order to get it to not use round-robbin packet sending, ... |
I found it - but it's bad news, unfortunately. Here's what Documentation/networking/bonding.txt file for 2.4.37.11 says:
It is recommended
to configure the driver as module sinceit is currently the only way to
pass parameters to the driverand configure more than one bonding device.
So no module = no changing of para... | How can I pass module parameters for bonding driver when compiled into kernel 2.4? |
1,530,975,852,000 |
I recently had an issue where after boot, my keyboard would not work. I needed to plug it out and in again to use it.
The problem was that my usb went into autosuspend, which can be disabled with echo -1 >/sys/module/usbcore/parameters/autosuspend.
But now after some time working /sys/module/usbcore/parameters/autosus... |
It's not caused by updating your kernel -- it's simply caused by rebooting. /sys isn't a "real" filesystem on disk — it's direct access into kernel interfaces, but exposed as a virtual filesystem. As such, nothing is written anywhere that gets saved in a permanent way when you make changes to those files. (Or "files",... | how to make changes to /sys/module/*/parameters persistent? |
1,530,975,852,000 |
I previously was using VirtualBox on Fedora 30, but recently moved to using Boxes (review) and am quite happy with the switch. I've removed VirtualBox, but upon booting up my system, I still get a tainted kernel message:
vboxdrv: module verification failed: signature and/or required key missing - tainting kernel
I'v... |
Caveat: I don't have a Fedora system at-hand, so this is untested!
I would suggest removing the file /etc/modules-load.d/virtualbox.conf; it may be owned by a package, so check: dnf provides /etc/modules-load.d/virtualbox.conf and if needed, remove that package with: dnf remove (that package name).
As per this Fedora ... | How to remove VirtualBox vboxdrv kernel module? |
1,530,975,852,000 |
I am trying to learn about Linux device drivers. I am trying to install the module using insmod from the command line. After insertion, I try to remove the loaded module, which fails with the error,
could not remove module hello: Device or resource busy
I found this link but it doesn't seem to provide a valid answer... |
First of all , there is a return statement in your my_exit function which is causing this problem.
And as for unloading part, if you want to forcefully remove a module then you have to enable CONFIG_MODULE_FORCE_UNLOAD in the kernel. Otherwise, you have to restart your system.
| Not able to remove loadable module |
1,530,975,852,000 |
I need to create a test that would check if the driver for a specific device was a kernel module(as opposed to statically linked). Is there a way to know this information at run time? Thanks!
|
lsmod will list the currently loaded kernel modules. So, if a driver is not listed there then it was either built-in to the kernel or it isn't loaded. Most distributions should have a config file stored in their /boot directory, which contains the kernel configuration options that were used. If you were to download an... | Is there a way to know at runtime if a driver is a kernel module or if it was statically linked? |
1,530,975,852,000 |
If I have a Linux module that was compiled for kernel x, can I expect the compiled module to also work with kernel y or is that generally not the case?
|
In general, kernel modules are not loaded for other versions.
You can check the module information with the modinfo command.
The kernel version information of modinfo's vermagic and uname commands will help.
But if you really want to, the -f option of the modprobe command will help.(modprobe man page)
This option al... | Portability of kernel modules |
1,530,975,852,000 |
I have a 3rd party library which provides a kernel module (module.ko) and is required to be loaded automatically on bootup. However, module.ko is not tied to a specific version of the Linux kernel and can work across many versions.
Note I do not have the source for module.ko; it comes precompiled.
I am creating an RPM... |
Instead of a service to do the insmod you could provide a /lib/modprobe.d/mymodule.conf with the line
install mymodule insmod /path/to/mymodule.ko
I tried this and it worked ok on a fedora 22 using as an example the existing slip module.
$ cd /lib/modules/4.2.8-200.fc22.x86_64/extra/drivers/net/slip/
$ lsmod|grep sl... | How to load custom Linux kernel module that is not Linux kernel version dependant using RPM |
1,530,975,852,000 |
Suppose I set a tristate kernel configuration option to be built as a module, but I don't load the corresponding kernel module at runtime (and it doesn't get loaded automatically). Is the functionality of the resulting kernel equivalent to what it would be if I had disabled the option outright? Or is there some differ... |
Disabled compile time option means the code isn't compiled.
Unloading a module means, that the code has been compiled into a module, but is not loaded in memory and thus is not run. Be aware, that sometimes the modules may be loaded automatically, so if you need to disable certain functionality, the safe option is to ... | Is a disabled kernel option equivalent to not loading the corresponding module? |
1,530,975,852,000 |
The "How to Build External Modules" section of the kernel.org kbuild documentation ( https://www.kernel.org/doc/Documentation/kbuild/modules.txt ) says:
To build external modules, you must have a prebuilt kernel available
that contains the configuration and header files used in the build.
Also, the kernel must ha... |
It's an alternative to "using a distribution [...] package", which is synonymous with having "the configuration and header files" available.
You should include a .config before you do this. Most distro kernels have this available in /proc/config.gz; copy that into the top of the source tree and
gunzip -c config.gz >... | linux kernel module building prerequisites |
1,530,975,852,000 |
I have one of these and I am trying to write a Bash script for finding the device path in /sys.
My approach goes something like this:
start in /sys/modules/usbled since this is the name of the kernel module loaded when the device is plugged in
cd to drivers/usb:usbled, which appears to be the bus and name of the driv... |
OK I think your question title is a bit unintentionally misleading, since in the text you're saying you've already found the device and are asking how to programmatically do so. One question that comes to mind is how you manually found it and why you couldn't just script around it. I'll answer the question as best I c... | Finding a char device in /sys using a Bash script? |
1,530,975,852,000 |
I'm having trouble with unexpected characters being sent on a USB port with the cdc_acm driver. What makes this all the more perplexing is that the code runs fine on Ubuntu 12.04 (3.2 kernel) but fails (the subject of this question) on Centos 6 (3.6 kernel).
The USB device is a Bluegiga BLED112 Bluetooth Smart dongle.... |
After adding more kernel traces, I found
localhost kernel: [<c12c6757>] process_echoes+0x117/0x2c0
localhost kernel: [<c12c8409>] n_tty_receive_char+0x379/0x770
localhost kernel: [<c121fce4>] ? rb_erase+0xb4/0x120
localhost kernel: [<c12c89f6>] n_tty_receive_buf+0x1f6/0x380
localhost kernel: [<c14d62cb>] ? __schedul... | Linux cdc_acm device - unexpected characters sent to USB device |
1,530,975,852,000 |
I am experimenting with flashcache on my Ubuntu and it looks interesting enough to do a long term test with it. I downloaded the sources, compiled them and installed the resulting kernel module. So far so good.
But once I update my Operating System and a new kernel is installed, the module needs to be recompiled for t... |
The "usual" way is to use DKMS (initially developed by Dell to support specific drivers for their servers under Linux). Even nVidia has now an integration of their graphic-card-driver with DKMS - that driver needs to be recompiled with every kernel-update, too.
| Automatically build a manually installed kernel module upon installing a kernel update on Ubuntu |
1,530,975,852,000 |
I have a 4G module that requires me to run
echo '03f0 581d' > /sys/bus/usb-serial/drivers/generic/new_id
after every startup/resume to make the modem visible. How should I make this automatic?
Add the VID&PID to usb-serial sources and recompile
Create script that run on startup/resume that adds them dynamically
Some... |
Assuming your device's vendor and product IDs are as configured above, ie 03f0 and 581d respectively, you can create a udev rule that will automatically initialize the device and bind it to libqmi, as shown below:
file /etc/udev/rules.d/98-modem-rules.rules
Create the file using your favorite text editor (and appropri... | How to automatically load a new VID&PID to module usb_serial |
1,530,975,852,000 |
I'm installing wheezy on a Thinkpad T41. Those are known to have USB2 related problems, which can be avoided by not loading ehci_hcd.
But I can't figure out how to actually prevent ehci_hcd to get loaded. Here is what I've tried:
echo blacklist ehci_hcd > /etc/modprobe.d/ehci_hcd.conf
depmod -a
update-initramfs -u
reb... |
Given the issue of module dependencies that make blacklisting a module like that difficult, I would suggest the route of recompiling your kernel with that subsystem explicitly not built.
As you mention you are running Debian Wheezy, this guide is a good primer on building a kernel the "debian way". I generally advoc... | Wheezy: how to actually blacklist ehci_hcd? |
1,530,975,852,000 |
Given a kernel module, my-module.ko, I have taken the following steps to try and automatically load the module at boot:
cp my-module.ko /lib/modules/$(uname -r)/my-module.ko
echo my-module >> /etc/modules-load.d/my-module.conf
# alt: echo my-module >> /etc/modules
echo my-module.ko: >> /lib/modules/$(uname -r)/modules... |
Upon closer inspection from within libkmod, I discovered that modules.dep.bin was being used as the reference source file as apposed to modules.dep.
ls -al /sbin | grep depmod yielded depmod -> /bin/busybox
Changing things up:
rm /sbin/depmod
apt install kmod
ln -s /usr/bin/kmod /sbin/depmod
depmod
Now everything is ... | systemd-modules-load cannot find modules |
1,592,808,029,000 |
I want to use the variables from another Makefile under the directory ~/kernelbuild/linux-3.14.37 in my own shell script.
Following is the variables that I need:
VERSION = 3
PATCHLEVEL = 14
SUBLEVEL = 37
The problem is that I am not allowed to change the Makefile, so export variable is not an option here.
Also, I ha... |
You may try to extract the values with grep and sed. For example:
filename="$HOME/kernelbuild/linux-3.14.37/Makefile"
version=$(grep -m 1 VERSION $filename | sed 's/^.*= //g')
This greps for first occurrence of "VERSION" in Makefile
| How to take variables from another Makefile in shell script |
1,592,808,029,000 |
I'm trying to compile a Linux kernel to debug an issue I have on Arch Linux, and I was configuring modules, but I didn't know what a lot of the stuff was so I left them on.
If this kernel works I plan to keep it, but would all those extra modules slow the system down or will it load up only when they are needed?
|
While you won't notice any performance improvement (assuming you build your kernel with the modules you actaully require), there is some benefit in removing unneeded modules: first, it can significantly reduce the compile time and secondly, it will reduce the size of the final kernel.
Creating a .config with make loc... | Is it bad to have too many Kernel modules? |
1,592,808,029,000 |
How can I manually create a Linux kernel module dependency?
For example, at some point in time module vboxdrv gets loaded automatically. BUT, when this happends I also want to automatically load module vfat (just as example).
Thus, how can I create a dependecy, when module 1 gets loaded, it triggers automatic load of ... |
You can add a configuration file /etc/modprobe.d/vboxdrv-includes-vfat.conf with a "soft dependency" command:
softdep vboxdrv post: vfat
The man page modprobe.d(5) documents the syntax:
softdep modulename pre: modules... post: modules...
The softdep command allows you to specify soft, or optional, module dependencie... | Create Linux module dependency for autoloading module |
1,592,808,029,000 |
I just read that Linux kernel modules can't print to the screen i.e. printf won't work. Does it have something to do with interrupt handling or why is that the case?
I have a memory studying some C and assembly which you couldn't use printf with and that was because interrupts were off.
|
In the kernel, printf doesn’t work because it’s not implemented! You use printk instead (or early_printk in very early code, before the console is set up). printk is coded very carefully so that’s it’s safe to call from anywhere, in any circumstances (in particular, it doesn’t need to allocate memory). It implements p... | Why can't kernel modules print to the screen? |
1,592,808,029,000 |
I have a kernel module and I would like to distribute it (ie. package it).
I'd like to distribute it so that the user doesn't need to do anything other than yum/dnf install kmod-mymodule.
SRPM: The user must have to build the RPM on its machine then install the RPM. I can't put it in a yum repository
RPM: I have to b... |
Arguing for the most user-friendly way
RPM: I have to build the RPM for all the majors and minors versions of RHEL.
But that's probably the right way to go from the point of view of your client. Single packet, clean, instant, no dependencies, installation.
There's maybe 6 to 12 versions you need to cover – all with ... | What is the best way to distribute a kernel module with the source code? |
1,592,808,029,000 |
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 Additions CD image and the Guest Additions auto runner came up and ran.
However the Guest Additions installation errored out... |
Please install headers exactly based on your kernerl release.
sudo yum install kernel-headers-$(uname -r) kernel-devel-$(uname -r)
| Want to install VirtualBox Guest Additions on CentOS 7 but get a header mismatch |
1,592,808,029,000 |
I installed a kernel source from the official Linux kernel repository (http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.15.tar.bz2) and I recompiled it with some needed options to support the mobility IPv6. When I needed a module to encrypt some data I didn't find it among the rest of the modules already built. The... |
The first step is to determine what configuration options you need to set in order for the module to build. I use
make menuconfig
for that; / followed by the configuration option you want will tell you where to find it and what its dependencies are. For ECHAINIV, you need to enable CRYPTO and then enable ECHAINIV (as... | How to build a specific kernel module? |
1,592,808,029,000 | ERROR: type should be string, got "\nhttps://linux-audit.com/elf-binaries-on-linux-understanding-and-analysis/\nsays\n\nThe type field tells us what the purpose of the file is. There are a\n few common file types.\nCORE (value 4)\nDYN (Shared object file), for libraries (value 3)\nEXEC (Executable file), for binaries (value 2)\nREL (Relocatable file), before linked into an executable file (value 1)\n\n...\nA common misconception is that ELF files are just for binaries or\n executables. We already have seen they can be used for partial pieces\n (object code). Another example is shared libraries or even core dumps\n (those core or a.out files). The ELF specification is also used on\n Linux for the kernel itself and Linux kernel modules.\n\nWhat ELF types do kernel itself and kernel modules have?\nCould you give some examples of the files of kernel itself and kernel modules, for me to try out with file? I am using Ubuntu 18.04.\nThanks.\n" |
You can find out yourself:
For modules, by looking under /lib/modules/$(uname -r)/kernel/.../*.ko:
$ file xfs.ko
xfs.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), BuildID[sha1]=bcb5e287509cedbb0c5ece383e0b97fb99e4781e, not stripped
$ readelf -h xfs.ko
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00... | What ELF types do kernel itself and kernel modules have? |
1,592,808,029,000 |
I have an Intel Z3735F (Bay Trail) platform running a current 64Bit kernel 4.8. on UEFI32.
From lines in dmesg and hwinfo I found, that on this particular device the on-board "Broadcom BCM43430 WLAN card" is connected to mmc0, which itself is connected to the SDIO bus.
From dmesg I also saw, that the init-system recog... |
If anyone is still having problems with this: Look into this post: https://patchwork.kernel.org/patch/9791523/
Kernelwarrior Hans has collected firmware implementations for the bcm43430 from various sources. You can find them here: http://jwrdegoede.danny.cz/brcm-firmware/ or here (if the link is down): https://wolk.w... | Trouble "activating" the SDIO Broadcom BCM43430 Wifi chip on Linux 4.8.0 |
1,592,808,029,000 |
When running modprobe to insert a module into kerner I get the following:
# modprobe 8192cu
FATAL: Error inserting 8192cu (/lib/modules/3.8.13-118.2.1.el6uek.x86_64/kernel/drivers/net/wireless/8192.cu.ko): Device or resource busy
This happens both when the device is plugged in and not. It may be also related to other... |
It's because the module rtl8192cu is already loaded and this prevents 8192cu to load. So, first unload that module:
modprobe -r rtl8192cu
Now, you can load the new one:
modprobe 8192cu
If it works you can blacklist the first module. To blacklist a module and thus preventing the loading during bootup use this command... | Error inserting module: Device or resource busy |
1,592,808,029,000 |
I need to apply the following patch, and I don't want to mess up what I have so far. Below I have posted the complete content I found online, which was someone's response to a question similar to mine.
On Tue, 2007-03-20 at 14:32 -0500, James Bottomley wrote:
Is MODULE set to 'n'? It looks like the symbol export is... |
Patches are applied1 with the patch command. The drivers/ directory you're looking for is in the top-level of the kernel source tree; you'd apply it something like this:
$ cd ~/linux
$ ls
arch firmware lib README usr
block fs MAINTAINERS REPORTING-BUGS virt
COPYIN... | How do I apply a patch? |
1,592,808,029,000 |
I tried to blacklist kernel module "radeon" as it is classhing with my propietary drivers. I tried it doing it in two ways but none of them worked and every time command
mkinitcpio -M
will list "radeon" module.
I tried to create file /etc/modprobe.d/radeon.config with lines
blacklist radeon
fglrx
After reboot th... |
A few things to try:
modprobe.d/*.conf files are (mainly) for blacklists and if you just add a module name like fglrx then the rest of that config file gets ignored (which is your issue). So remove fglrx from the modprobe.d/radeon.conf file and add it to /etc/modules (point #2):
If you want to explicitly load modules... | Blacklisting won't work for kernel module "radeon" |
1,592,808,029,000 |
In Debian when I want to compile my kernel module I need to install linux-header-* package and then I need to write some makefile like this:
obj-m := hello.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
But now I have downloaded specific k... |
You don't have to.
KDIR := /lib/modules/$(shell uname -r)/build
Presumes you are building a module for the currently running kernel, since it uses $(shell uname -r) to complete the path. When you build a kernel and run make modules_install, the modules are copied into a corresponding directory in /lib/modules -- thi... | How to create Linux header for newly compiled kernel? |
1,592,808,029,000 |
I don't have experience building kernel modules. And worse, I'm trying to do it on ChrUbuntu, so it seems that I cannot follow the existing Ubuntu guides. For example, this command fails:
# apt-get install linux-headers-$(uname -r)
because the ChrUbuntu kernel is version 3.4.0 and there is no Ubuntu repo for that ver... |
This is all from Redditer michaela_elise. (Thank you!)
There is a script that will get and build the ChromeOS 3.4 kernel on your Ubuntu install. This is great because now we can compile kernel mods.
The apt-get install linux-headers-$(uname -r) does not work because 3.4.0 seems to be a Google specific build and you ca... | I need a step by step guide to build kernel modules in ChrUbuntu |
1,592,808,029,000 |
I keep getting errors on startup in Arch relating to my rc.conf:
failed to load module "wl"
failed to load module "lib80211"
etc. It lists all the modules in my /etc/rc.conf
This is my full rc.conf:
#
# /etc/rc.conf - configuration file for initscripts
#
DAEMONS=(syslog-ng dbus networkmanager crond .. etc. ..)
MODU... |
Your rc.conf is not properly configured; the elipses (...) in the wiki are illustrative only. The rc.conf file is a shell script and arrays shouldn't contain those dots.
Using that method is the deprecated way of loading modules. If you wish to continue to list them in this file, then you should use this format:
MODUL... | Arch modules not loading on start? |
1,592,808,029,000 |
Using lshw to query my WiFi USB adapter shows the following:
$ lshw -C network
*-network
description: Wireless interface
physical id: 12
bus info: usb@3:7
logical name: ...
serial: ...
capabilities: ethernet physical wireless
configuration: broadcast=... |
A module is a library containing functions that can be loaded into the kernel.
When writing a module, you can define a C data structure that defines the name of a driver, and the functions to be called to check whether there's a device that can be handled by the driver, which function to call when the device gets unpl... | What is the difference between driver name and kernel module name for lshw? |
1,592,808,029,000 |
I'm trying to get a clear understanding of what exactly the br_netfilter Linux kernel module does (I know it has something to do with networking).
My simple question I'm posing here is as follows:
What is an example of something I CAN do with this module enabled which I CAN NOT do when it is disabled? I had thought it... |
First, in order for that module to be of any use to you, you must first be bridging traffic between two or more network interfaces (physical or virtual).
For example, if you want to run QEMU/KVM virtual machines on your system and to be able to present the virtual machines to the network as separate IP addresses (= no... | What exactly does the br_netfilter kernel module control? |
1,592,808,029,000 |
I've been using Docker for a while and I'm interested in learning its internals. I've read about kernel namespaces it uses. But I don't understand how they are used.
So my problem is: I haven't found any official Linux kernel documentation about it. I haven't found any official source covering subcategories either (PI... |
The closest thing to official documentation for namespaces is the namespaces(7) manpage and related pages. These are maintained by kernel developers.
The best introduction to containers’ use of namespaces I know of is Matt Turner’s “Istio — the packet’s eye view” presentation (which also exists as a lengthier workshop... | How to find official documentation about Linux kernel namespaces? |
1,592,808,029,000 |
I thought the code for kernel modules was stored in a vmalloc() allocation? (In fact I'm sure the kernel code is using vmalloc(), not kvmalloc()). So why does /proc/meminfo say I have no zero VmallocUsed ?
$ grep Vmalloc /proc/meminfo
VmallocTotal: 34359738367 kB
VmallocUsed: 0 kB
VmallocChunk: ... |
The fields were zeroed in Linux 4.4, for performance reasons. Programs linked against glibc read this file when they started up, and it was causing a measurable impact.
https://github.com/torvalds/linux/commit/a5ad88ce8c7fae7ddc72ee49a11a75aa837788e0
| /proc/meminfo says VmallocUsed is 0. So where are my kernel modules stored? |
1,592,808,029,000 |
I used cat /proc/modules to list the process details. Below module shows as 4 instances are present:
poe_isr 3046 4 - Live 0xc37e1000 (O)
What does it mean? How do I see where these instances are being used?
If the module is shwoing as 0 instances and Live, what does it mean? Module not loaded still Live?
adcmods 156... |
It is a counter. It can be incremented or decremented by the kernel core API.
It is the responsibility of the modules, when do they increment it. For example, if you have a somefs module in the kernel, then the awaited behavior is to increment this counter with any mount of a somefs partition, and decrement it on unmo... | Multiple instances of a module |
1,592,808,029,000 |
I just finished installing Nvidia driver on Ubuntu.
Nvidia installer created a key pair and signed the module with it.
Now it says I should add this key pair to list of kernels' trusted keys to be able to use module.
I googled but couldn't find any solution for this as I am not an expert Linux user.
I appreciate your... |
Here I found the solution.
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-signing-kernel-modules-for-secure-boot.html
If your key pair are created, then:
(The instruction is for RedHat but worked fine on Lubuntu and most probably will work for Ubuntu too)... | How to add a key pair (public and private) to list of kernel's database which hold list of trusted keys |
1,458,636,827,000 |
I have disabled a kernel module on my system
>> uname -a
Linux zyx 4.3.0-1-amd64 #1 SMP Debian 4.3.5-1 (2016-02-06) x86_64 GNU/Linux
>> cat /etc/modprobe.d/blacklist.conf
# Disable WebCam
blacklist uvcvideo
Question
Is it possible to temporarily enable a blacklisted kernel module from the commandline? If so, how? ... |
I would have thought modprobe would ignore the blacklist, unless -b was specified...
In any case, the following should work whatever the blacklist settings are:
sudo insmod /lib/modules/$(uname -r)/kernel/drivers/media/usb/uvc/uvcvideo.ko
If the modules uvcvideo depends on haven't already been loaded, you'll need to ... | Temporarily enabling a blacklisted kernel module from the cli |
1,458,636,827,000 |
modinfo --field allows filtering for fields like "autor", "description", which is nice.
Question: Where can I find a complete list of possible values for --field
What I've tried so far:
man 8 modinfo mentions some "common fields", which leaves me with
"you might know best what you're looking for"
Grepping through t... |
modinfo extracts information from the .modinfo section of the kernel module. The info generally gets in that section because a kernel module author added sections like:
MODULE_DESCRIPTION("Joe's awesome driver");
MODULE_AUTHOR("Joe Blow<[email protected]>");
MODULE_LICENSE("GPL");
Perhaps that much is clear - but th... | 'modinfo --field' possible values? |
1,458,636,827,000 |
Backstory
I wanted to use xbox controller for some steam-on-wine games.
I found xboxdrv which claims to make xbox controller work for wine programs.
When I run $sudo xboxdrv I get:
xboxdrv 0.8.5 - http://pingus.seul.org/~grumbel/xboxdrv/
Copyright © 2008-2011 Ingo Ruhnke <[email protected]>
Licensed under GNU GPL ve... |
xpad is the driver for Xbox controllers included in the kernel; it doesn't fully support the newer controllers though (the button mappings are incorrect and the LEDs never sync). xboxdrv is a user-space driver for Xbox controllers and provides all the functionality of xpad, minus the bugs. You won't lose any features ... | What does the xpad kernel module provide? (And what would I lose by disabling it?) |
1,458,636,827,000 |
I'm trying to setup an environment for kernel module development in Linux. I've built the kernel in the home folder and would like to place the sources and binaries to the correct place so include correctly.
The example for building the kernel module has the following includes:
#include <linux/init.h>
#include <linux/... |
I generally approach this question like this. I'm on a Fedora 19 system but this will work on any distro that provides locate services.
$ locate "linux/init.h" | grep include
/usr/src/kernels/3.13.6-100.fc19.x86_64.debug/include/linux/init.h
/usr/src/kernels/3.13.7-100.fc19.x86_64.debug/include/linux/init.h
/usr/src/k... | Placement of kernel binary and sources for kernel module building? |
1,458,636,827,000 |
I just finished the first version of a Linux kernel module I've written in C. The module creates a device file (/dev/wn0) that controls a USB device with three LED lights. For example, running as root, I can do this:
echo "#ff0000" >/dev/wn0
...and the device will glow bright red.
My problem is that I want unprivileg... |
Ok, I see some possibilities:
The quickest way, the whole point of POSIX permissions and ownership: you want someone to be able to read and/or write, you set the permissions accordingly. Just put these people in a group and change the device ownership to that group, giving the group write permissions. You may have t... | Standard way to expose device file to userland applications running on an unprivileged user account? |
1,458,636,827,000 |
The wheel is Logitech driving force DFGT.
The platform:
linux-dopx:/home/anisha/ # cat /etc/issue && uname -a
Welcome to openSUSE 11.3 "Teal" - Kernel \r (\l).
Linux linux-dopx 2.6.34-12-desktop #1 SMP PREEMPT 2010-06-29 02:39:08 +0200 x86_64 x86_64 x86_64 GNU/Linux
To check the force feedback I did:
linux-dopx:/hom... |
I replaced the label LOGITECH_FF with LOGIWHEELS_FF in the file
/usr/src/linux-2.6.34-12/drivers/hid/Kconfig.
Set default y as shown below:
config LOGIWHEELS_FF
bool "Logitech force feedback support"
depends on HID_LOGITECH
default y
select INPUT_FF_MEMLESS
help
Say Y here if ... | How to enable force feedback in kernel 2.6.34 - 64 bit? |
1,458,636,827,000 |
lsmod -> tun 16587 0 - Live 0xbf0e1000
Openvpn error: Cannot open TUN/TAP dev /dev/net/tun no such file or directory
I tried creating a dummy directory but the error changes to Cannot open TUN/TAP dev /dev/net/tun: Is a directory.
edit:
System: ARM Linux 3.10.0
|
/dev/net/tun is character device not file nor directory. Check it with ls command:
ls -lad /dev/net/tun
It shall look like (notice first c):
crw-rw-rw- 1 root root 10, 200 Feb 10 21:38 /dev/net/tun
To fix unload tun module:
rmmod tun
remove /dev/net/tun directory if it exist (directory is marked with d instead of c... | TUN Module Loaded but OpenVPN /dev/net/tun no such file or directory |
1,458,636,827,000 |
I need to retrieved the grab state of an evdev device in a program. More specifically, I need to retrieve the state of the grab pointer in the evdev struct seen here: https://elixir.bootlin.com/linux/v4.20/source/drivers/input/evdev.c#L42 (if it is NULL or not NULL). Is this at all possible from userspace, e.g. throug... |
To determine whether a device is currently grabbed, from userspace, you can try to grab it yourself; either using the EVIOCGRAB ioctl yourself, or libevdev_grab in libevdev:
if (!ioctl(evdevfd, EVIOCGRAB, (void *) 1)) {
// We grabbed the device, no one else had it; release it
ioctl(evdevfd, EVIOCGRAB, (void *)... | Access grab state of evdev device |
1,458,636,827,000 |
I wrote/tweaked a custom kernel module and installed it.
It works as expected, but I've noticed that other kernel modules on my system are compressed with xz and have 0444 permissions, whereas I did not compress mine and I installed it with the executable bit set (0555 permissions).
$ stat --format=%A /path/to/my-modu... |
About permissions:
There is no need to set executable bit or write flag to module. Module file should be readable and that is it. insmod, modinfo, modprobe or something else are need to read the module file. Read permissions for group or others may be need possibly to debug module via objdump, nm, i.e.
There is no rea... | kernel module: set executable bit? compress with xz? |
1,458,636,827,000 |
Recently I noticed that my Linux installation was loading at least one module that seems unnecessary to my system. The module in question is fjes, for the FUJITSU Extended Socket Network Device Driver.
This module matches with the following devices in /sys:
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/PNP0C02:03
/... |
Those are Plug and Play devices, AFAIK named after the legacy from the ISA bus era, but today identified by ACPI.
You can get information about them using lspnp (with added -v option), or directly from the /sys/bus/pnp/devices or /proc/bus/pnp tree.
PNP0c02 is a "motherboard resources" entry and INT3f0d seems to be ... | How can I get more information about ACPI devices? |
1,458,636,827,000 |
I am tinkering with device driver programming under Ubuntu 14.04.1 LTS and came across a strange behavior; hope you can shed some light on.
sudo insmod hello.ko whom="$" yields the expected output:
Hello $ (0) !!!
but sudo insmod hello.ko whom="$$" yields:
Hello 3275 (0) !!!
#include <linux/init.h>
#include <linux... |
Nothing to do with the kernel, it's just that $$ expands to the shell's process id, see e.g. Bash's manual.
($$) Expands to the process ID of the shell. In a () subshell, it expands to the process ID of the invoking shell, not the subshell.
Escape the dollar sign with a backslash, or use single-quotes to prevent the... | insmod parameters and $ sign |
1,458,636,827,000 |
I'd like to keep track of which modules are loaded by the Linux kernel over a course of several weeks.
Q: How can I log each module load to a file?
|
Suggest you try SystemTap.
This SystemTap script is a decent example, tracks process stop/start as well as kernel module load/delete. Easy to remove the process stop/start aspect.
https://sourceware.org/systemtap/examples/process/procmod_watcher.stp
| Track Linux kernel module usage over time |
1,458,636,827,000 |
I am trying to install a new kernel on Ubuntu Server and I am unable to complete it due to a "gzip: stdout: no space left on device" error. The full error was produced after running sudo make modules_install install:
INSTALL /lib/firmware/cpia2/stv0672_vp4.bin
INSTALL /lib/firmware/yam/1200.bin
INSTALL /lib/firm... |
"make modules_install install" tries to build initrd image on /boot partition, which has 162 megabytes free, which is simply not enough.
If you want to compile kernel yourself on Ubuntu, you need to prepare at least 1GB free space on /boot partition.
| Unable to install new kernel in ubuntu server. "gzip: stdout: No space left on device" error even though abundant disk space |
1,458,636,827,000 |
What is the kernel command line to completely disable bluetooth in /etc/default/grub? I don't have it, don't need it, don't want it, complete waste of resources.
|
On Arch, Ubuntu/Debian family and the later RedHat/CentOS/Fedora systems, you blacklist the module by adding bluetooth.blacklist=yes at boot time.
If you're using RedHat 6 and it's derivatives you can use the rdblacklist=bluetooth boot option to blacklist a module (assuming the module is called bluetooth on these syst... | What is the kernel command line to disable bluetooth in /etc/default/grub? |
1,458,636,827,000 |
The very little documentation about /proc/filesystems says it is a "list of supported file systems". I see a lot of file system modules in /lib/modules/linux_ver/kernel/fs, most of which do not appear in /proc/filesystems, nevertheless mount appears to have no problem using those file system modules.
So what is the us... |
If there is an available module for the file system you want to mount but it's not yet loaded and hence isn't yet shown in /proc/filesystems, then it will be loaded on-demand which it why you don't have any problem mounting.
After having mounted such a file system, then that file system type should have appeared in /p... | What is /proc/filesystems supposed to be and why is it different from /lib/modules/linux_ver/kernel/fs? |
1,458,636,827,000 |
I was browsing the basic info about the modules that my kernel is currently using on a machine I have, and this piece of information pops up.
$ grep fglrx /proc/modules
fglrx 8085343 200 - Live 0x0000000000000000 (POF)
and there are also times where that 200 becomes something near to 300 or 250 .
Really there are 20... |
Remember that that count details other modules that are depending that specific module:
lsmod | grep radeon
Module Size Used by
radeon 1285868 3
i2c_algo_bit 12751 1 radeon
drm_kms_helper 39892 1 radeon
ttm 69624 1 radeon
and that those are not... | 200+ instances for fglrx? |
1,458,636,827,000 |
I want to block a certain driver module from loading in the linux kernel.
So I created a file in /etc/modprobe.d/cdc_acm.conf. In this file I added the following line:
install cdc_acm /bin/false
This works as expected when issuing:
modprobe cdc-acm
libkmod: ERROR libkmod/libkmod-module.c:924
command_do: Error runnin... |
The blacklist is read by modprobe where insmod just tries to insert a module without bothering with dependencies or blacklists or anything.
insmod man page:
insmod is a trivial program to insert a module into the kernel. Most users will want to
use modprobe(8) instead, which is more clever and can handle module depen... | How to set up a blacklist for insmod? |
1,458,636,827,000 |
After executing...
sudo modprobe rt3572sta
I get...
Invalid module format
What does it mean? I'm trying to get Wusb600n v2 working on Lucid Lynx.
Does it mean that kernel versions aren't compatible?
|
It means that the file you are trying to load is not a valid kernel module. Either it never was, or it has been corrupted, or possibly it is for an architecture other than the one you have ( 32 vs 64 bit ).
| What does 'Invalid module format' mean? |
1,458,636,827,000 |
After 959 days a reboot was needed on the CentOS 7 system which has used ZFS flawlessly for the past years. I have run yum update once a month during that time.
The rebootet system is apparently unable to load its ZFS module, as evidenced by
# zpool list
/dev/zfs and /proc/self/mounts are required.
Try running 'udevad... |
959 days without reboot? Wow. I assume you are not using kexec so that means you have booted the new kernel for the first time. The problem is the ZFS module you have installed is build for a different kernel so you can't load it now.
Your options:
Try using the weak-modules skript (weak-modules --add-kernel --no-ini... | CentOS 7: after reboot, zfs module won't load, no /dev/zfs |
1,458,636,827,000 |
I have a device that uses Qualcomm Atheros drivers that I have reinstalled. In order to use the device properly, I need to load the modules with options:
sudo modprobe -r ath10k_pci # remove module
sudo modprobe -r ath10k_core # remove module
sudo modprobe ath10k_core rawmode=1 cryptmode=1
sudo modprobe ath10... |
You are looking at the wrong configuration file. /etc/modules-load.d/ will tell the system to load kernel modules during the boot phase even if nothing immediately needs them:
systemd-modules-load.service(8) reads files from the above directories
which contain kernel modules to load during boot in a static list.
E... | Load Kernel module at boot time with options |
1,458,636,827,000 |
Im working on an odroid HC2, which runs Debian 9 "Stretch".
In my logs, I can see that there is a driver missing for Wifi:
usb 1-1: request_firmware(rtlwifi/rtl8192eu_nic.bin) failed
So i installed firmware-realtek package
apt install firmware-realtek
Follows the output of the installation :
root@ohc2:~# apt insta... |
According to the Freddy's comment, here is the answer :
Install the needed packages to compile
apt update
apt install linux-headers-$(uname -r) git build-essential dkms -y
Get the files
cd /tmp
git clone https://github.com/Mange/rtl8192eu-linux-driver.git
cd rtl8192eu-linux-driver
If you are like me on an Odroid HC2... | Realtek Firmware Installation Error |
1,458,636,827,000 |
A question has been bugging my mind recently.
Since virtually all proprietary modules are out of tree (and therefore not compiled against any kernel versions), I'm wondering how exactly they are compiled and loaded.
Many major organizations allow for the download of a single .tar.gz, .deb or whatever and it just wor... |
The general approach is to ship an object file containing the proprietary code, and a “shim”, provided as source code, which is rebuilt for the appropriate kernels when necessary. The interface code handles all the module interface for the kernel, including symbol imports with version strings etc.
For example, NVIDIA ... | How do proprietary modules work for majority of kernel versions? |
1,458,636,827,000 |
What sensors I can monitor on my AMD Threadripper 1950x on an ASRock x399 Taichi mobo under Linux. It was announced last year that temperature monitoring was working for Ryzen processors and that was supposedly included in the 4.15 kernel, according to this:https://www.phoronix.com/scan.php?page=news_item&px=AMD-Zen-T... |
[deleted answer by OP:] I would still like to know: what exactly is making nct6775 available now?
There are a lot of attempts at answering the general question in the following link. Unfortunately none of them are comprehensive, so I will try to improve on them. Linux: How to find the device driver used for a devi... | Ryzen/Threadripper temperature sensors: Which senors are related to which kernel modules and how to enable them |
1,458,636,827,000 |
I was wondering how to enable Kyber scheduler in Ubuntu 17.10, which has kernel 4.13 by default. I got bfq enabled using the instructions from How to enable and use the BFQ scheduler?. When I navigate to my NVMe drive, I am seeing only bfq.
cat /sys/block/nvme0n1/queue/scheduler
[noop] bfq
|
You can temporarily enable the three available schedulers via:
sudo modprobe bfq
sudo modprobe mq-deadline
sudo modprobe kyber-iosched
You can see the available modules in /lib/modules/<your kernel>/kernel/block.
To enable these modules on boot, you can add the following lines to /etc/modules-load.d/modules.conf (or... | How to enable Kyber scheduler in Ubuntu 17.10 kernel 4.13? |
1,458,636,827,000 |
I am trying to use a Can module but I get an error message with the following commands:
$ sudo modprobe can
$ sudo ip link add dev can0 type can
RTNETLINK answers: Operation not supported
I have checked the Elinux documentation related to CAN interfaces
and the procedure works with the virtual interface
$ sudo modpro... |
I am using a can bus module which communicates with a Raspberry Pi using SPI.
I had to enable the spi hardware interface:
dtparam=spi=on
dtoverlay=mcp2515-can0-overlay,oscillator=16000000,interrupt=25
dtoverlay=spi-bcm2835-overlay
Should be:
dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25
dtoverlay=spi-bcm2... | Bringing Can interface up - Operation not supported |
1,458,636,827,000 |
THE SCENARIO
I'm writing a demo module to be inserted in Kernel and then write on system, for which I've already made entries in Header file and Table file.
PROCEDURE FOLLOWED SO FAR
I compiled the kernel using
/linux-4.12.9$ sudo make -j4
In which I got some warnings and NO ERROR. Unable to grab those warnings anyw... |
The issue was with supported libraries and packages I was using.
To compile the latest kernel at this time of writing, you must have these 4 Packages / Libraries installed:
libssl-dev
libncurses5-dev
qt4-default
qt4-dev-tools
Although I'm bit skeptical about qt4's dev-tools and default, since I've downloaded togethe... | aes-x86_64.ko No such file or directory for Module Installation failure after 4.12.9 Kernel compilation |
1,458,636,827,000 |
I have "radeon" and "amdgpu" drivers installed. I want to switch to amdgpu from radeon but I don't know how can I do that.
lspci -v | grep driver:
Kernel driver in use: radeon
lspci -v | grep modules:
Kernel modules: radeon, amdgpu
How can I switch to amdgpu? Thanks.
|
The recommend method will depend on what Linux distribution you are running. But one thing that should work is to blacklist the radeon module from running.
In /etc/modprobe.d, create a new .conf file, and give it the following contents:
blacklist radeon
| How to change in use driver linux |
1,458,636,827,000 |
I get the message:
thermald: Unsupported cpu model, use thermal-conf.xml file or run with --ignore-cpuid-check
sensors-detect suggests coretemp and w83627hf which are installed and in /etc/module.
Try
If I run sudo thermald --no-daemon --ignore-cpuid-check | tee thermald.log, I get:
NO RAPL sysfs present
Polling mo... |
If using systemd
Edit /lib/systemd/system/thermald.service by running
sudo systemctl edit --full thermald.service
Add the option at the end of ExecStart:
[Unit]
Description=Thermal Daemon Service
[Service]
Type=dbus
SuccessExitStatus=1
BusName=org.freedesktop.thermald
ExecStart=/usr/sbin/thermald --no-daemon --dbus-... | How to run thermald with option --ignore-cpuid-check |
1,458,636,827,000 |
Basically I have the situation when box is booting from usb (gentoo-minimal.iso) but installation is lacking the firmware for killer 1525 (ath10k). The filesystem is mounted as ro and I can't put needed firmware into /lib/firmware. What are the other ways to load firmware in this situation?
Basically what I'm trying t... |
Option 1
You can still bind another directory over /lib/firmware. Copy the existing firmware to a temporary directory, add your new firmware, then bind the temp directory over the /lib/firmware directory.
mkdir /tmp/firmware
cp -r /lib/firmware/* /tmp/firmware/
cp -r my_firmware /tmp/firmware/
mount -o bind /tmp/firmw... | Load firmware on ro live cd |
1,458,636,827,000 |
Please read the full question before attempting to answer, this is a bit oddball of a situation.
I support a lot of server hardware test functionality, and essentially end up managing several internal Linux distributions, supporting various kernels (and, in a bit, CPU architectures as well). These servers are PXE/iPXE... |
Speaking about Debian-derived distributions:
They can differentiate multiple architectures within the same repository (including 32bit vs 64bit).
The kernel modules are stored in a kernel-specific tree /lib/modules/$(uname -r)/ so you could build a package that included a module for all your possible different kernel... | Managing Pre-Built Kernel Modules Across Kernel Versions |
1,458,636,827,000 |
I'm specifically asking about CONFIG_SND_MAX_CARDS in the kernel.
From the code using this config, for example in sound/usb/card.c for USB cards, soundcards are stored in plain arrays which are looped over.
Why does the kernel not use lists and have an unlimited number of soundcards?
I know unlimited is not possible ... |
In the good old times of ISA sound cards, it was not possible to create device nodes in /dev/ dynamically, so all devices had to be preallocated. This resulted in a limit of 8 sound cards, and the drivers were written with this limit in mind.
Later, when devfs and USB were introduced, this limit was removed. However, ... | Why does Linux have a maximum number of sound cards? [closed] |
1,458,636,827,000 |
I am trying to compile a linux-sunxi kernel for my Banana pi.
Using this link: http://sunxi.org/Linux_Kernel#Compilation
Unfortunately I am getting the following message at the bottom when I am trying to compile the uImage and modules. (Step: make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage modules)
Build... |
I ran into the same problem! After googling around for a good while, it finally turned out (in my case) that the kernel build toolchain is very picky about some env options, as pointed out here.
Here, in my ~/.bashrc I had export GREP_OPTIONS='--color=always' and that seems to be causing problem with the module script... | Compiling kernel but doesn't build kernel modules |
1,558,028,264,000 |
Suppose an apache log file gets deleted but it's held open by apache; then this is what I am doing:
pid=$(lsof | grep text.txt | awk '/deleted/ {print $2}')
fd=$(lsof | grep text.txt | awk '/deleted/ {print $4}' | grep -oE "[[:digit:]]{1,}")
cp /proc/$pid/fd/$fd directorytobecopied/testfile.txt
This is what I am doi... |
If a file has been deleted but is still open, that means the file still exists in the filesystem (it has an inode) but has a hard link count of 0. Since there is no link to the file, you cannot open it by name. There is no facility to open a file by inode either.
There is no way to discover the file through its filesy... | recovering deleted file held open by apache? |
1,558,028,264,000 |
I'm trying to start a Java application which apparently enforces hostname resolution:
java.lang.RuntimeException: Strict hostname resolution configured but no hostname was set
I've tried applying an hostname:
sudo hostname fedora
but it didn't help. On this machine, my /etc/hosts looks like:
127.0.0.1 localhost loca... |
Starting with Keycloak 17, strict host resolution is required in production mode. You can either provide the actual host name with the --hostname parameter or disable strict host resolution with the startup parameter:
–-hostname-strict=false
Source: getting started with keycloak 17
| Strict hostname resolution configured but no hostname was set |
1,558,028,264,000 |
Quite confused over the difference between Linux Name Service Caching Daemon (NSCD) and System Security Service Daemon (SSSD). As far as I understand, both are used to cache authentication lookup information on the local machine, and still it seems both can be used on the same machine.
What are the differences betwee... |
The nscd is a daemon that provides a cache for the most common name service requests like passwd, group, hosts, service and netgroup.
sssd primarily provides daemons to manage access to remote directories and authentication mechanisms like LDAP, Kerberos, NIS, etc...so it is more about authentication and authorization... | The difference between nscd and sssd |
1,558,028,264,000 |
I have been trying to create a virtual device to record the internal audio of my sound card using pure ALSA. After googling a lot, I found a .asoundrc file¹ that is very near of what I am looking for:
pcm.mycard {
type hw
card 0
}
ctl.mycard {
type hw
card 0
}
pcm.myconvert {
type plug
slave ... |
I solved this issue as follows:
First, load the snd-aloop module:
sudo modprobe snd-aloop
This will create a new device called Loopback:
± % cat /proc/asound/cards !10017
0 [PCH ]:... | Create virtual device in .asoundrc file |
1,558,028,264,000 |
Why does /proc/pid/maps contain a few records for the same library ? Here is an example:
7fae7db9f000-7fae7dc8f000 r-xp 00000000 08:05 536861 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20
7fae7dc8f000-7fae7de8f000 ---p 000f0000 08:05 536861 /usr/lib/x86_64-linux-gnu/libstdc++.so... |
The four records have different permissions, so they can't be merged.
The r-xp entry describes a block of executable memory (x permission flag). That's the code.
The r--p entry describes a block of memory that is only readable (r permission flag). That's static data (constants).
The rw-p entry describes a block of me... | Shared library mappings in /proc/pid/maps |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.