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
3
votes
1answer
2k views

Webcam Device Driver to support H.264

I have a Creative Live Cam Connect HD (id: 041e:4093) and this webcam has an on-board H.264 encoder. Unfortunately v4l2 only inputs the feed as MJPG. $ v4l2-ctl --list-formats ioctl: VIDIOC_ENUM_FMT ...
0
votes
0answers
34 views

How about the work mechanism of kudzu in older RHEL version while the system is running ?

It seems that the kudzu can only take effect for new devices while the system starts up ! For example, although we can run the kudzu to find the new devices online, such as disks, but in fact no any ...
2
votes
1answer
144 views

Access grab state of evdev device

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/...
114
votes
9answers
21k views

Why is /dev/null a file? Why isn't its function implemented as a simple program?

I am trying to understanding the concept of special files on Linux. However, having a special file in /dev seems plain silly when its function could be implemented by a handful of lines in C to my ...
2
votes
0answers
191 views

systemd-nspawn: how to allow access to all devices?

I'm trying to create a rough equivalent of Docker's --privileged in a systemd container, but I've got no idea how to allow the container to access all of the devices available on the host (without ...
1
vote
0answers
257 views

How to script AT command to modem?

Every time my USB modem (/dev/dlinkModem) gets unplugged it defaults to "radio disabled mode" (AT+CFUN:4). I can easily enough call AT+CFUN:1 through the minicom application console to enable radio ...
1
vote
0answers
489 views

When i plug in usb camera i get 2 devices

When I plug in the camera to Linux then I get 2 devices /dev/video0 and /dev/video1 Why is that happens and is that normal? Odd numbered devices do not work. /dev/v4l/by-path looks like that: ...
6
votes
3answers
7k views

Udev rule to match multiple node USB device

I have a 3G/GPS device that creates 5 tty nodes, although it's only one physical USB connection. Basically, a multi port usb-serial adapter. I'm trying to create some udev rules to make sure those ...
10
votes
1answer
2k views

Usage difference between device files, ioctl, sysfs, netlink

I'm trying to clarify which is the most useful (in terms of functionality) method of interacting with devices in Linux. As I understand, device files expose only part of functionality (address blocks ...
2
votes
0answers
38 views

how to fix the devices name ordering in guest vm (devices name ordering changed after reboot vm by virsh)

my devices xml define: first vm only has a root volume, <disk type='file' device='disk' snapshot='external'> <driver name='qemu' type='qcow2' cache='none'/> <source file='/dev/...
1
vote
0answers
27 views

Can I refer to current clipboard content as a file?

I'd like to select-and-copy some text to clipboard and then to send it via Bluetooth to my phone. But this requires to open a file to send. Well, I know about programs like xsel or xclip, but here it ...
0
votes
0answers
52 views

How to enable all users to access arduino card?

I am trying to set up Linux (Debian 9) machines in a computer lab to let users plug in their arduino interface and flash their device with their code. I do not really know about arduino and so on, ...
8
votes
3answers
2k views

How to check if stdin is /dev/null from the shell?

On Linux, is there a way for a shell script to check if its standard input is redirected from the null device (1, 3) *, ideally without reading anything? The expected behavior would be: ./...
0
votes
1answer
302 views

UIO device files /dev/uioX are not created on Linux Debian

I'm having a problem on Linux Debian 9.6. Although I have UIO support compiled into the kernel, the /dev/uioX device files are not beeing created. root@machine:~# zcat /proc/config.gz | grep UIO ...
4
votes
2answers
507 views

Two interrupt handlers for the same driver

I have a scenario where my driver needs to listen to two different interrupts from two different IRQ lines. Is it possible to register two different IRQs and install two different handlers for the ...
1
vote
3answers
757 views

How could Linux use 'sda' device file when it hasn't been installed?

I am installing CentOS Linux distribution. At the partition step, CentOS tells me that it has detected a sda HD in my machine and I should create partitions and assign mount points for this disk. ...
1
vote
0answers
218 views

Mount two same usb device Always in the same port UBUNTU

need to mount two device (identical/equal) at the same port...not difficult but look this: /dev/input/event6 - Sycreader_RFID_Technology_Co.__Ltd_SYC_ID_IC_USB_Reader_08FF20140315 /dev/input/event2 - ...
2
votes
0answers
47 views

Webcam and Desktop composite with v4l2loopback?

