Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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).

2
votes
0answers
83 views

How exactly do the Linux display device files work? [on hold]

I don't really understand how the Linux display device files work and interact together. What files in the /dev tree need to go where and where do they need to connect/point to, in order to show a ...
9
votes
1answer
334 views

Which Unix-like system really provides the /dev/tcp special file?

I know /dev/tcp/<host>/<port> is a magic path handled specifically by some shells in redirections. But according to man bash: If the operating system on which bash is running provides ...
0
votes
0answers
31 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
21 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/...
1
vote
0answers
31 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
55 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 ...
0
votes
1answer
55 views

Creating Persistant Symbolic Link -Linux

Could somebody assist me in creating a persistent symlink for the block devices, using udev ? I have a cloud server, where a block device (/dev/xvdb1 with filesystem ext3) is attached . I want to ...
1
vote
0answers
53 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: ...
2
votes
0answers
19 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
23 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
28 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, ...
2
votes
1answer
368 views

Ubuntu boot fails on Lenovo P52 Thinkpad when hybrid display is set in BIOS

Booting to Ubuntu 12.04.5 LTS fails when the display is set to 'hybrid' in the BIOS (using Nvidia driver 415) When I switch to 'discrete', then it boots to Ubuntu OK. Because I am dual booting with ...
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
45 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 ...
1
vote
0answers
24 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)?
1
vote
0answers
29 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
1answer
78 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 ...
1
vote
0answers
200 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
67 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 ...
0
votes
1answer
34 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 ...
2
votes
1answer
251 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
94 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 ...
0
votes
0answers
21 views

Identify watchdog module related to /dev entry

I have several /dev/watchdog* files on my embedded platform. I'd like to know how I can identify which watchdog module is related to which /dev/watchdog* entry.
-2
votes
1answer
29 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
40 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/...
0
votes
0answers
34 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
votes
1answer
104 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 ...
1
vote
1answer
50 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-...
0
votes
1answer
52 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=="...
2
votes
2answers
169 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 ...
1
vote
0answers
21 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
34 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, ...
2
votes
1answer
677 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 ...
0
votes
2answers
40 views

How to determine if an unmounted CD/DVD is in the drive?

Under Linux, is there any way to get a yes/no answer to whether or a CD/DVD drive contains a disc which isn't mounted but which can be mounted or written to?
1
vote
0answers
37 views

How can I xor two block devices together?

I'm looking for a way to create a virtual block device that when accessed returns the XOR of two block devices. I feel like dmsetup would be used here somewhere but I can't find anything related to ...
0
votes
0answers
299 views

Udev Rules Not Running

I'm playing with Udev Rules on OpenSuse Leap, and I'm trying to run a simple and small script once a USB device is plugged into my system. However, my script which I added in my keyword "RUN+=" does ...
2
votes
1answer
34 views

How to link a tunX interface to a specific OpenVPN instance?

I known that I can give a specific name to the TUN interface using --dev option, but I didn't and I have now on a router machine something like a hundred client configs. with less clients I was able ...
0
votes
1answer
39 views

Given a block device file, how can I list all relevant partions?

Given a device file (ex: /dev/sda) how can I get a list of all relevant partitions? Expected input: /dev/sda Expected output: /dev/sda1 /dev/sda2 /dev/sda3 ... I know there are many ways to get ...
0
votes
2answers
19 views

Skipping the middle mapping with cryptsetup luksOpen

I'm mounting a bunch of encrypted disks like so cryptsetup luksOpen some_source some_mapping && mount /dev/mapper/some_mapping /some_mountpoint How can I abstract away the middle mapping? I ...
2
votes
1answer
133 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 ...
5
votes
3answers
507 views

Make tar from /dev/stdin file

What I'm looking for is a way to pass in arbitrary data through STDIN, and have it get tar'd up as if its a normal file. I tried this $ echo test | tar -cf test.tar /dev/stdin and that gives me a ...
2
votes
2answers
311 views

How to completely inhibit lid switch events?

Context: Due to missing drivers for my 2-in-1 convertible, folding the screen back only triggers a lid switch event. This causes the laptop to suspend or, when "Suspend when laptop lid is closed" is ...
0
votes
1answer
158 views

How to create multiple devices in a /dev/ subdirectory (kernel driver)

I'm writing a kernel module. I can easily create a character device in /dev/ but I want to have 3 devices available to my user and it would be nice to put them all under a /dev/ subdirectory. ...
1
vote
1answer
25 views

Why raspbian lite powers off when doing `sudo cat /dev/char/10:130`?

I did on a terminal sudo cat /dev/char/10:130, which in the uevent has name of watchdog, and it outputs a message from the kernel saying that watchdog did not stop !, and after a couple of second it ...
2
votes
0answers
232 views

What is the difference between `/dev/input/event*` and `/dev/input/mouse*` according to mouses?

Suppose my mouse is associated to /dev/.../event1 and /dev/.../mouse1. I was reading the byte streams of those files, and I noticed that event1 gives much more information than mouse1, which ...
4
votes
1answer
16k views

PKCS#7 signature not signed with a trusted key

Installed Ubuntu with SIP disabled on MacBook 2017 - 0 issues, booted in seconds. I have been building it out and created a problem while trying to make the WiFi work. At some point (it was very late)...
-2
votes
1answer
61 views

How to deny all access to /dev/sda? [closed]

I would like even applications not to be able to access /dev/sda . If possible, I would even like to disallow root applications from accessing it, but that is not as important.
1
vote
1answer
251 views

what is DEVLINKS in the output of udevadm info --query=property --name=/dev/mmcblk0

I was looking at the udev information but couldn't find out anywhere. What does DEVLINKS signify also what are these values dev/disk/by-id/mmc-008G30_0xf281d20d & /dev/disk/by-path/platform-...
1
vote
0answers
22 views

Ethernet malfunction when booting with extra device on /dev

I have a customized Linux distro (created via buildroot) running on an embedded platform. The system consists in a processing module (Based on Samsung Exynos 4412 microprocessor) with a base board for ...
1
vote
0answers
32 views

Drive emulation at driver level

I would like to emulate a virtual SED at driver level. The goal is to develop/simulate the "firmware" of a drive, and map driver interface commands to an app which would handle interface specific ...