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
17 views

How can I blacklist my inbuilt mic

I tried to blacklist my inbuilt mic, I also search on some other web site They showed the command. "cat /proc/asound/modules" I run it and I have the out put of 0 snd_hda_intel 1 snd_hda_intel If ...
0
votes
0answers
16 views

How does gnome-terminal receive information from the pseudo-teletype on X? [duplicate]

I have the following terminal session: [OP@localhost ~]$ tty /dev/pts/2 [OP@localhost ~]$ echo hello > /dev/pts/2 hello My question is how the application gnome-terminal, receives the string "...
1
vote
0answers
23 views

USB Keyboard doesn't work until I manually inspect its device file

So I have a USB Keyboard that I built myself which runs the qmk keyboard firmware. I would preface this by saying that it's possible that this is a bug in the keyboard firmware. However, since the ...
0
votes
0answers
49 views

rm: cannot remove '<Directory name>': Device or resource busy

I know there can be a lot of duplicates. I have gone through almost all of them (like lsof, fuser, etc) and I could not get it resolved. rm: cannot remove 'temp_p/sys': Device or resource busy ...
-1
votes
1answer
80 views

DoS: how to limit access to /dev/random?

One of my users likes to cat /dev/random > /dev/null. This has caused issues with other processes performing poorly because they're blocked waiting for entropy. Is there a way of preventing users ...
3
votes
1answer
72 views

How to make /dev inside linux namespaces

AFAIK the container terminology, what I'm essentially trying to accomplish is to write my own "container runtime". What I'm doing: user@host:~$ mkdir test user@host:~$ cd test user@host:~/test$ ...
0
votes
1answer
25 views

“No partition active” when booting from a USB

I'm not sure if this is a "unix" question, but I'm in dire straits: I'm running Mint 18.1 Serena 64bit. I'm trying to burn a Windows 10 ISO to a USB drive so that I can boot from it via selecting it ...
-3
votes
1answer
97 views

Time and again I forget the meaning of a single hyphen in the end of some utility commands [duplicate]

Time and again I come across old codes and recognize a single hyphen in the command's end: mysqldump -u root -p --all-databases | zip "$drt/db-$date.zip" - or wget ${target_url} -O - | tar -xzv --...
0
votes
0answers
37 views

FreeBSD: how can I check if `/dev/random` is blocking?

So this exact question has been asked many times about Linux's implementation of /dev/random, but I am struggling to find an answer that is FreeBSD specific. From the FreeBSD random(4) man page: ...
0
votes
1answer
29 views

MDADM creates additional block devices

