People who code: we want your input. Take the Survey

Questions tagged [devices]

devices refers to questions about the Unix/Linux device special files, normally these are under /dev. Do not use this tag for physical devices (for that use e.g. usb or pci).

Filter by
Sorted by
Tagged with
0
votes
1answer
55 views

Can you create a device file by yourself

I'm learning about Linux and Unix and I'm curious if you can create a block or tty device file without having to plug a real one in, using a command, and in a custom place other than /dev. Something ...
1
vote
0answers
15 views

Prevent Kernel from device binding until a response

I want to write somethings like udev in Linux. I know that udev uses Netlink socket to receive uevets from the kernel. so I can do this by defining a socket with AF_NETLINK type and listen to kernel ...
1
vote
1answer
31 views

How to solve failure in plugging external DVD driver in Ubuntu 20.04?

I have bought an external DVD driver but, after plugging (or booting with the unit already plugged) I see the unit listed in the resources of the computer but I cannot access it: If I try to access ...
1
vote
1answer
42 views

How to open and read a character device as binary file?

I'm working with USB and I want to read the content of usb device descriptor in /dev/bus/usb/00x/00y - it is a character device. I used fopen to open it as a binary file with "rb" parameter. ...
0
votes
0answers
13 views

What is the correct way to match a udev rule on a specific partition UUID?

There is a somewhat related question here that has a successful answer, but they ended up matching on ENV{ID_PART_ENTRY_TYPE}. I want to match on ENV{ID_FS_UUID} and it does not work for me. My ...
1
vote
1answer
28 views

Where is the udev documentation for describing what “P”, “N”, “L”, “S”, “E” prefixes mean in `udevadm info` output and how they relate to rules?

Note: There is a related question here which describes output for this person's specific situation and for their block device "/dev/sdb", but i am trying to set something up for a specific ...
0
votes
0answers
28 views

What is the utility and risk of the option -D in rsync --archive?

I use sudo rsync --archive --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*",/lost+found} a lot for ...
0
votes
0answers
18 views

Is It Possible/Advisable to Change Device USB Device Status from Terminal?

Running Pop_OS 20.10, I'm occasionally having problems with my headset not working after waking from sleep. The device is plugged in, and the issue persists even after switching from one USB to ...
0
votes
0answers
18 views

Using Udev Sound Device with ALSA

Inside of a C program, using libudev and libasound, I have determined a struct udev_device *device is part of the sound subsystem with udev_device_get_subsystem(device) == "sound". Now I ...
0
votes
0answers
21 views

Linux driver use, device and device file clarification

Need help filling in some knowledge gaps on driver use in user applications. I have a digital IO driver. I compile the driver and install it on boot with modprobe and when i check in /dev I can see /...
0
votes
1answer
69 views

How does Debian or Linux in general assign device-names like /dev/sdX on ZFS?

I have three identical servers, all three same cabeling and correctly placed hard-disk. Allthough one of the server got /dev/sdg /dev/sdh for the sata-ssds while the other two servers got them on /dev/...
1
vote
2answers
49 views

How can I mount /dev from C?

How can I mount /dev from C? I'm writing a simple init, and I know this sounds stupid but I would like to have /dev mounted to another folder. The manpages for mount() don't show dev as a supported ...
2
votes
1answer
29 views

From the Linux kernel's point of view, how does a user program communicate with a CUDA GPU?

I am curious about how data is copied back and forth between CPU and GPU memories when I run a CUDA program. Specifically, I want to know how the Linux kernel is involved in this process. I had a few ...
3
votes
1answer
38 views

How does Linux decide when to reuse USB minor device numbers?

When USB devices are connected in Linux the kernel assigns them a minor device number (i.e. the 0 in /dev/ttyUSB0). It seems that if I have a device at /dev/ttyUSB0, when I remove it and plug in a new ...
0
votes
1answer
41 views

Does device drivers use Kernel logical address space or Kernel virtual address space?

If possible, can you point to documentation or describe the kernel space memory layout? When a device driver instantiates a variable does that variable live in the kernel space or does it live in user ...
0
votes
1answer
14 views

Is there a reliable path to specific device events?

I'm running ubuntu linux and I have a bluetooth mouse that I would like to capture evdev events from. The problem is that the event device can potentially be different any time I connect the mouse: ...
1
vote
0answers
22 views