Is there anyway to do a composite video setup where the webcam is overlain onto the desktop and output as a video device (simulated webcam)?
8
votes
4answers
4k views

Testing if audio devices / sound cards are currently playing?

Is there a default program where I can check if my audio devices are in silent? Edit: By silence, I mean that if there is something playing on that (not just activated or opened) Something like this:...
1
vote
0answers
111 views

Is there any standard for naming RS-485 tty devices/device aliases in Linux?

I know, that there are some standards in tty naming. There is ttyUSBx for USB to serial converters, ttySx for RS-232, ttyAMAx on ARM devices, but I can't find anything about conventions in RS-485 ...
0
votes
0answers
64 views

Disable consistent device naming on Centos 7.5

I'm using kickstart's booloader options to suppress the consistent device naming feature for network interfaces on Centos 7.5. A minimal example of my kickstart file is as below: auth --enableshadow -...
1
vote
0answers
644 views

Disk device paths Changes from xvd to sda, how do I change to xvd?, [closed]

OS Ubuntu '16.04.5 LTS' Hypervisor Xen This output is when sda df -h Filesystem Size Used Avail Use% Mounted on udev 16G 4.0K 16G 1% /dev tmpfs 3.2G 1.3M 3.2G ...
0
votes
1answer
346 views

Correct way to fix missing device file in /dev?

I am using a proprietary PCI card from Sensoray in my Ubunut 14.04 machine (I intend to upgrade to 18.04 soon). The card comes with the source code for the driver and a Makefile to build and install ...
2
votes
1answer
281 views

SPI driver for Debian

This is the Linux: PRETTY_NAME="Debian GNU/Linux 8 (jessie)" NAME="Debian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=debian The Kernel version is: 4.1.15-gcfb25fd ...
1
vote
1answer
639 views

Emulating a character device from userspace

We are currently working on building a system for data visualisation for different sensors. To make development of the Linux application possible we would need to emulate the behaviour of the ...
2
votes
2answers
1k views

How do I access a digital camera drive via usb after safely removing it?

In Ubuntu 11.04, I unwisely right clicked and "safely unmounted the drive" of my Sony HDR-XR150 connected via USB. Now, when I plug my digital camera into my computer via USB, Ubuntu either doesn't ...
3
votes
1answer
870 views

How do I get my DVD-RW to mount as a writable device instead of ROM?

I am trying to use my laptop (running Debian Jessie) and an external USB DVD reader/writer to burn an ISO to a DVD-RW. However, upon inserting my disk, it appears to have been detected as read-only: ...
0
votes
1answer
60 views

Rip-off (an ncurses term) single bottom line out of /dev/tty terminal, is it possible?

Ncurses allows to separate a single line from screen, at level of physical screen (curscr), to devote it to e.g. a title bar, thus also creating a logical screen (stdscr), devoted to application's ...
24
votes
2answers
47k views

How does cat know the baud rate of the serial port?

I regularly use cat to view debugging information in the console from my FPGA development board over the serial connection, but I never have had to tell linux what the baud rate is. How does cat know ...
9
votes
2answers
2k views

Can I query which processes (if any) are currently accessing the microphone?

I'm running Debian (technically Raspbian), trying to get a Star-Trek style voice-command system. I've got it mostly up and running, but in the interests of privacy and all that jazz, I don't want my ...
2
votes
1answer
2k views

USB device (keyboard or mouse) shows in `lsusb` but does not work if it is the second USB device to be plugged in

I've been having a strange issue the past couple of months where the second USB device to be plugged into my laptop is unresponsive, despite showing up in lsusb and dmesg seemingly without issue. ...
-1
votes
2answers
319 views

How to find the Absolute device name

I had a homework question which I answered correctly: Use lvdisplay to discover information about the VG Name found in the previous question. What is the first LV Path which is using the volume ...
-2
votes
1answer
34 views

What is the relation between a line in cpu cache and a page in main memory (and block in disk)?

Computer Systems: A Programmer's Perspective (2nd Edition) [Randal E. Bryant, David R. O'Hallaron] says A block is a fixed-sized packet of information that moves back and forth between a cache and ...
0
votes
1answer
43 views

How is a sequentially accessible device made randomly accessible?

If a device offers only sequential access not random access, can a device driver or a file system make the device look like randomly accessible to users? If yes, is this done by providing buffer/...
1
vote
0answers
287 views