I noticed a strange issue when creating RAID array with mdadm. As far as I see, it creates additional devices of md type. According to the kernel.org documentation, the md device type is Metadisk (...
0
votes
0answers
40 views

Kernel randomly maps storage device to different device file

So this is kind of strange. I was trying to put a screenshot into my Videos/ directory, and while trying to cd where I wanted to go, I was getting I/O errors. For context, I have a storage drive ...
1
vote
0answers
82 views

Jetson TX2 device tree, i2c nodes and camera driver loading

I am a bit confused with behavior of Jetson TX2 when loading drivers for camera. Here is definition of IMX274 in device tree: i2c@3180000 { reg = <0x0 0x3180000 0x0 0x100>; ...
1
vote
0answers
16 views

Automatically remove a device from /dev

I am having keyboard problems, with a laptop built in keyboard. I have an external keyboard, so wish to disable the internal one. So far I have discovered that I can disable within X11 using xinput ...
2
votes
2answers
109 views

How can I disable an input device?

I have a broken laptop built-in keyboard (The shift-button sometimes gets stuck down). I exclusively use an external keyboard, but the internal keyboard interferes with it. (I can not unplug the ...
0
votes
0answers
28 views

Query the target device for installed PCI devices on ubuntu

Is there a way to query the target device for installed PCI devices on ubuntu. I use VideoCapture Card and 8 cameras. Every time /dev/video* changes but I would like to assign a camera to specific /...
0
votes
0answers
10 views

eCSPI with different MOSI, MISO and SCK per spi_device

The manufacturer's device tree setup for ecspi1: &ecspi1 { fsl,spi-num-chipselects = <1>; cs-gpios = <&gpio2 30 0>; pinctrl-names = "default"; pinctrl-0 = <&...
1
vote
1answer
78 views

What is the use of the dummy device?

I am checking the code of the dummy device driver. The dummy_xmit() function destroys the packet. I want to ask what is the real use of the dummy device or is it not useful today and is a legacy ...
4
votes
1answer
30 views

How to I set the permissions necessary to make the ioctl CDROM_SEND_PACKET command run?

I've run into an error stemming from lacking permissions when using the CDIO library to issue an eject command to my USB CD-ROM drive. I always get an error message like this: INFO: ioctl ...
0
votes
1answer
18 views

Sort block devices by most recently connected?

How can I block devices by the most recent added ones? No option in lsblk seems to have that functionality.
0
votes
1answer
37 views

How do I see that a device is mounted with `exec` option using either mount or /proc/mounts?

I've mounted a cdrom device with mount -o exec /dev/sr0 /media/cdrom0, since I couldn't execute files on it, when the drive was initially mounted by the virtual machine. Now, when I run cat /proc/...
13
votes
2answers
1k views

Why are < or > required to use /dev/tcp

When trying to call /dev/tcp/www.google.com/80, by typing /dev/tcp/www.google.com/80 Bash says no such file or directory. When looking at other people's code online, they use syntax such as 3<&...
-1
votes
1answer
46 views

make a pseudo device like /dev/random that outputs primes?

/dev/primes is what I want without writing C code just python which I have known and easily written the program. The device file should be similar to /dev/urandom that outputs primes instead of ...
1
vote
1answer
58 views

How can I check the model of a device connected to a specific COM through a ssh connection

I am trying to access a remote machine through ssh and check the model of a device that it is connected to a specific COM port; I know what port it is. I have tried some commands, but they either don'...
0
votes
1answer
65 views

Partition table & filesystem for a USB flash drive

I've got a USB flash drive I want to use on printers, audio equipment, and other various devices. In my experience, most Linux is very forgiving about what partition table and FS type I use on my ...
2
votes
1answer
61 views

FreeBSD: /dev/dsp exists (“ls -al /dev/dsp”), but does not show in “ls -al /dev”

I'm using FreeBSD-12.0-RELEASE-amd64, when I list all the files in /dev, I don't see /dev/dsp (note there's no output after the first command), but when I list the file by explicitly specifying its ...
0
votes
1answer
48 views

Is there a kind of '/dev/null' to fake output file path?

Let says that I have a CLI which transforms a file_a into a file_b like so: transform --input /path/to/file_a --ouptut /path/to/file_b I have developed a program that use this CLI and need to unit ...
15
votes
1answer
1k views

What are nvme namespaces? How do they work?

I've recently begun supporting Linux installed on devices with built-in nvme ssds. I noticed the device files had an extra number, beyond a number identifying the drive number and the partition number....
0
votes
0answers
22 views

How does linux arbitrate access to devices

I would like to know the different methods linux uses to control access to a peripheral device. e.g. for example you have a spi temperature sensor. And multiple threads are trying to get a reading. ...
2
votes
1answer
116 views

Difference between writing file from /dev/zero and truncate

$ timeout 1 cat /dev/zero > file1 $ wc -c file1 270422016 file1 $ du file1 264084 file1 Questions : (1) How do 270422016 null characters come out to be 264084 bytes (i.e 258M). $ truncate -s ...
3
votes
2answers
100 views

lsblk column “RAND” aka “adds randomness” - what does it mean?

Running lsblk (an excellent command for getting info about the disk configuration from within scripts and OS-agnostic high-level languages) on Fedora 29 like so: $ lsblk --output NAME,FSTYPE,ROTA,...
0
votes
0answers
141 views

Who is causing extremely high CPU usage when writing to SSD?

When writing to SSD (regardless if over file system or directly into /dev/sda) I observe extremely high CPU usage, with top showing CPU: 0% usr 53% sys 0% nic 9% idle 27% io 0% irq 9% ...
5
votes
1answer
573 views

Multiple /dev/video for one physical device

First some specs: my computer is an HP EliteBook 8460p. It comes with an integrated Chicony HP HD webcam. My issue is that a lot of applications (well, at least Skype and guvcview) are displaying ...
2
votes
2answers
141 views

The concept of “Airplane Mode” in Linux

When installing a Ubuntu, Manjaro or other Graphical Linux distro on laptop, when press the airplane mode button on laptop, Airplane mode can be enabled. How the concept of airplane mode works in ...
0
votes
2answers
314 views

Linux block devices naming

I am a bit confused with how linux hard drive/ storage device, block files are named. My questions are: How are IDE devices and partitions named? How are EIDE devices and partitions named? How are ...
0
votes
0answers
53 views

How to configure multiple SPI devices on Linux

I have an embedded Linux system (F&S PicoComA5) that has shipped with a pre-configured Linux Kernel + buildroot system. By default, only one SPI device is pre-configured, appearing in the system ...
0
votes
1answer
30 views

How to choose between sound outputs without unplugging hardware?

I am currently running the following: 4.15.0-46-generic GNU/Linux Distributor ID: LinuxMint Release: 19.1 Codename: tessa I have my headphones plugged into their dedicated port, however, I ...
-1
votes
1answer
105 views

Why every device in Linux is a file or folder ? what are the advantages? [closed]

Why every device in Linux is a file or folder ? what are the advantages ? and what is the necessity of /dev/sda1 , /dev/sda2 or /dev/sda3 file ? it's size is 0 bytes .and after mounting the hard disk ...
0
votes
0answers
48 views

1 NFC Device found but won't list it

I am running a VM of Kali Linux. I have an ACR122U NFC Card Reader. One problem I have been having is that when I attach the NFC reader to my PC and run nfc-scan-device -v, it returns "1 NFC device ...
0
votes
1answer
380 views

DRBD comes up after reboot with Connected Diskless/Diskless

After an unattented power loss, facing a major issue, every reboot the DBRB comes up with Connected Diskless/Diskless status. main problems: dump-md response: Found meta data is "unclean" ...
2
votes
2answers
722 views

A start job is running for eth0

I am using a new installation of Arch Linux and whenever I boot my system I have to wait for 90 seconds as there is a start job running for my network interfaces. I installed Arch yesterday and ...
0
votes
0answers
24 views

Disconnected onewire devices still exist after echo 1 > w1_master_search

I'm working on embedded device where user connects and disconnects onewire sensors sometimes. Sensors are connected to DS2482 device, which is I2C to 1Wire converter. DS2482 is supported by Linux ...
0
votes
0answers
41 views

Device Major number changed in /proc/devices after restart

I installed my device driver using mknod and operating system assigned a major number for it. (Saw 236 in /proc/devices) But when i restart the machine and check the /proc/devices again i saw that ...
0
votes
1answer
60 views

What is a meta device?

man pvcreate says pvcreate initializes a PV so that it is recognized as belonging to LVM, and allows the PV to be used in a VG. A PV can be a disk partition, whole disk,meta device, or loopback ...
0
votes
0answers
409 views

flush tty device buffer from terminal

I have a serial device on /dev/ttyAMA0. I have program written in C that communicates with this device. But apart from the C program I sometimes need to input some configuration data from terminal, ...
2
votes
1answer
47 views

Why can't I open these device nodes?

[root@archlinux xtricman]# ls -l /dev/pts total 0 crw--w---- 1 xtricman tty 136, 0 Feb 24 19:24 0 c--------- 1 root root 5, 2 Feb 24 19:10 ptmx [root@archlinux xtricman]# ls -l /mnt total 12 ...
2
votes
1answer
289 views

Get video device on embedded Linux SoC

I'm trying to find the camera module device of an IP camera (running Linux), without much success. My main objective is to find the camera stream, so I can attach an RTSP server. Update 26/02/2019 ...
0
votes
1answer
229 views

Possible to force udev to create specific device event number, or change device event numbers

I have a kernel module that reads usb keyboard input specifically from /dev/input/event2 and /dev/input/event3. On some devices the keyboard doesn't get assigned event2 and event3, it gets assigned /...
0
votes
2answers
109 views

What is the default behaviour when we mount filesystem with `nodev` option?

I read this in "RH413 Red Hat Server Hardening" course that we mount the filesystems with nodev which then does not allow the special files/devices to be mounted from it. However, it did not show an ...
2
votes
1answer
82 views

Why does terminal takes input line by line?

If I use: strace echo 'a b c' > file The bottom lines are: write(1, "a\nb\nc\nd\n", 8) = 8 but in strace echo 'a b c d' > /dev/pts/0 These lines are: write(1, "a\n", 2) ...
25
votes
1answer
3k views

Why don't reads from /dev/zero count as IO_RBYTES?

I am emptying out a hard drive on some Linux 4.x OS using this command: sudo sh -c 'pv -pterb /dev/zero > /dev/sda' And I opened another tty and started sudo htop and noticed this: PID USER ...