How can I backup a mount without a corresponding /dev special file?

Typically, I would just e.g. dd if=/dev/sda | gzip > backup.gz or something similar, but in this embedded device, I have a filesystem /dev/root on /rom type squashfs (ro,relatime) without a ...
0
votes
1answer
24 views

Dmesg ring buffer overload problem

I am writing a device driver. I need to seek in system logs; for that I use dmesg. In my case dmesg is overloaded with these warnings: [ 5578.052140] pcieport 0000:00:1c.5: AER: Corrected error ...
2
votes
1answer
103 views

Hide devices in chrooted environment

On Linux, I'm looking for a way to run grub-install <device> and update-grub in a chrooted environment without some devices being taken into account by GRUB (I don't want them to appear at boot)....
1
vote
0answers
35 views

How to mount device that appears in /proc/devices but not /dev?

I'm using a bare bones Linux distribution running on a Phytec i.MX6 ULL SoM on the Phytec demo board for this SoM. I need to be able to copy a file from an SD card. I flashed the SoM NAND from an SD ...
1
vote
0answers
14 views

USB device detection unreliable

I am running an Arch Linux and I have some issue with USB audio device detection on the running system. The detection works fine most of the time and is totally reliable on reboot, but especially when ...
0
votes
0answers
9 views

second bluetooth device on debian

I have debian xfce plus nomfree drivers installed, have a bluetooth keyboard installed and its working, where I use bluetoothctl to connect it, if I try to connect a second device like a bluetooth ...
0
votes
0answers
23 views

Why can't I read /dev/disk0 in macOS as root?

I am trying to read the partition table of my startup disk manually. I open sudo python and issue f=open('/dev/disk0', 'r'). What happens is that I get PermissionError: [Errno 1] Operation not ...
-1
votes
1answer
34 views

copy files from the folder on one disk to the folder on another disk

how to copy files from the folder on one disk to the folder on another disk use cp command? (from the current directory on sda2 to folder on /dev/sdb3?)
1
vote
1answer
62 views

Mounting encrypted SD card: where does /dev/dm-3 come from?

I was trying to mount an encrypted SD card on Kubuntu 20.04. lsblk gives me this: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop0 ...
0
votes
1answer
35 views

How to convert stream data which come over udp to video device?

I'm trying to share my computer's camera with the remote computer. In order to do this, I wanted to share my own computer's camera with the udp port(stream), take the stream on the remote computer and ...
0
votes
1answer
88 views

udev rule for wacom tablet that has changing IDs

I had a lot of trouble trying to configure the buttons on my wacom tablet on a manjaro installation. I ended up using this answer to actually get it working, but it only worked some of the time ...
0
votes
1answer
136 views

Why does PulseAudio open all ALSA sound devices when it starts?

See also How does PulseAudio start?. When the PulseAudio audio daemon starts, it by default loads module-udev-detect, which detects and opens all of my sound cards. PulseAudio uses ALSA to interface ...
5
votes
1answer
874 views

Why created directories disappearing after reboot in /dev?

I'm new to Linux. When I try to create a directory in /dev folder it's happening smoothly but after rebooting all created folders are disappearing. I tried in other folder like /etc, everywhere ...
1
vote
0answers
32 views

Writing to a device hangs, how can I troubleshoot this?

I have a teensy 3.6 as /dev/ttyACM0 I noticed that when I used serial.write() in python it would hang. I opened the Arduino IDE serial monitor and I can see the output. When I write in the serial ...
0
votes
0answers
27 views

Could a new AMD processor be limiting dd write speed when using /dev/urandom as the input?

I have recently bought a new computer that uses a pretty recent AMD Athlon chip. When using it for low-level formatting with dd, I noticed that setting if=/dev/zero allows it to write to the disk at ...
0
votes
0answers
12 views

Setting USB Hub device authorized flag to 1 does not work

I have a USB Hub listed under /sys/bus/usb/devices as 1-2. It's the only device issuing echo 1 > /sys/bus/usb/devices/{device} does not work (returns bash: echo: write error: Invalid argument). ...
0
votes
1answer
32 views

How can I find a drive specified by a ID_VENDOR_ID:ID_MODEL_ID more easily?

I'm using virt-manager and I am trying to select a USB device. It's telling me some valuable device information: but I don't know where to find that other than using: udevadm info --query=all --name=/...
0
votes
2answers
349 views