Proxmox Guest: Network Device not linked

I've setup a new Ubuntu 18.04 virtual machine using Proxmox. On this new virtual machine I can't get a working Internet connection. The command lshw -C network shows: root@web:~# lshw -C network *-...
-1
votes
1answer
336 views

Can filesystems be created only on block devices, but not on character devices?

Can filesystems be created only on block devices, but not on character devices? Can a filesystem be viewed as a block device itself (for example, when programming to use a file system)? My guess is ...
4
votes
1answer
10k views

How to get a list of major number -> driver associations

The Linux Programming Interface states: Each device driver registers its association with a specific major device ID, and this association provides the connection between the device special file ...
1
vote
1answer
127 views

Is devtmpfs special with respect to namespaces? a permissions problem

I'm wondering if devtmpfs is special with respect to namespaces. Here's my system info (using Vagrant for testing) vagrant@ubuntu-xenial:~/test$ uname -a Linux ubuntu-xenial 4.4.0-135-generic #161-...
1
vote
3answers
2k views

How can I run a shell script on input device event

I have a USB remote presenter that appears as a keyboard. Using evtest I can see the input events from the device. How can I capture those events in a shell script? I had see some solutions using C ...
1
vote
3answers
359 views

Is it possible to make the device filesystem name , /dev/sd?1 , stay constant every time we reconnect the SanDisk USB Cruzer drive?

Is it possible to make the device filesystem name , /dev/sdi1 , shown by lsblk -f stay constant every time we disconnect and reconnect the SanDisk USB Cruzer drive? I am running Ubuntu Linux 16.04 on ...
1
vote
0answers
147 views

Can I use lirc using the i/r on my rtl2832U dongle as regular or separate i/r port?

Although this might have an rtlsdr tone to it, I am on a hunt for info, tip, tricks & mods related to lirc while trying to get it (or some kind of version) to work on my Linux machine. ...
0
votes
1answer
120 views

udev ACTION add isn't working

I'm trying to use udev for some basic actions, in this case the idea is to launch a simple script. The problem is that when I use this rule: ACTION=="remove", ENV{ID_FS_LABEL}=="NAMEHERE", KERNEL=="...
15
votes
5answers
23k views

Find out what device /dev/root represents in Linux?

On linux, there is a /dev/root device node. This will be the same block device as another device node, like /dev/sdaX. How can I resolve /dev/root to the 'real' device node in this situation, so ...
4
votes
2answers
1k views

How to programmatically detect when a device raises an interrupt?

How to programmatically detect when a device raises an interrupt? This can be when a device is connected or disconnected. And also this case: for example: when a finger is held over a fingerprint ...
2
votes
2answers
483 views

Why can I (or cannot) mount a mounted device again? What is happening?

Why can I (or cannot) mount a mounted device again? What is happening? For example: /tmp/test$ sudo mount /dev/sda5 ./1;echo ${?} 0 /tmp/test$ sudo mount /dev/sda5 ./2;echo ${?} 0 /tmp/test$ sudo ...
4
votes
3answers
393 views

Do all disks devices in my HW machines start with - sd?

in my bash script I use the syntax lsblk | grep sd in order to capture all disk in my HW machines ( not include flash card or rom ) I just worry that some disk device name will be diff from sd , and ...
1
vote
0answers
24 views

Scenario to use the sg driver

Is there any device commonly controlled by SCSI generic driver (sg) in Linux today? I am curious about that. Currently I just know the mtx tool which controls robots in tape libraries via sg driver.
0
votes
0answers
91 views

Should I let my user access /dev/mapper/control?

I'm building LiveCDs using some script I worked on as an exercise. Now I want to create VDIs to directly use in VirtualBox. I need kpartx among others to create a loop device, mount it and copy files, ...
3
votes
1answer
2k views

How to use dd if=/dev/mem in place of devmem ?

It seems like root@testbox:~# dd if=/dev/mem bs=1 count=4 skip=2149646336 | hd should be nearly equivalent to root@testbox:~# devmem 2149646336 32 But, while devmem works great, that dd invocation ...
1
vote
0answers
244 views

Speakers and headphone paths (name of PCM device)

I am really confused trying to get my speakers and headphone device PCM names like a "hw:x,x" or something like that; cat /proc/asound/devices 2: [ 0] : control 3: [ 0- 0]: digital audio ...