date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,493,001,709,000 |
I faced a strange effect as ... when my notebook wakes up from suspend I can start and close my web cam with guvcview 1-3 times; But after while on 3dr or 4th starting attempt (I didn't count for sure) my OS totally hangs so I have to reboot my notebook to make it work :P
As an attempt to find out some more details I ... |
This may be a duplicate of this just asked differently.
Anyways, have you tried to find out if another process is using the camera(such as one of your previous attempts to use the camera not exiting properly...)
Try this - (notice you have to take the output of the first line and edit the third line to match your out... | web cam starting hangs os |
1,493,001,709,000 |
I have put in a Hitachi 2.5 inch hdd inside a Inateck hdd enclosure. I have connected the enclosure to a Toshiba R630-156 using a usb2 cable on a usb3 enclosure port. I can hear and feel the hard drive is powered but I cannot see any messages in dmesg. i cannot see any related output in lsusb. I have enabled usb_stora... |
actually, I just realized that when using a usb3 cable and connecting to a usb2 port on the laptop, the device is found and all the partitions are automatically mounted.
The problem I had earlier could be from the usb2 cable which could carry only less power than a usb3 device required.
/dev/sdb5 on /media/r/3c45f792-... | unrecognized inateck hdd enclosure with linux Mint |
1,401,330,446,000 |
I 'm running Angstrom Linux (3.0.7) on embedded device BeagleBoard-xM. I want to load a module (downloaded from here) and copied into: /lib/modules/3.0.7/kernel/drivers/net/wireless/rtlwifi/8192cu.ko on the BeagleBoard-xM SD card file system.
However, loading the module fails:
root@beagleboard:/# modprobe 8192cu ... |
Did you run depmod? This is something make modules_install does automatically for you, but if you copy a module into /lib/modules this way, you will need to do that manually. See man depmod for more information.
I am not sure if depmod will report the presence of incompatible modules.
You can also use an explicit pa... | Loading module 8192cu fails |
1,401,330,446,000 |
I'm currently learning about device developement for linux, I have glaced at some books such as LLD3, .. but I still can't understand what happen when we plug a device into computer, That's my imagination: When we plugs a device into a port, in a magic way, Linux kernel will know what device type and call to appropria... |
It's not really magic, it's hardware. Information about peripheral events comes to the CPU thru the front side bus, which is the gateway to other hardware; programmatically (in kernel code) these are dealt with via the concept of the interrupt request (IRQ).
Have a look at these in order:
http://en.wikipedia.org/wi... | What happen when we plug a device in to computer |
1,401,330,446,000 |
I have an Acer netbook, with built-in camera, running just fine under Ubuntu/x86. I also have a stack of broken netbooks of the same model that suffered various accidents over the years of intense use, and serve as source of spare parts. And I got an Orange Pi, to which I wanted to attach a small, lean webcam - the th... |
You can search through the kernel sources for the vendor id "04f2", then filter for the product id "b367". I found 2 video files with the vendor id,though one zr364xx.c is no longer in the version 6 kernel. No files have the specific product id. You could try editing the other uvc_driver.c file by duplicating the stru... | How to tell which kernel module acts as a driver for a USB device? |
1,401,330,446,000 |
I would like to setup correct kernel module loading. For this reason I am interested in the output of uname -r of the custom kernel I compiled and am about to setup.
Since this kernel is of course not already running I have no clue to how I can get the info of uname -r for this kernel, as it is yet to be booted and un... |
The file command may be able to extract information out of a vmlinuz file:
Linux/x86 Kernel, Setup Version 0x20d, bzImage, Version 4.15.7-1-default ...
| How to do a "uname -r" for a different kernel? |
1,401,330,446,000 |
I want to start using npf on my NetBSD server, rather than relying solely on the external firewall for protection. However, I get:
$ npfctl show
npfctl: /dev/npf: No such file or directory
Alright, maybe I deleted a device node. No matter:
$ grep npf /dev/MAKEDEV
makedev bpf npf
npf)
mkdev npf ... |
NetBSD uses kernel secure levels to determine what operations can be performed on a running system. From the link:
-1 Permanently insecure mode
Don't raise the securelevel on boot
0 Insecure mode
The init process (PID 1) may not be traced or accessed by ptrace(2), systrace(4), or procfs.
Immutable and append-only... | Loading NetBSD kernel modules |
1,401,330,446,000 |
I am confused by how built-in kernel modules work. As per my understanding, one can embed a kernel module when compiling the Linux kernel by setting kconfig option to MODULE_NAME=y. Then, it doesn't have to be loaded with e.g. modprobe. Built-in kernel modules can be shown with cat /lib/modules/$(uname -r)/modules.bui... |
Builtin kernel “modules” (they aren’t really modules) are part of the main kernel binary, vmlinux before it’s compressed. They are never extracted as separate entities, they are loaded along with the rest of the kernel.
They appear as .ko files in modules.builtin to make things easier for other tools, e.g. for module ... | Where do built-in kernel modules reside? |
1,401,330,446,000 |
I'm still new to understanding the Linux kernel so please forgive the basic question. If you could point me to resources that I could read/watch that would be greatly appreciated.
Coming from Windows, the hardware driver workflow appears to be that you install the core operating system first, then install drivers sepa... |
I think you're conflating two related but different concepts: how drivers used by the kernel (statically compiled in, dynamically loaded), and how they're developed (in-tree, out-of-tree).
Drivers that are developed in-tree can be compiled into the kernel or loaded dynamically. Most are dynamically loaded. Drivers dev... | Why are drivers compiled into the kernel? Why aren't more drivers distributed as dynamic kernel modules? |
1,401,330,446,000 |
So, I was trying to make the driver for my tplink, but when I entered "make", I got this:
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.18.10-200.fc36.x86_64/build M=/home/dfmaaa1/rtl8821au modules
make[1]: *** /lib/modules/5.18.10-200.fc36.x86_64/build: No such file or directory. Stop.
make: *** [Makefile:116: ... |
sudo dnf install kernel-devel is what you're looking for. If it installs a new kernel part of the process, you'll have to reboot.
| What is the build executable that make wants to use but can't find? |
1,401,330,446,000 |
As pointed out in this question, the prototype for the ioctl function inside a Linux kernel module is:
(version 1)
int ioctl(struct inode *i, struct file *f, unsigned int cmd, unsigned long arg);
or
(version 2)
long ioctl(struct file *f, unsigned int cmd, unsigned long arg);
I would like to use them in a kernel modu... |
Are both the above prototypes suitable in this case? If yes, why? If no, how to choose the right one?
They are not both suitable. Only version 2 is currently available in the kernel, so this is the version that should be used.
What header/source file(s) contain these prototypes? In other words: what is the offic... | Two different function prototypes for Linux kernel module ioctl |
1,401,330,446,000 |
I configured a debian kernel 5.10.57 to add the HSR/PRP module. I enabled it as built-in <*>. Then i compiled and installed the kernel using make deb-pkg and dpkg -i *.deb respectively.
The new kernel is running.
debian@debian:~$ uname -r
5.10.57
The HSR/PRP module path is in the builtin.modules file :
debian@debian:... |
Since you configured the driver as built-in, rather than a module (<M> in the kernel configuration), it is part of the kernel binary (bzImage etc.). It will always be “loaded” whenever that particular kernel binary is booted.
You won’t see it as a separate .ko file, nor will you be able to force the .ko file to be bu... | Built-in module enabled at kernel configuration is missing |
1,401,330,446,000 |
I am attempting to install a new version of a kernel module. To this end, I attempted to remove the old module with rmmod mod. This gave no output. When I tried modinfo mod, however, I received the same result I did before calling rmmod. What am I missing?
|
modinfo does not care whether the module is loaded or not - if you give it a module name (instead of a full pathname to a .ko file), it finds the module file on disk based on the current /etc/modprobe.d configuration and reports information on it.
So if you already replaced the old module in /lib/modules/... with a ne... | modinfo doesn't change after rmmod |
1,401,330,446,000 |
Would like to know if there is a specific list or location for the name of the kernel modules that are loaded when the system is booted.
Commands like lsmod or cat /proc/kallsyms only show those that have been loaded.
Want to determine which are the modules that have been loaded manually.
Thanks in advance!
|
There might be multiple lists: one for kernel modules loaded within initramfs (i.e. modules necessary for basic I/O and accessing the root filesystem) and another list loaded once the root filesystem has been mounted.
For Debian and related Linux distributions like Ubuntu, there's /etc/initramfs-tools/modules for mod... | Kernel Modules loaded when boot |
1,401,330,446,000 |
Does anyone know I can detect which CPU instructions are being executed?
I am especially interested in detecting AES instructions implemented by recent Intel and AMD CPUs. Would it f.e. be possible to write a kernel module that detects these instructions? Or are the specific CPU instructions that are sent to the CPU n... |
Most of the time, CPUs execute processes’ instructions without involving the kernel; the kernel only has to step in if a user-level process causes a trap, either by attemptung to execute an invalid instruction (invalid here covering a variety of reasons) or by invoking a software interrupt. AES instructions are execut... | How can I detect which instructions are executed on a CPU? |
1,401,330,446,000 |
The problem concerns a driver support regression for the RTL8192CUS WLAN chip under antiX 13.1, a Debian Wheezy (stable) based distribution.
The chip actually resides in a Edimax EW-7811Un 802.11n wireless adapter.
First, here is some general system information.
$ inxi -F
System: Host: 4000cdt Kernel: 3.7.10-antix.... |
FATAL: Module p80211 not found. is usually an indication that the provided driver is outdated for the used kernel.
Moreover, current version 3.4.4_4749.20121105 of Realtek's driver will not compile with the latest Linux kernels. The solution consist in installing a downgraded kernel, compiling Realtek's driver on it a... | FATAL: Module p80211 not found. RTL8192CUS WLAN regression under antiX 13.1 (Debian Wheezy) |
1,401,330,446,000 |
.config from /usr/src/linux-2.6.38.8 contains:
CONFIG_R8169=m
CONFIG_R8169_VLAN=y
What's the difference between CONFIG_R8169 and CONFIG_R8169_VLAN?
|
CONFIG_R8169_VLAN enables support for the VLAN/802.1Q code in the r8169 driver. For an introduction in VLANs see http://en.wikipedia.org/wiki/IEEE_802.1Q
A small tip for the future, if you need to determine what a specific config option in the kernel does you should have a look at the integrated help text, e.g: help t... | What's the difference between CONFIG_R8169 and CONFIG_R8169_VLAN? |
1,401,330,446,000 |
Kernel module files are located in directories such as
/lib/modules/drivers/
/lib/modules/storage/
/lib/modules/fs/
they all have the extension .ko
but how does the kernel understand that a specific module file belongs to a certain type and should be in a certain directory?
|
The top-level directory for kernel modules is determined by the kernel’s reported version (as shown by uname -r): modules go in /lib/modules/$(uname -r). Modules built alongside the kernel go in a subdirectory of the kernel directory in the top-level directory; modules built later go in a subdirectory of the updates d... | How does the kernel understand that a specific module file belongs to a certain type and should be in a certain directory? |
1,401,330,446,000 |
I searched all over the internet but couldn't find proper steps to debug linux module remotely using gdb. I am tring qemu but facing many issues there. Is there any other tool that I can use or if not then can you provide me proper steps to debug linux module remotely?
|
Shouldn't be that hard. From the official kernel documentation (don't search "all over the internet". Search the official documentation and you'll find less bad information):
Have a kernel that has KGBD enabled, and also make sure that during building the config option CONFIG_GDB_SCRIPTS is on. (Refer to documentatio... | How can I remotely debug linux module using GDB? |
1,401,330,446,000 |
Mostly a general linux question, but where it needs to be specific I am referencing Debian 12 Bookworm amd64 UEFI booting through grub(not direct kernel stub).
I have secure boot disabled in firmware for some multiboot reasons and I have options for signed or unsigned kernels.
Are there any negative impacts of a sign... |
If Secure Boot is disabled, the signature on a signed kernel isn’t used, and it behaves like an unsigned kernel.
There are no incompatibilities, and you can load modules without signing them.
See above, no special build is required.
Yes, you can have unsigned kernels alongside signed kernels.
| Is there a downside to a signed kernel? |
1,401,330,446,000 |
I'm trying to get an out-of-tree kernel module working. The module is the usbtm module from Epson for their TM-70/TM-70II slip printers and the TM-S1000 cheque reader.
(The code is GPL licensed, so if you want to copy of the source, let me know, and I will share it.)
I have successfully built the module, and installed... |
modprobe doesn’t know about your module, which suggests that you need to run
depmod
to re-generate modules.dep.bin.
See man depmod
| Out-of-tree kernel module won't load |
1,401,330,446,000 |
I have a computer on which I've installed a custom linux system (created using Yocto). On a previous computer using this build, the network interface worked fine, but on this new computer, eth0 doesn't show at all. I know how to bring a network interface online and configure it if it's been recognized by the OS and ... |
I upgraded to the latest version of yocto, which includes the 5.10 linux kernel. I don't know exactly what fixed it, but it's working now. Not a satisfying fix, but it works.
| How do I make Linux aware of a network interface? |
1,401,330,446,000 |
I am tring to install nvidia driver by the following command.
sudo ./NVIDIA-Linux-x86_64-418.43.run --dkms -s
Here I got an error as follows.
ERROR: Failed to run `/sbin/dkms build -m nvidia -v 418.43 -k 3.10.0-1062.el7.x86_64`: Error! echo
Your kernel headers for kernel 3.10.0-1062.el7.x86_64 cannot be found at
... |
The simplest option would appear to be a reboot, so that the running kernel matches the installed headers (1160.31.1).
Otherwise you’d have to find the header package for your older kernel (1062).
| Your kernel headers for kernel 3.10.0-1062.el7.x86_64 cannot be found |
1,401,330,446,000 |
I've this script which checks for a veth-pair and setup an ifb device on it, but everytime it says cannot find free ifb device for that particular veth pair.
What could be the problem? Even I tried running modprobe command which by default creates two ifb, then also it throws the same error.
#return 0 if the ifb is fr... |
By default, two ifb interfaces are created when loading the ifb kernel module. This is for obsolete reasons, the same way two dummy interfaces are created when loading the dummy kernel module. Those interfaces are created in the initial network namespace. For example if the system is inside a container or simply a (no... | modprobe cannot load ifb devices |
1,401,330,446,000 |
I am writing a LKM to create a character device driver.
Linux Kernel: 4.4.0-93-generic in VirtualBox, 2GB ram and SWAP is 300Kb
Problem 1
If I write a C program that handles the fd in dev_write, it's all good, it reads as it should, but if I try to use head -n 1 < /dev/opsysmem it does not output anything.
Code for re... |
I think Problem 1 may be either because head is not seeing an end-of-line character (e.g. newline,'\n'), or it uses seek system calls and you ignore the offset argument in your dev_read() and dev_write() functions (which means seeks won't work, if I understand it correctly) ... check this out - head does try to optimi... | Linux character device driver issues |
1,401,330,446,000 |
Understanding the Linux Kernel says
The kernel has two key tasks to perform in managing modules. The first task is mak-
ing sure the rest of the kernel can reach the module’s global symbols, such as the
entry point to its main function. A module must also know the addresses of symbols
in the kernel and in other... |
Is it correct that any shared library can be both dynamically linked (using LD_LIBRARY_PATH), and dynamically loaded (by dlopen(), dlsym() and dlclose())?
Yes. The difference is that dynamic linking is driven by the dynamic linker, and by the time the program starts (from the program author’s perspective), the libra... | How does Linux kernel dynamically use a module? |
1,401,330,446,000 |
So I'm trying to get Vuurmuur installed on a headless linux box that I've been using as a home router. So far, I've been using iptables but wanted to switch to using something more convenient/easier to use.
SERVER SETUP
I'm running:
Ubuntu 16.04.3 LTS Xenial
4.4.0-97-generic #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 20... |
So turns out their are two options:
Option 1
Run the vuurmuur command with the below option:
-t
Option 2 (what I did)
Use the 0.8rc5 version from the Vuurmuur website and I was able to start Vuurmuur.
| How to resolve "no connection tracking support in the kernel" in Vuurmuur? |
1,513,088,334,000 |
I have installed the Debian Jessie (8) using the Parallels desktop in the MacBook Pro host. It goes fine for some time and now I keep getting message,
some of the required kernel modules are missing. To solve this problem, please try to reinstall Parallels Tools using the virtual machine menu
How do I install the req... |
Have you tried reinstalling Parallels Tools like the message says? That would seem to fix the problem you're having.
| Debian Jessie (8) using the Parallels desktop |
1,513,088,334,000 |
Is it technically possible to write a kernel module to physically connect a PS/2 keyboard to a USB port using a passive converter? If not, why?
(If I simply wanted my keyboard to work I would buy an active adapter, but the purpose of this question is to learn something)
|
No.
No USB standard implements backwards compatibility with PS/2. PS/2 mice which predate USB do not contain time-travelled USB descriptors. Nor can an arbitrary USB port be accessed as a GPIO.
USB descriptors: https://blog.digital-scurf.org/posts/stm32-and-rtfm/
https://en.wikipedia.org/wiki/Gpio & https://en.wikip... | Kernel module to connect ps/2 keyboard to usb? |
1,513,088,334,000 |
I have an issue trying to build kernel and modules for an embedded system. The resulting Module.symvers has some (a few dozen) entries with invalid (0x00000000) CRC entries.
I'm trying to figure out the process by which Module.symvers is generated so that I can start debugging the problematic entries. However, after l... |
The creation of Module.symvers has a number of steps. These steps make use of MODVERDIR (typically .tmp_versions in the build directory) which contains .mod files,
After the modules are compiled and corresponding .o files are generated, the source is pushed through the C pre-processor with -D__GENKSYMS__ and the resu... | How is Module.symvers generated? |
1,513,088,334,000 |
I updated the database pacman -Syy and update all packages pacman -Su. Then I checked the upgraded packages
cat /var/log/pacman.log | grep -i upgraded
[2017-07-14 14:21] [ALPM] upgraded linux (4.11.7-1 -> 4.11.9-1)
Somewhere during installation I read that probably I have to re-run mkinitcpio -p linux if the package ... |
Assuming you are using the upstream kernel packages, and you haven't manually reconfigured pacman, then you shouldn't need to.
You can easily check though by seeing what the timestamp on /boot/initramfs-linux.img is, if it's newer than /boot/vmlinuz-linux.img, then the initramfs was updated, and you don't have to manu... | mkinitcpio generation after update |
1,513,088,334,000 |
I want to build latest (4.7.4) kernel with make-kpkg. Also I want to make it as modular as possible. Will it compile modules too or should I run 'make modules' before?
Thanks.
|
Yes it will compile modules. Please refer to http://man.he.net/man1/make-kpkg .
| Will make-kpkg compile modules too? |
1,513,088,334,000 |
I need to use this drivers in a Linux based system that is highly customized and so I'd like to know if there is a way of having this pieces just ready to be manually installed and/or used.
In other terms I need the *.so libraries and the kernel module.
|
First download the ATI binary driver for linux,
If you do ./ati-XX.run --help you could see a lot of options, IIRC, there's an --extract option that will extract everything inside to a folder, which contains:
Kernel module (fglrx) source code
fglrx opengl library (binary)
| Extracting only the module and the libraries from the AMD ATI proprietary drivers |
1,513,088,334,000 |
I'm in the process of installing iptables onto an embedded Debian 8.7 armhf machine that does not have access to the internet. My method has been to manually find the .deb package files from the Debian archives, and then FTP those over to the Debian 8.7 machine and run dpkg.
After a bit of struggling, I was seemingly ... |
dpkg installs whatever is provided in the packages it’s given, and runs the maintainer scripts included in the packages.
In iptables’ case, the iptables command itself takes care of loading the relevant kernel modules. However the kernel modules need to be available — that’s usually taken care of by the kernel package... | Should 'dpkg -i iptables' be installing the required kernel modules? |
1,513,088,334,000 |
I build and test a linux kernel source (rolling-stable) for fun, these days, I would like to sign a kernel module with self-created key, then I got the engine PKCS#11 on OpenSSL is used to sign it.
However there is a problem that OpenSSL fails to request a key/certification. So I confirm with pkcs11-tool, but it resul... |
In the scripts sub-directory of the Linux kernel source package, there is a sign-file tool (used to be a script, now a binary tool, built along with the kernel).
Example: linux-6.6.13/scripts/sign-file
You can use it to sign kernel modules:
/path/to/linux-6.6.13/scripts/sign-file sha256 private-key.pem certificate.der... | Should am I need a pysical Smart Card and its reader device to sign linux kernel module? |
1,513,088,334,000 |
I have an Open SUSE micro OS host with kernel 6.5.9-1-default and an Ubuntu 22.04 distrobox container.
I need to install the linux-headers-$(uname -r) and linux-modules-extra-$(uname -r) packages and the problem is that Ubuntu 22.04 at the time I'm writing doesn't have these packages, their most recent kernel is 6.2.
... |
Ultimately, you’ll need to load your modules into the host kernel, so you need to build them with the host’s configuration exactly. Even finding a matching kernel in your Ubuntu container wouldn’t help, you need the headers matching the host’s kernel and configuration.
I don’t know whether micro OS even supports this,... | Linux header and extra modules on ubuntu container from an open suse micro os host with mismatch kernel versions |
1,513,088,334,000 |
I bought a modern laptop which seems to lack a hardware speaker. Is there some kernel module to simulate it over ALSA instead or so? I could find only some very old patched modules from late 90s which barely work on modern kernel versions already.
|
I had the same sort of problem with a cheap amd mini pc. I am getting old and my eyesight is poor so I like the beep when editing or using a terminal. When I snooze onto the keyboard the beeping can wake me :)
After discussion with bodqhrohro he suggested I should answer his question here. I found two solutions, but n... | How to simulate a PC speaker? |
1,513,088,334,000 |
I am running Devuan 3.1.1 32-bit (Debian based) with kernel 4.19 on an old PC and trying to install proprietary Nvidia drivers. The latest version of the driver for the FX 5200 is version 173.14.39.
I have tried two methods for installing Nvidia drivers on my machine. The first is using the .run installer file directl... |
I have the misfortune to be very well versed in this issue.
The first, and correct, solution, is to use nouveau free driver.
Legacy means legacy, and EOL means EOL
While you didn't list your system specs or Xorg version, here's the basic cutoff points of 173.14.39 (the last of the 173.xx.xx series):
Last X.org versio... | Installing Legacy Nvidia Drivers for FX 5200 |
1,513,088,334,000 |
I have fedora.
I installed incompatible drivers: "sudo dnf install broadcom-wl" and restarted linux. Now i am stuck in emergency mode with shell
I tried removing driver module, but for some reason, lsmod | grep wl does not sees this module, so i can not remove it, hence i am stuck in emergency mode. Please help
EDIT:
... |
Removing driver by "dnf remove broadcom-wl" and then doing "dracut --regenerate-all" did not seem to do anything.
Fixed it by simply chrooting into os from live cd and restoring my timeshift snapshot, sorry.
| Uninstalling broadcom-wl driver: Now stuck in emergency mode |
1,513,088,334,000 |
I had to move from Jessie to Stretch as kernel 5.15.49 requires gcc 5.x version (Jessie had 4.9 version Stretch 6.x). I decided to try the ZSTD module compression option in 5.15.x. I ensured to apt-get install zstd beforehand.
Using make bindeb-pkg it gets all the way past compiling and signing the modules but then... |
Debian Stretch has zstd version 1.1.2, which lacks support for the -T0 option which the kernel uses (it instructs zstd to use all available cores).
-T0 can be dropped without adversely affecting the build (other than the time taken to compress the modules); edit scripts/Makefile.modinst and remove -T0 from cmd_zstd.
N... | Using Debian Stretch to build 5.15.x kernel with zstd compression fails with incorrect parameters |
1,513,088,334,000 |
This video shows an example Raspberry Pi Linux kernel module which creates a new character device. It uses the kernel API register_chdev. In a comment to the video (I can not generate a direct link to it), as regards the return value of register_chdev, the author states:
If the return value is not equal to 0, the dev... |
register_chrdev itself isn’t documented in the kernel, but its definition is short:
static inline int register_chrdev(unsigned int major, const char *name,
const struct file_operations *fops)
{
return __register_chrdev(major, 0, 256, name, fops);
}
which basically means it calls __register_chrde... | Linux kernel register_chdev returned value |
1,513,088,334,000 |
Im having trouble with my Debian 11 install reverting back to 3.5mm analog audio output, though HDMI is plugged in and where I want the audio to come out of. Debian GUI has no stock way to disable a output device. Normally the setting in sound area sticks, but recently not always.
Its even tricky to do it with CLI via... |
My approach to solving this was to disable the module/drivers related to the ALC662 device, and luckly this worked while leaving the HDMI sound working still.
First I tried what you will find many examples of, which is adding "blacklist [module_name]" into a .conf file in /etc/modprobe.d/
I found this worked on some o... | Disable Analog Audio, Force Default HDMI Audio - Disable / Blacklist snd_hda_intel Module |
1,513,088,334,000 |
I'm learning driver development and according to the book I read, all Linux devices of same type have same major number are controlled by same driver so for example if we have a computer with multiple UART physical ports all of them will have same major number but different minor number which the driver will interpret... |
Yes, there is a level of indirection. The misc driver is registered as the driver for all device nodes with the corresponding major; it maintains a list of registered drivers. When a device is opened, the first handler is misc_open, which looks for a matching driver in the list and passes control to it.
| How does one misc driver control all this different hardware? |
1,513,088,334,000 |
I have installed ubuntu 20.04 on a qemu arm64 virtual machine. This is based on qemu's arm64 'virt' machine and I added a peripheral in the virtual machine. Now to test device driver, I need to build kernel module and I have to do it on my x86_64 ubuntu 20.04 machine.
Inside the VM, the uname -r command gives me 5.4.0... |
To build a standalone kernel driver, you only need your kernel's header.
It can be installed throught the linux-headers-5.4.0-77-generic package.
Don't mind about what is on repository, just:
Make sure your package database is up-to-date by running as root apt update
Install the required package with, still as root, ... | Where to get linux "5.4.0-77-generic" kernel source? |
1,513,088,334,000 |
I'm trying to register a kprobe to retrieve the address of a syscall. But all my attempts seem to return -22 as the error code. The sample code below (incomplete but contains the related functions) tries to register a kernel probe for the sys_mkdir call.
It doesn't seem to matter if I specify pre or post handlers, sim... |
You’re not initialising the kprobe structure in full, so you’re failing the exclusive or requirement between symbol_name and addr (point 3 in the table in the register_kprobe documentation): addr contains whatever is on the stack on function entry, which is likely to be non-zero, so both symbol_name and addr are non-z... | Unable to register kprobe |
1,513,088,334,000 |
recently I'm wondering why program installed on linux systems are just archives extracted inside system paths and not just archives mounted as read-only entry-points.
As far as I understood, Android apk files are archives that are live-mounted when the app is opened, so why there's nothing similar under other linux-ba... |
fuse-zip already implements this, as a FUSE module, for ZIP files, and archivemount exists for tarballs (or perhaps even anything supported by libarchive). Both of these even implement writes.
There’s nothing similar in the kernel itself, as far as I’m aware; there are related pieces of code in the kernel, e.g. for de... | does a kernel module that mounts archives as read-only directories could be good idea? |
1,513,088,334,000 |
I'm a beginner in LKM programming.
I was writing a simple argument passable module which gains command line arguments and then logs them in alert level.
The problem is that I don't know why it doesn't call the second printk in hello_start function, maybe an error had occurred there but the amazing thing is that it wor... |
Your second printk() does not have a \n at the end, while the first one has.
Also, the bracketed number after the word kernel: is the system uptime in seconds, so it looks like the second message was in fact generated well within the same second of time as the first one.
My first assumption is that the missing \n line... | Loadable Kernel Module logging problem in insmoding process |
1,513,088,334,000 |
I'm creating a program that interacts withkernel headers. The user can provide a path to the location of the headers, but first I would like to be able discover existing kernel headers on the users's machine based on convention. This apparently varies between distributions and tools. I know technically linux is fully ... |
Normally make modules_install but of course distros just package all these modules.
This looks like a Debian/Ubuntu thing. depmod just traverses all the subdirectories under /lib/modules/$version
For Fedora/RHEL/CentOS or the Linux kernel installed from source - the answer is yes.
Normally they are always symlinks
Al... | what are the conventions around /lib/modules? |
1,513,088,334,000 |
I've been looking and looking and everybody explains the /proc/diskstats file, but nobody seems to explain where that data comes from.
I found this comment:
Just remember that /proc/diskstats is tracking the kernel’s read requests–not yours.
on this page:
https://kevinclosson.net/2018/10/09/no-proc-diskstats-does-not... |
So I found it...
it seems the kernel supplies helper functions for you....
you need the request_queue, the bio and the gendisk, call these before and after you process the io...
unsigned long start_time;
start_time = jiffies;
generic_start_io_acct(q, bio_op(bio), bio_sectors(bio), &gd->part0);
generic_end_io_acct(q, ... | How do I get the linux kernel to track io stats to a block device I create in a loadable module? |
1,513,088,334,000 |
I would like to know how a userspace program like modprobe can inject an executable file from userspace to kernel memory?
What kind of syscalls does it issue and what interfaces are provided by the kernel to make that possible? (detailed explanation please).
Thanks.
|
Loading a module is done using either one of init_module or finit_module. The first copies a module from a pointer, the second reads it from a file descriptor. Both support passing additional parameters to the module, and a couple of flags for the kernel.
Unloading a module is done using delete_module, which takes the... | Module (un)loading procedure in the linux kernel |
1,513,088,334,000 |
I have enabled a number of config options on a machine in order to take advantage of the newly-included wireguard module in Linux 5.6.0-rc1.
This was somewhat laborious: I had a minimal working config and guided by the errors I received while trying to put up the wireguard network interface I had to enable, one by one... |
Aha! I believe I have found something reasonably reliable.
Poking around through the Linux tree after configuring and grepping recursively for my module name (e.g. iptable_raw or xt_addrtype or what have you) always produces, among the many matching lines, exactly one of the form
<whatever>/Makefile:obj-$(<RELEVANT ... | match Linux kernel config option to specific module |
1,513,088,334,000 |
I wrote a simple device driver that makes device file using class_create() and device_create() function. But then in the exit function of my driver, I destroyed the class first and then the driver, i.e. I called class_destroy() first and then device_destroy(). Due to this in kernel logs I saw some error messages and d... |
man rmmod:
NAME
rmmod - Simple program to remove a module from the
Linux Kernel
SYNOPSIS
rmmod [-f] [-s] [-v] [modulename]
DESCRIPTION
rmmod is a trivial program to remove a module (when
module unloading support is provided) from the kernel.
Most users will want to use modpr... | How to forcefully remove a loadable module from kernel |
1,513,088,334,000 |
I have a One Netbook 1s running Xubuntu. Everything works find except the touch screen does not work after suspend. I have seen several people with similar problems and it seems like there is a potential solution in this link:
https://github.com/jwrdegoede/linux-sunxi/commit/master
However, I do not understand the di... |
Update: You could try to do this. It worked for me. Note that you need to disable secure boot in bios to be able to run the script.
Install acpi_call package (sudo apt install acpi-call-dkms for Debian/Ubuntu, sudo pacman -S acpi_call-dkms for Arch). For Fedora you can install this module from tlp repo.
https://linru... | Goodix Touchscreen not working after suspend |
1,513,088,334,000 |
Fabian Lee : Software Architect's steps to installing VitualBox:
Make sure the kernel modules (vboxnetadp,vboxnetflt,vboxpic) were loaded properly:
$ lsmod | grep vboxdrv
vboxdrv 446464 3 vboxnetadp,vboxnetflt,vboxpci
My kernel modules seem okay however the numbers don't match Fabian's:
$ lsmod | grep vboxdrv
vb... |
The first number represents the size of the module in memory, and it’s normal for it to vary from one system to another — it depends on the kernel version it was built for, the version of the module being built, and the compiler and compiler settings used.
| My Kernel modules don't match those of the VirtualBox installation guide. Should I be concerned? |
1,535,821,149,000 |
After doing sudo rmmod usbhid the usbhid driver only reopens when I connect a device, which I don't want because I want to write a custom driver for it and I need it disabled until I say otherwise. The driver itself is not dependant of any other, and it does not give me any errors when removing the module.
So, my ques... |
You could leverage the blacklist functions of modprobe.d. Add the module to /etc/modprobe.d/blacklist.conf, or add your custom load command, and then comment it out when you're ready to reboot.
https://wiki.archlinux.org/index.php/Kernel_module#Blacklisting
| How to disable a driver from reopening when connecting a device it recognizes? |
1,535,821,149,000 |
I have written a network hook using netfilter. This modules compiles successfully on my ubuntu 16.04.
Now I want to compile it in my embedded board which uses a customized Linux using same version of kernel in my laptop. The only problem is that all the modules in my embedded board are in .ko.xz format and my makefil... |
The problem is not with the compression, but with the make not finding the correct files. Note that the make command is entering the /lib/modules/<kernel version>/kernel directory, and only then reporting an error. So it's not finding whatever it needs in there.
You cannot substitute /lib/modules/<kernel version>/kern... | module makefile fails for armv7l when modules are compressed |
1,535,821,149,000 |
I try to do something like this - link.
All examples in the web are not working at all.
modprobe ubi mtd=0
modprobe: module ubi not found in modules.dep
modprobe ubi
modprobe: module ubi not found in modules.dep
modprobe ubi mtd=/dev/mtd0
modprobe: module ubi not found in modules.dep
|
Firstly, you should ensure that your module is exists in module directories. For example:
find /lib/modules/$(uname -r) -name 'ubi.ko'
If your module doesn't exist you need to build it.
Secondly, your output module ubi not found in modules.dep tells to you that there is no info about module in modules.dep (man 5 modu... | How to use ubifs image with modprobe? To extract ubifs image |
1,535,821,149,000 |
I have some experience with C/C++.
I have link+ IDE and Start with document this document(http://www.tldp.org/LDP/lkmpg/2.6/lkmpg.pdf)
Now it is based on 2.6 version and some headers have no functions as suggested by book. So, It is creating problem in testing the concepts.
Is there a way to get around with this prob... |
If you are looking for network related kernel development guide then go for Understanding Linux Network Internals - O'Reilly Media. Its a really nice book.
Another interesting way to learn Kernel programming is taking Eudyptulla Challenge.. This will help you to contribute to open source also.
The best way to underst... | Best source to learn Kernel development programming? [closed] |
1,535,821,149,000 |
I'm writing a bash script to install a certain development environment on a computer. In order to do this I need to enable the CONFIG_USB_ACM module in the kernel. I am doing this through:
cd ~/l4t-kernel-surgery-kernel/kernel-4.4
zcat /proc/config.gz > .config
# PART I NEED IDEAS
vim .config # change the line that s... |
zcat /proc/config.gz | sed 's/CONFIG_USB_ACM=n/CONFIG_USB_ACM=m/' > .config
| Kernel Surgery in a Script |
1,535,821,149,000 |
I am writing some firmware for a microcontroller that communicates over USB. I am getting this error from dmesg:
[3034764.122150] hid-generic 0003:16C0:27DB.0015: item fetching failed at offset -1080905469
[3034764.122158] hid-generic: probe of 0003:16C0:27DB.0015 failed with error -22
Does this error come from the k... |
It is from the kernel driver. If you go to the kernel sources web site freetext search lxr, and enter the search string you will find it leads you to the file hid/hid-core.c
1033 hid_err(device, "item fetching failed at offset %d\n", (int)(end - start));
| Where can I find information on hid-generic error codes? |
1,535,821,149,000 |
I wrote a simple module for the Linux Kernel and it has a stack buffer overflow vulnerability. I want to exploit the module, but I have to turn off the stack protector in the kernel first. How could I do this quickly and simply?
Is it required to compile the kernel every time?
Is there any other way to turn off sta... |
Those options work by passing options to the compiler, so the most straightforward way is to recompile the kernel.
However for a reproducible and module-specific way kbuild allows you to set custom CFLAGs on a per-module basis.
https://www.kernel.org/doc/Documentation/kbuild/makefiles.txt
You particularly want to set... | How to turn off stack protector in linux kernel easily? [duplicate] |
1,535,821,149,000 |
I have exactly the same problem as described here. I can find the same "Oops" messages in /var/log/kern.log. I also have an older Radeon HD (so I have to use the free driver). I downloaded the current Debian DVD image, installed it, and my PC is completely unusable, always freezing after a couple of minutes.
So from w... |
Short answer: Linux kernel 4.4 does not have this bug. You should not run into it on Ubuntu 16.04 LTS.
Detailed answer
If you follow the email chain that you linked, you'll get to this message by Nicolai Hähnle:
Kernels that contain commit 954605ca "drm/radeon: use common fence
implementation for fences, v4" ar... | Avoiding a buggy kernel version with "Oops" in radeon module |
1,535,821,149,000 |
I'm on an archlinux 4.4.1-2 and I'm trying to set up a netctl service.
Problem is that for netctl to work I need to have bcma and b43 loaded.
Since these two are not out-of-tree modules I thought I didn't had to load them myself.
Neverthless I also tried to load described in this article here.
Unfortunalty this doesn... |
There is a file /etc/modules which lists modules to be loaded at boot. Just add those modules to that file
| module not loaded at boot |
1,535,821,149,000 |
I've been experimenting with the g_mass_storage kernel module.
I first tried loading it by putting it in /etc/modules and the options in /etc/modprobe.d/file.conf
This worked, but when I connected the device to a computer the mass file storage was read only - not what I was looking for.
I reasoned that this was becaus... |
A [probably not perfect] solution to this has been to hook onto the "systemd-remount-fs.service" systemd service, which is the remounting of the filesystem to read-write.
This means the module will be loaded as early as possible, whilst still being loaded after the filesystem becomes readwrite.
My sample systemd confi... | How do I load a kernel module later in the boot sequence? |
1,535,821,149,000 |
I'm developing my first sound card driver in Ubuntu with ALSA.
Implementing a volume control for the sound card I stumbled upon a few questions.
1) For the function that is assigned to snd_kcontrol_new.info, I'm trying to understand the logic behind choosing the values of snd_ctl_elem_info.value.integer.min and max. m... |
The control values typically are just the hardware's register values.
The mapping between control values and dB values is done with TLV metadata.
"PCM" applies to the sound played through the PCM device, while "Master" applies to all sounds played.
| ALSA sounds card volume range numbers, and Difference between Control Names |
1,535,821,149,000 |
I have Ubuntu 15.04 with a default full disk encryption installed on my chromebook Pixel with linux-samus kernel patch and everything is working fine. I've just tried compiling a newer version of the kernel (4.1), but when I'm trying to boot it I'm getting an error where I would normally enter the disk encryption pass... |
The Device Mapper driver is missing. Run make nconfig or make menuconfig:
Device Drivers --->
[*] Multiple devices driver support (RAID and LVM) --->
<*> Device mapper support
and recompile your kernel.
| Booting encrypted disk kernel error: Cannot initialize device-mapper |
1,535,821,149,000 |
I am using the find command in my Android image; a image which I developed myself and put in an example of a dynamically loadable module. I put the code in the /example directory of my source code, compiled the code, and flashed the phone with it.
I am not sure if it is relevant to my question, but I put the .ko fil... |
If you'd like to avoid "permission denied" errors and search recursively the whole Android filesystem, you'll need to have a "rooted" device.
Afterwards, having a rooted device, you may install any Terminal emulator application, run su and run find command.
E.g., you'd like to find all files with .ko extension, so ple... | How do I find a directory or a file in Linux file system [closed] |
1,535,821,149,000 |
I have been a arch linux user for the past 2 years and now moving on to freeBSD for kernel development.
I have install freeBSD and want to compile a dynamically loadable kernel module for freeBSD. As far as I know, On linux I just need to install linux-headers for the kernel version I am compiling against.
Is ther... |
You can find it in /usr/src or you can download from here (src.txz).
In FreeBSD the base system is outside of package manager. You can't install kernel package, system utils (cp, ls, etc.) package, etc.. They are part of base system - you can update with freebsd-update (it's part of base system, of course). Check docu... | How do I install freeBSD headers ? |
1,535,821,149,000 |
I am writing a common code in a driver to get the distros name and host name. host name i am taking from struct utsname{nodename[]}, but how do I get the distro name?
|
The Scope for getting distro name is not in kernel development scope. So no specific method is present currently. I am asking for module param in my driver for this. you can also ask for a ENV variable while compiling.
Thanks, for your help...
| Linux Distro name API to get name of linux distro in a driver code? |
1,535,821,149,000 |
I am using a Dell Vostro 1500 (looking to buy a new computer) and I have installed the wifi drivers with b43-fwcutter or whatever the actual name of it is, but you probably know what I'm talking about.
I am having a problem where I need to enable the wifi kernel module every time I boot my computer, using sudo modprob... |
So I tried all of the methods on those links and also the one @jasonwryan put in his comment, which is direct to the Arch wiki. None of them worked.
I found this fishy and just started exploring. Found /etc/modprobe.d/broadcom-wl.conf which contained the following line (among others):
blacklist b43
So it was getting ... | Auto-load B43 wifi card module in Arch Linux |
1,535,821,149,000 |
From here: http://www.xenomai.org/index.php/RTnet:Installation_%26_Testing#Testing_with_a_single_node_.28local_loopback.29
TODO: simplify the following steps.
- Then you need to edit the file rtnet.conf under the /usr/local/rtnet/etc folder for the correct setup to run RTnet. Edit the following parameters:
- Se... |
In the last source distribution, (rtnet-0.9.12.tar.bz2), I can see rtnet-0.9.12/drivers/experimental/rt_r8169.c, so the rt_ nomenclature remains. The module filename should be rt_r8169.ko. It's not there either because it wasn't compiled, or because it failed to compile (it is under the ‘experimental’ subdirectory, af... | What is the realtime equivalent of the module r8169? |
1,699,409,805,000 |
I'm trying to build a driver for a USB to HDMI adapter...
Bus 001 Device 010: ID 534d:6021 MacroSilicon VGA Display Adapter
NOTE: "lsusb" output.
... but this error is occurring...
Fatal error: Invalid --compress-debug-sections option: `zstd'
...as can be seen in the full output below...
[eduardolac@eduardolac-pc ms... |
The problem occurs because the "ld" binary used in my case, for some reason, was provided by "Homebrew"...
[eduardolac@eduardolac-pc ms912x]$ pacman -Qo ld
error: No package owns /home/linuxbrew/.linuxbrew/bin/ld
So the solution, for me, was to remove "Homebrew", as I wasn't using it for anything...
/bin/bash -c "$(c... | “binutils”/Kernel 6.5.X - “Invalid –compress-debug-sections option: `zstd’” |
1,699,409,805,000 |
I have a kernel module (ko) file that is designed for the aarch64 architecture. I'm currently attempting to use qemu on a non-aarch64 system to utilize this aarch64 kernel module for mounting a specific file system within the non-aarch64 system.
I'm curious if it's possible to load and use this module using qemu?
|
No, you can’t use QEMU to load a foreign-architecture kernel module. Modules have to match the architecture of the kernel they’re loaded into (and its ABI, so you can’t load an arbitrary binary module anyway).
The only way you can load your module is to run a VM using QEMU, with the matching foreign-architecture kerne... | Load kernel modulebusing qemu |
1,699,409,805,000 |
How do I fix that following errors
root@DESKTOP-OK32G:/mnt/c/Windows/system32# service openvswitch-switch start
modprobe: FATAL: Module openvswitch not found in directory /lib/modules/5.10.102.1-microsoft-standard-WSL2
* Inserting openvswitch module
rmmod: ERROR: ../libkmod/libkmod-module.c:1941 kmod_module_get_holde... |
The Mininet documentation states: "VM installation is the easiest and most foolproof way of installing Mininet, so it’s what we recommend to start with".
Therefore, I suggest you setup the VM as suggested by the docs: http://mininet.org/download/
Secondly: if you really want to use openvswitch inside WSL, you will pro... | Error with starting Openvswitch on wsl2 |
1,647,733,147,000 |
I checked:
https://cateee.net/lkddb/web-lkddb/CRYPTO_RSA.html
The help text is:
Generic implementation of the RSA public key algorithm.
Is this driver for an encryption HW device, ex: from Intel/AMD CPU?
|
No, CRYPTO_RSA provides a generic implementation of RSA, i.e. one which isn’t hardware-specific. It works on any system the kernel works on.
| kernel config, CONFIG_CRYPTO_RSA, what is this config for? |
1,647,733,147,000 |
I am seeing this log:
request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module foo, throttling...
I don't understand what does it mean?
auto load too many modules?
|
It means that there are too many modules being loaded in parallel, and that the kernel is waiting for some to complete loading before proceeding with the requested module.
If you don’t see a subsequent error message, either
request_module: modprobe foo cannot be processed, kmod busy with … threads for more than … sec... | request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module xxxxxx, throttling |
1,647,733,147,000 |
I'm trying to build and install a linux kernel driver for the mcp251xfd. The build appears to be successful (I get the .ko file), but when I call insmod to install it, I get:
insmod: ERROR: could not insert module mcp251xfd.ko: Invalid module format
In googling around, it appears the most common suggestion is to use ... |
The solution was to open the Makefile (the one at the linux source tree) and modify the line:
EXTRAVERSION = -300.fc34.x86_64
Which matches the installed OS's uname -r text.
| insmod coult not insert module invalid module format |
1,647,733,147,000 |
I am trying to implement a PCI device driver for a virtual PCI device on QEMU. The device defines a BAR region as RAM, and the driver can do ioremap() this region and access it without any issues. The next step is to assign this region (or a fraction of it) to a user application. To do this, I have also implemented an... |
I've solved this issue and managed to map PCI memory to userspace via the driver.
I've changed the pfn input of the remap_pfn_range function I was using in my custom .mmap
The original was:
io_remap_pfn_range(vma, vma->vm_start, pfn, vma->vm_end - vma->vm_start, vma->vm_page_prot ))
where the pfn was the result of th... | How can my PCI device driver remap PCI memory to userspace? |
1,647,733,147,000 |
I was trying to get the uid of the process runner which is calling my syscall. I use linux/cred.h and its macro called current_uid() .
The problem is that it returns a type which is unknown for me, kuid_t. So I can't save the return value to an int type static variable. Here are parts of the code and error:
static int... |
kuid_t is defined in linux/uidgid.h it's just a simple struct with one uid_t member.
typedef struct {
uid_t val;
} kuid_t;
You should be able to get the uid_t value using current_uid().val and uid_t is just an usigned int.
| Problem in gaining uid of the system caller in a system call LKM using cred.h |
1,647,733,147,000 |
I added my custom driver to be inserted automatically at boot using:
cp ./driver/mydrv.ko /lib/modules/$(uname -r)/extra/
depmod -a
Now I'd like to update with a new version of the driver, I launched the same command but the previous version is inserted...
find /lib/modules -type f -name *mydrv* I removed all the exi... |
As @stoney said, initramfs has to be regenerated. The reason of the corruption is unknown.
Remove all the *.ko to remove in weak-updates folder.
Generate initramfs: dracut -f --regenerate-all for Centos/RHEL/Fedora
| How to remove/disable the insertion of a driver added with depmod -a? |
1,647,733,147,000 |
UPDATE
Whenever I try to upgrade or install any package no I get the following error
libc6-dbg : Depends: libc6 (= 2.31-0ubuntu9.1) but 2.31-0ubuntu9 is to be installed
libc6-dev : Depends: libc6 (= 2.31-0ubuntu9.1) but 2.31-0ubuntu9 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no pa... |
While trying to install or upgrade I saw this weird error
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another p
rocess: Resource temporarily unavailable
I looked up what process blocked it with
sudo fuser -v /var/cache/debconf/config.dat
I've got a lot of permission denies but at the botto... | Errors in packages after signing kernel modules |
1,647,733,147,000 |
I tried to compile an Android 8 kernel to contain a driver for TP-Link TL-WN722N USB Wi-Fi card for a smartphone, the kernel is flashed successfully, but when I plug the Wi-Fi card via OTG to the phone, it's not recognised by software.
Here are some debugging I have done:
The Wi-Fi card is showing in lsusb -t output, ... |
I finally got it working, it turns out the Atheros device requires a .fw firmware file to be placed in right directory to work, I noticed this because an error of loading firmware failed message shows in dmesg every time I plug in the wifi card.
I also tried to bind driver to device like @nobody suggested, but I'm not... | Why is a loaded module not being driver of the device? |
1,647,733,147,000 |
I want to make some changes in ath9k drivers for learning purposes.
My problem is that when I try to compile the driver, the make command is giving many implicit declaration errors, setup_timer, ACCESS_ONCE, DECLARE_EWMA are the most frequent ones that show up in the errors.
My kernel version is Ubuntu 4.15.0-20-gener... |
I was compiling the driver module from the torvalds linux kernel, that was the problem, now I am compiling it from the Ubuntu source code, and it is working...
| How to compile ath9k drivers from source? |
1,582,710,236,000 |
When I run the command:
cat /lib/modules/4.15.0-20-generic/modules.alias | grep 'ath9k_htc'
I get the following list:
alias usb:v0CF3p20FFd*dc*dsc*dp*ic*isc*ip*in* ath9k_htc
alias usb:v0930p0A08d*dc*dsc*dp*ic*isc*ip*in* ath9k_htc
alias usb:v04DAp3904d*dc*dsc*dp*ic*isc*ip*in* ath9k_htc
alias usb:v0411p0197d*dc*dsc*dp*... |
The line is formatted with the vendor and product id
e.g.
alias usb:v0CF3p9271d*dc*dsc*dp*ic*isc*ip*in* ath9k_htc
Has Vendor ID of 0CF3 and a Product ID of 9271
You can use lsusb to see which device you have plugged into your machine has matching vendor/product ids.
| How to know for which alias name, the module is loaded, when there are multiple aliases? |
1,582,710,236,000 |
When doing lspci, usually we can see a driver in use:
ex:
Kernel driver in use: xhci_hcd
If there is no 'driver in use', does it mean really no driver or it may a driver in use but not external module ( kernel built-in module )
|
Kernel built-in modules will also be reported by "kernel driver in use". For example, my system reports a skl_uncore driver in lspci, and there is no corresponding module in lsmod, so it is a driver that is built into the kernel.
On PCI bridge devices, some of them might not need a driver as they are covered by the ge... | lspci can't see driver name in use |
1,582,710,236,000 |
I am following an online tutorial on how to enable VMX operations on x86 architecture. The tutorial has broken the procedure into steps and has posted the code assembled from all the parts into a kernel module. It has also provided a Makefile to compile it. Both of them can be viewed here. While compiling it I am gett... |
It seems that the definitions for _ASM_EXTABLE_HANDLE and ex_handler_rdmsr_unsafe are included in the linux headers 4.15.0-72-generic. Previously I was running Ubuntu 16.04 LTS with linux headers 4.4.0-81-generic. Upgrading to Ubuntu 18.04 LTS (which also upgraded the linux headers to 4.15.0-72-generic) fixed the issu... | Error while trying to compile kernel module |
1,582,710,236,000 |
I am writing a kernel module. Reads bytes from user space and writes back.
static ssize_t dev_read(struct file *filep, char *buffer, size_t len, loff_t *offset) {
Node *msg;
int error_count = 0;
// Entering critical section
down(&sem); //wait state
msg = pop(&l, 0);
// No message? No wait!
... |
I have just solved it. Murray Jensen was right. It was the recursion that was killing my kernel.
Could somebody explain why I spent 7 hours to learn this? What is the maximum recursion depth C is capable of in reality? I read an article this morning ad it was saying 523756 I read it here, scroll down to C.
Here's my ... | Kernel space memory deallocation freezes kernel |
1,582,710,236,000 |
If I have 3 pthreads: A, B, C, all originating from the same process, running in user space and one thread, thread B does a blocking read from a kernel module and is put to sleep, will threads A and C also be put to sleep as a result?
According to the documentation, wait_event_interruptible puts the calling process to... |
After testing personally, it appears only the calling thread is put to sleep, not any other threads. While one thread was waiting during a blocked read, the other threads were still active.
| Do all threads originating from the same process sleep on wait_event_interruptible()? |
1,582,710,236,000 |
I am trying to write an ansible playbook to check to see if a particular module is loaded for the current kernel running.
if I do an lsmod | grep my_module_$kernelVer
I would see something like
my_module_2_6_32_754_3_5_el6_x86_64
if I am on the 2.6.32-754.3.5.el6.x86_64 kernel
if I am still on that kernel and said ... |
if I do an lsmod | grep my_module_$kernelVer
Ok, that's the invocation of a shell module. It needs to be a shell because you're using |, and that's a shell construct.
I know how to do it in bash but I am not sure how to store a specific value with ansible and the register command and I am just learning ansible.... | Ansible Search for kernel module loaded |
1,582,710,236,000 |
I'm trying to follow this guide to setup NAT on my Synology NAS. It worked great for me! I had everything working perfectly. But when I came back the next morning, the NAS had done a system update [DSM 6.2.2-24922]... The scripts were gone and after recreating them I get errors that the NAT kernel modules cannot be lo... |
In the end I just installed a TinyCore Virtual Machine on the NAS which can handle the NAT. It seems a bit unnecessary, but I guess it's a little more controllable... so it works.
| Synology NAS insmod unknown symbol |
1,582,710,236,000 |
I'm compiling a kernel just for learning purpose, and I almost get all things working, bluetooth, hdmi, usb, card reader, webcam, wifi... etc. But I can't make touchpad works, all that I know about it is...
xinput:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST p... |
After reading about i2c I find out what I was missing, basically:
CONFIG_X86_INTEL_LPSS
PINCTRL
CONFIG_MFD_TPS68470
CONFIG_I2C_DESIGNWARE_CORE
CONFIG_I2C_DESIGNWARE_PLATFORM
CONFIG_I2C_DESIGNWARE_SLAVE
| How do I Get Support for Acer E5-573-54zv Touchpad on a Custom Kernel |
1,582,710,236,000 |
I am trying to get virtualbox working on my machine with the pci-passthrough extension. When trying to run a VM, I got this error message:
Kernel driver not installed (rc=-1908)
[message asking me to install the vboxdrv kernel driver
by executing /sbin/vboxconfig as root]
So I did so and got this:
vboxdrv.sh: Stoppin... |
From the question comments:
modprobe: ERROR: could not insert 'vboxdrv': Required key not available
This indicates the module is already built, but it has not been signed to satisfy Secure Boot requirements.
The simplest workaround would be to just disable Secure Boot. This is especially true with VirtualBox 5.2, bec... | Error building virtualbox pci-passthrough kernel module - what went wrong? |
1,582,710,236,000 |
I've a kernel-panic problem (I think) trying to use the liveCD of gNewSense 4.0 for i386.
The error is the following:
[8.598401] xhci_queue_intr_tx: 78 callbacks suppressed.
.
.
.
It's showing the same error with different codes (70 for example) as long as my laptop is turned on.
I'll give you some information about ... |
This distribution doesn't have proper drivers for 2 USB and network card that comes with my laptop. I've just installed Trisquel and it works perfectly now!
| gNewSense livecd gives me an Error (callbacks suppressed) |
1,582,710,236,000 |
I have built an Linux From Scratch system on my laptop, but am struggling to get my Elan Touchpad working. I have narrowed down the search to an issue with the module i2c_designware_core not being loaded.
I am trying to load the module i2c_designware_core, but get an error:
$ modprobe i2c_designware_core
[ 197.55193... |
Turns out I had made a terrible mistake when installing the kernel, causing GRUB to load an older one. I guess it makes sense that the duplication happened when trying to load the external module at the same time as the module was built-in.
Sorry for the trouble.
| Modprobe could not insert module; exports duplicate symbol [closed] |
1,582,710,236,000 |
I'm currently doing some project of secure the kernel with syscall hooking and logs...
Now I've done hooking read, and socket system calls, and when I tried to do the same thing with execve (to follow which file have just executed) I get a kernel ops or just I did something wrong because I can't even open the dmesg t... |
Have you looked into kprobes? Or specifically jprobes.
Using jprobe you can hook into execve (or any other kernel function), check its arguments etc just before that function gets executed. The way it works is, caller provides a function with same signature as the one which it wants to trace, and registers it with a c... | Follow files execution by a kernel module [closed] |
1,582,710,236,000 |
I have RedHat Enterprise Linux Server 7, with kernel: 3.10.0-514 and I downloaded the linux kernel version 4.12.10 and I compile it and configure it without having any error here are the commands I executed:
make mrproper
make dep
make clean
make bzImage
make modules
make modules_install
the execution was done wit... |
Update your initramfs first :
sudo update-initramfs -c -k <kernel name>
For Rhel :
dracut -f -v /boot/<kernel name>
And then update your grub :
sudo update-grub
For Rhel:
grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg ##For BIOS based machines.
grub2-mkconfig -o /boot/grub2/grub.cfg #For UEFI based machines.
| Unable to load new kernel version in RedHat 7.3 |
1,582,710,236,000 |
OS Debian Jessie uname -a
Linux Taomon 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u2 (2017-06-26) x86_64 GNU/Linux
Notebook
dmidecode -t 1
# dmidecode 2.12
SMBIOS 2.5 present.
Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: Acer
Product Name: Aspire 7736
... |
Now it works as I will. I created 2 udev-rules. The 1. erase the device /dev/input/js0.
cat /etc/udev/rules.d/98-accelerometer.rules
# joystick-fix
SUBSYSTEM=="input", ACTION=="remove", ATTRS{name}=="Acer BMA150 accelerometer", ATTRS{phys}=="wmi/input1", RUN+="/bin/rm %E{DEVNAME}"
SUBSYSTEM=="input", ACTION=="add",... | Module acer-wmi blocks gamepad |
1,483,543,885,000 |
My sound subsystem dies irregularly. It can be fixed by rebooting, but I am wondering if I can fix it simply by restarting it - thus avoiding the reboot.
I have tried:
pulseaudio --kill
That does not fix the problem.
Then I tried unloading the modules (to reload them later):
sudo modprobe -r snd_hda_codec_hdmi
sudo m... |
This script https://gitlab.com/ole.tange/tangetools/tree/master/sound-reload fixes it for me every time.
| Sound dies. How to get it working again without rebooting? |
1,483,543,885,000 |
I am trying to get my android kernel working but I have a kernel module that is needed in order to get access to the file system of the device. Unfortunately there is no source code available so there are only the pre-compiled module and the kernel source. The kernel now tries to load the module without success. In th... |
The problem was the config file of the kernel. It disabled some features so the module would not load.
| Add symbols of LKM to kernel |
1,483,543,885,000 |
I developed a module which works as an emulator for a block device. When I write into the block device, I get this in dmesg and the module crashes. I cannot get any hint about what is going on?
[82013.054224] CPU: 9 PID: 15452 Comm: my_blk/0 Tainted: G B I E 3.19.0+ #1
[82013.054226] Hardware name: Dell Inc. ... |
This problem happens when I set CONFIG_PREEMPT=y in my kernel configurations. To solve the problem on linux 3.19.0, I had to apply following patch, which change smp_processor_id() to raw_smp_processor_id() in drivers/scsi/megaraid/megaraid_sas_io_fusion.c. The patch is in the following link:
http://permalink.gmane.or... | CPU: 13 PID: 15452 Comm: ssd_blk/0 Tainted: G B I E 3.19.0+ #1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.