where can I find socket files? ( I want unlink it and remove it..)

I'm doing debugging for a program that uses UDP socket. The program creates a socket but after that due to some other problems the program gets stuck and I cannot kill it properly. So I close the ...
1
vote
0answers
85 views

Ubuntu keeps scrolling down and typing '~' on its own

For awhile now, while using my laptop running Ubuntu, it will constantly scroll down to the bottom of the page even while I'm trying to move up. It also will sometimes constantly type ~! I've tried ...
0
votes
0answers
60 views

Best practice to deal with group permission on device shared with docker container

I have a Docker container from which I want to play sound. The container is alpine based, the host is debian based. I try to follow the 'best practice' of not running with root in the container (in ...
0
votes
1answer
252 views

Is it necessary to mount devtmpfs with /etc/fstab?

I'm working on a Linux-like operating system for aarch64, based on a 5.6.4-v8+ kernel for Raspberry Pi 3 (Model B+). The Kernel configuration options include: CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y ...
2
votes
1answer
84 views

What is the meaning of `ATTR{stat}==“ …”` on udev attributes?

I was studying about the activity/change while copy pasting file in USB. Seems like the stat attribute gets changed on every action on USB drive. So what does each value of these stat denotes? Command ...
2
votes
1answer
130 views

Trying to run linux kernel using QEMU, having trouble with boot process

For a project, I need to be able to run an uncompressed linux kernel. It was recommended to me to try emulating this using QEMU, since that's less involved than booting it straight on the machine. ...
1
vote
0answers
22 views

Keeping LCD backlight On while going in sleep state

i am using ubuntu 18.04.4 and i am trying to use some power management related stuff. I want to keep laptop backlight ON (using sysfs) while my laptop is entering into sleep, i am giving following ...
1
vote
1answer
55 views

Can't locate USB devices

I'm currently playing with USB to learn more about it. I used lsusb to display infos about USB buses and devices of my system. Knowing that basically everything is either a file of a directory on ...
4
votes
1answer
56 views

Does a Linux block special file have a corresponding character special file

Simple codger question from the days of UNIX... Does Linux have character special files which correspond directly to a block special file? Back in my day 👴🏻 each disk in UNIX had both a block ...
1
vote
0answers
26 views

How does the kernel interacts with drivers and device tree?

I have an embedded linux system running on a board. I had, in the device tree, the uart device, and also a driver for that. In that case, after boot, I could see a /dev/ttymxc0 "file" in the ...
-3
votes
1answer
3k views

What is swap priority and why does it matter

While seeing the manual for swapon command the priorty option is described as -p, --priority priority Specify the priority of the swap device. priority is a value ...
1
vote
1answer
191 views

Cannot communicate with USB device in Linux

I hope someone can help me with this one. I am trying to connect a spectrometer device (ThorLabs vendor) via a USB interface in a Linux environment (I am using openSUSE 15.1). However, this ...
1
vote
1answer
142 views

Permanently grant permission to /dev/snd for all users?

After reboot ~$ arecord -l arecord: device_list:270: no soundcards found... and $ sudo arecord -l **** List of CAPTURE Hardware Devices **** Home directory not accessible: Permission denied card 0: ...
0
votes
0answers
223 views

My USB controller is not recognized (error 10) when I try to pass through it in a Windows 10 guest os with virt-manager and a QEMU-KVM vm

Actually I have a problem to fix. I want to attach two Kinect 2,one for each virtual machine with its own USB controller and GPU using virt-manager with a QEMU-KVM connection on Ubuntu 20.04. The ...
0
votes
1answer
102 views

Get major and minor from path's s

To get the major and minor device numbers a device node corresponds to, you use stat -c %T:%t <device file> To get the device number that a path is on, you use stat -c <%D|%d> <path>...
0
votes
0answers
58 views

“pkgProblem” error, can't install package

I have some problems while installing a package with apt (like gdb). Here is the error I am getting: The following packages contain unsatisfied dependencies : linux-headers-5.4.0-kali2-amd64 : ...
1
vote
1answer
121 views

device names in rfkill output do not match those from ip

The devices listed by the rfkill command are completely different from the device names listed by the ip command: > rfkill ID TYPE DEVICE SOFT HARD 0 wwan tpacpi_wwan_sw ...

1
2 3 4 5
15