ioctl return -1 with errno set to EPERM

I have a C program which calls ioctl() but it returns -1 and errno set to EPERM. But I have changed mode of that file to "777". Can you please tell me why ioctl() still returns -1 with errno set to EPERM?

alsa on my target device says "cannot find card'0'"

I'm trying to enable my target's sound card to work through ALSA, it's a Qualcomm MSM8660 Snapdragon which means there is no pci devices and running a kind of embedded linux. Because this device...

Errors in compiling Linux kernel module: "CONFIG_X86_X32 enabled but no binutils support" and unwanted "n" characters

I am trying to get Rasta Ring0 Debugger version 0.3 compiled in my x86-64 Linux, it's a Linux kernel module. I have replaced 32-bit inline assembly with 64-bit assembly as explained in my question...

How do I intercept messages from a USB device on Linux?

I have a popular drawing tablet that I connect to my PC with USB. Once connected, the tablet detects hand movements and manipulates the pointer accordingly. Somewhere, the tablet is transmitting...

Unable to set proper resolution/not detecting display properly

This is probably the farthest removed Q&A place to ask about this, but I've tried every other reasonable and/or obvious source I can think of with no luck. I have both a BeagleBone Black and a...

What is the possible use of dev_set_drvdata and dev_get_drvdata

I just want to know what is the possible use case when we have to use these set and get driver APIs. All I get to know that the data is saved, and at a later time we can use data to do something....

Difference between arm-eabi arm-gnueabi and gnueabi-hf compilers

What is the difference between arm-eabi, gnueabi and gnueabi-hf cross compilers? I am kind of finding it difficult to choose the executable that is correct for my target platform. Is there a...

What's the difference between "COM", "USB", "Serial Port"?

I am confused about the these 3 concepts. My understanding is, Serial Port usually means RS-232 compatible port (RS = Recommended Standard). USB stands for Universal Serial Bus. So its name...

How do you link a device to a custom sysfs class?

I'm writing drivers for several pieces of custom hardware. All of the devices are attached via PCIe to a host computer. For convenience I would like to group all of these custom devices together...

Compiling Intel AVX instrinsics for Linux Device Driver with GCC

I am running gcc version 4.8.2 on ubuntu on corei7. Found about AVX intrinsics from google search, but I am not sure if this set of intrinsics can be used and compiled for Linux device driver. If...

Docker error : no space left on device

I installed docker on a Debian 7 machine in the following way $ echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list $ sudo apt-get update $ curl -sSL...

What happened when kfree function called

I am testing kernel module that allocates memory using kmalloc to some variable and memset it's value and free. Here is the code with zeroisation memory routine. unsigned char *a = (unsigned...

Confusion regarding kernel version, device tree, and buildroot

I was provided with a 3.0.35 linux kernel for an arm i.mx6 board that uses the older "board file" format, as well as an older (2013.02) buildroot repo that has been used to generate the proper...

Linux kernel dtb vs dtbo

I am developing a device driver for a device.I wanted to know besides writing the device driver what and when it is necessary for it - a device tree blob (dtb) or a device tree overlay (dtbo). Is...

Generate PTS/SCR value for MJPEG uvc payload header

We are working on one UVC driver to stream mjpeg to host applications. We are using simple two bytes uvc frame header without any pts/scr value added to it. code works fine with all the linux...

Is there any way for ioctl() in linux to specify submission queue ID for a nvme IO request

I am working on a testing tool for nvme-cli(written in c and can run on linux). For SSD validation purpose, we are actually looking for sending I/O commands to a particular Submission queue(IO...

how to solve Kernel configuration is invalid issues

I'm trying to build module. But here's some issues. ERROR: Kernel configuration is invalid. include/generated/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig &&...

Writing a compatible watchdog kernel module

I am developing a custom watchdog driver for the Beaglebone black SBC. There is an external entity connected to the BBB. It will reset the board if it wont receive a GPIO state change from the BBB...

DPDK MLX5 PMD driver probe issue

I'm not able to use the mlx5 pmd driver with some Mellanox NICs I have installed on my server. The error I'm receiving during EAL initialization is: et_mlx5: no Verbs device matches PCI device...

Ubuntu 18.04 - Bluetooth Device Is Not Recognized

Today, for some reason that I can't understand, the Bluetooth stopped working. I was looking for a solution with no success. Here is some information: $ lspci -nnk | grep -iA2 net; lsusb;...

Minikube apiserver stopped frequently

I am using minikube v1.11.0 on Microsoft Windows 10 Pro . my minikube stopped frequently ,Find minikube status Minikube Status: type: Control Plane host: Running kubelet: Running apiserver:...

Buildroot / Busybox and OTG Ethernet Adapter at Raspberry Pi Zero -> Missing ethernet interface

I have a Raspberry Pi Zero with an OTG micro USB hub with network adapter included. The adpater works fine if I use the Raspbian: $ lsusb Bus 001 Device 003: ID 0fe6:9700 ICS Advent DM9601 Fast...

W tensorflow/core/common_runtime/gpu/gpu_device.cc:1598] Cannot dlopen some GPU libraries

How should I fix this in CentOS 7? [[email protected] ~]$ pip freeze | grep tensorflow tensorflow-estimator==2.2.0 tensorflow-gpu==2.2.0 [[email protected] ~]$ python Python 3.8.5 (default, Mar 31 2021,...

How do I run XEN on arm64 and Qemu 6.0.0 with Linux 4.20.11 as Dom0

thank you for reading and appreciated for reply! I followed this doc and successfully ran xen 4.12.0 on qemu 3.1.0 with Linux 4.20.11 as Dom0. Then I tried to use higher version of qemu(qemu 5.1.0...

Booting Linux on QEMU/RISC-V64/Busybox leads to error finding `/init` post boot

I'm trying to boot Linux on QEMU for RISC-V. I have set up my own toolchain described below: riscv-gnu-toolchain from [email protected]:riscv/riscv-gnu-toolchain.git qemu v5.2.0 from...

Yocto - adding out of tree kernel module

I would like to add a wifi out-of-tree kernel module to my Yocto project. I found a layer on Open Embedded Layer Index with the driver that I need...

Why does Linux sometimes hold back a UDP packet during receiving? (until next incoming UDP packet resolves that)

The problem is: Sometimes tcpdump sees that the receiving of a UDP packet is held back until the next incoming UDP packet, although the network tap device shows it goes without delay through the...

Error with Go program ( Bettercap 2 ) depending on which bluetooth dongle I use on Ubuntu/Raspberry Pi OS when running ble scan

I use this on Ubuntu 20.04 and Raspberry Pi OS 5.10 but this is not a Linux related issue. I'm having an issue with a Go program called Bettercap 2 ( https://www.bettercap.org/ and the repository:...

How to downgrade from CUDA 11.4 to 10.2 & add sm_35 - CUDA error: no kernel image is available for execution on the device

I'm trying to run a piece of code on Pytorch, but I get the error: RuntimeError: CUDA error: no kernel image is available for execution on the device I've narrowed down the issue to be a...

RPI OpenGL PWM display driver

So I'm building a system based on a raspberry pi 4 running Linux (image created through buildroot) driving a Led matrix (64x32 RGB connectors) and I'm very confused about the software stack of...