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
1 vote
2 answers
35 views

When dynamically adding I2C device through sysfs. Is it possible to also define the GPIO pins that comes with the I2C device?

I have two I2C devices I want to connect to my Linux device. A temperature sensor, TMP117, worked fine by writing it to the /sys/bus/i2c/devices/i2c-x/new_device. In addition, I want to add an ...
  • 11
1 vote
1 answer
16 views

Is there a way to determine which module corresponds to which major number?

In Linux, the device files in /dev have major and minor numbers: # ll /dev ... crw--w---- 1 root tty 4, 8 Jan 5 09:02 tty8 crw--w---- 1 root tty 4, 9 Jan 5 09:02 tty9 crw-...
  • 533
0 votes
0 answers
21 views

udev rules for camera device inconsistently applied

I have a udev rule that is applied inconsistently, meaning sometimes it works and other times the system's default rules override it. This typically happens when the usb device is reloaded. # /etc/...
0 votes
0 answers
41 views

Using MMC in Dell 5070

I bought a DELL WYSE 5070 with built-in 16GB memory MMC and an M.2 128GB drive and have installed Debian on this machine. When I was installing proxmos, there was no way to install it on MMC so I ...
1 vote
0 answers
56 views

How to name a device in the device tree?

I have used a device tree overlay file (dtbo) to add a hardware reference over the i2c-2 node to my device tree. This device is an accelerometer that implements an existing driver that can be found ...
0 votes
1 answer
32 views

FTDI recognized but not SIM900a

Trying to work with driver of Sim900a. Using an FTDI232 to connect it to usb port of my laptop which is running Ubuntu 22.04 LTS. However, when I dmesg, I get FTDI recognized but not the modem. [ 5456....
0 votes
0 answers
17 views

Unable to change UUID of exFAT USB drive using tune2fs [duplicate]

I am trying to change the UUID of a USB stick formatted with exFAT. I double checked that /dev/sdb2 is the correct target. The entire USB contains one exFAT partition with no empty space. When I try ...
0 votes
0 answers
21 views

Pulseaudio will not retain default device config and crashes lxpanel

No matter what I try to get pulseaudio to use the default devices i've listed in the config it just reverts back to whatever it wants for some reason. user config has no default devices entered. It ...
0 votes
0 answers
16 views

Yocto - configuration for different hardware

I am new to Yocto and only really getting into it. Let's say i develop a customized kernel image with a specific BSP for a product with an ARM device with various connected peripherals, and it all ...
  • 1,061
0 votes
1 answer
30 views

Datasheets as references in making device drivers

Aside from FreeBSD or Linux operating systems' design structure and C programming knowledge, are datasheets enough as additional references in making device drivers?
1 vote
0 answers
62 views

How does the /dev/input folder get updated

I understand that evdev is used to get raw data from input devices such as keyboards and provide it to user space via files inside /dev/input/ for example /dev/input/event0 . Let's take a non-...
  • 1,061
1 vote
1 answer
55 views

mapping device file benefits

I wanted to ask what are the benefits of mapping a device file using mmap. There is a driver which implements file operations API for that device file. I'm asking since device files are not stored on ...
  • 159
0 votes
0 answers
92 views

MSFT touchpad, driver not added to kernel?

I have a Lenovo Slim 7 Pro (14ACH5 D) running PopOS with kernel 5.19, Gnome with Wayland. The touchpad behaves erratically sometimes e.g. single click does a double click, tap to click does not do ...
5 votes
1 answer
140 views

terminal: Error occurred while reset 800b: errno=25

I have an extremely bizarre problem, occurring somewhere at the intersection of terminal, su, w3m and /dev/null: when I su - from user1 to user2, following command does not work: $ w3m zz.html 2>/...
0 votes
0 answers
30 views

Two Mice Invert Click Of One Mouse Debian Bullseye

I have two Logitech M650 mice connected to my Debian Bullseye machine running Gnome and SID repos. I would like to invert the click buttons on just one of the mice. They are both connected to ...
0 votes
2 answers
107 views

Can device numbers change after reboot?

I'm building a service that checks for file uniqueness on block devices. File uniqueness on a system appears that it can be guaranteed through the pair (st_dev, st_ino), where st_dev is the device ...
  • 111
1 vote
0 answers
29 views

device naming mismatch

I had some mess in restoring my system from a cloned image, but finally succeeded. But booting up and launching GParted (or blkid, etc.) I get that the device naming has slightly changed from before :...
  • 111
2 votes
1 answer
89 views

How can I make a loopback file descriptor in bash?

I want to be able to write data to a file descriptor then read it back later in bash. This would look like: # some line to create LOOPBACK_FD echo foo >${LOOPBACK_FD} cat <${LOOPBACK_FD} # foo ...
  • 177
1 vote
2 answers
101 views

List disks/volumes

Is there a terminal command to display the mounted disks like that: I only need the logical name, size and device name. If this isn't possible, size and device name would be enough to display. Thanks ...
  • 31
0 votes
1 answer
53 views

udev rule not working on Arch to disable touchpad when USB mouse connected

I'm trying to write a udev rule to disable (and re-enable) my trackpad when a USB mouse is connected. Currently, my rule looks like: ACTION=="add", ATTRS{bInterfaceProtocol}=="02", ...
  • 113
1 vote
0 answers
66 views

udev - nr_requests on block device not applying on boot but all other rules run correctly

My Rules KERNEL=="sd*",ACTION=="add|change",ATTRS{model}=="PERC_H755N_Front",\ ATTR{queue/nomerges}="2",\ ATTR{queue/nr_requests}="...
0 votes
1 answer
48 views

Why does udev automatically whitelist my RAID card and what is the function of this whitelisting?

I've been learning to use udev and noticed that when I run udevadm test --action="add" /sys/block/sdc I see the following: GROUP 6 /usr/lib/udev/rules.d/50-udev-default.rules:59 IMPORT '...
1 vote
0 answers
13 views

Lubuntu 22.04 - catch monitor state

Is it possibile in linux (lubuntu 20+) catch if a monitor is in "NO SIGNAL" state and doesn't show gui? When I connect to a remote desktop pc via VNC, all seems good, but monitor is in "...
1 vote
1 answer
204 views

What's the difference between device properties and device attributes in udev?

For udev device entries, what is the technical difference between a "property" and an "attribute"? How are they customarily created (generated?) and used? Which one is the better ...
  • 113
0 votes
2 answers
170 views

What populates the /sys and /dev directories

My understanding is that the /sys directory contains files explaining information about the different devices. How and when does this directory get populated? Exploring a Linux system here for example ...
  • 1,061
0 votes
0 answers
24 views

How To Limit Which Devices Can See My Server?

I have a linux server on my network, and it's firewalled off so that it can only be connected to by a couple of devices. However, it still shows up in the "network device" lists on other ...
  • 89
1 vote
1 answer
220 views

Can't remove or unmount loop device on Debian

I have a loop device which shows up when I do losetup --all that I have been unable to remove. So, I basically got myself into this issue because a created a raw image of a microSD card and then I ...
2 votes
2 answers
231 views

Why isn't my CH341a Device Getting Assigned a Device Path (/dev/ttyUSB0)

I have a CH341a Programmer and when I plug it into a usb port everything seems to be working except it doesn't get assigned to a Device Path (eg /dev/ttyUSB0). Does anyone have any clue as to why this ...
7 votes
2 answers
809 views

How to write binary values into a file in Bash instead of ASCII values

I am dealing with an embedded system which has some memory that is accessible by a file descriptor (I have no idea what am I saying, so please correct me if I am wrong). This memory is 32 kB and I ...
  • 752
0 votes
0 answers
46 views

Linux unable too enumerata Samsung Phone via USB or show it with lsusb

This is very similar to other questions here, but it only happens with a Samsung J5 Prime phone. dmesg shows the following error: [ 1474.984812] usb 3-1: new full-speed USB device number 18 using ...
  • 111
0 votes
0 answers
34 views

How to increase the Max Data Transfer size for the mmc driver via ioctl

I am using the mmc driver in the kernel and using the IOCTL to transfer data using CMD25 and CMD18. As per the IOCTL, the max data transfer size for read write is 1024 Blocks of 512 Bytes each. But ...
1 vote
0 answers
27 views

Understanding the multiple changes in `/dev` after inserting usb

Want some clarification about changes under /dev when I plug in a usb flash drive. ls /dev also doesn't output anything about sdb ls /dev/bus/usb/004 just outputs 001 lsusb doesn't mention anything ...
1 vote
1 answer
254 views

What devices do /sys/class/bdi/ settings correspond to

/sys/class/bdi has settings for things like readahead and dirty page ratios for devices. It is organized by bdi identifier, which is the major:minor device number or the st_dev value set by the file ...
1 vote
0 answers
228 views

i2c device node from device tree is not being probed

I am having trouble troubleshooting my problem where in my i2c pca9546 mux is not being probed by the corresponding driver, i2c-mux-pca954x.c. Here is my device tree node: &i2c0 { status = "...
  • 11
0 votes
0 answers
96 views

lsblk shows more devices that what is currently pluged in to the computer

I have an old laptop that uses BIOS MBR and wanted to list drives and partitions currently on the system so I used the lsblk command It shows that there is sda with 4 partitions, thats fine, but it ...
  • 1
0 votes
0 answers
8 views

Memory Device Utilization

I mapped a device memory to the user space under /dev/dev_mem How can I visualize the utilization of this device and the tasks using this character device?
0 votes
0 answers
41 views

How to disable my Laptops Charger port

I need to disable my laptops charge port where my charger connects to. I just wanted to know what type of device is that and what is its name in my devices? I found something in /sys/class/...
3 votes
0 answers
140 views

Linux: Are sockets always on device 00:08?

After opening up a socket in a C program, I ran fstat on it and printed out the major and minor device numbers. I got a major number of 0 and a minor number of 8. Looking at the Linux kernel ...
20 votes
4 answers
4k views

What is `/dev/sda0`? Is it a standard thing?

While trying to understand this other question, I encountered /dev/sda0 being mentioned. I have some experience in Linux and I'm used to this scheme where sda, sdb, … are devices and sda1, sda2, … , ...
0 votes
0 answers
37 views

Linux No Sound on Login, Only After Replugging in Headphones

The Problem Every time I log into my Computer I have no Sound so I have to unplug, and plugin my Headphones back again. Specs Ubuntu 20.04 x86_64 Some normal audio jack In-Ear-Headphones My Idea So ...
1 vote
1 answer
102 views

canonical/non-canonical vs raw/cooked?

In the context of terminals, what is the difference between the two opposites canonical/non-canonical and cooked/raw? This thread says that they are synonym. But that's weird because one of the "...
  • 302
0 votes
0 answers
60 views

debugfs on a NAS

# debugfs -R 'stat <INODE>' /dev/sdaX or # debugfs -R 'stat FILENAME' /dev/sdaX> display file creation time etc. How to run this command if the DEVICE is a NAS mounted e.g. on /MOUNTPOINT/VOL-...
0 votes
1 answer
712 views

How can I permanently change a network device name in CentOS8?

I want to permanently change the device name of a network interface using a portable script. The interface gets the ugly name of enp02fghjkl1. I want to give a pretty name of netface1. I have tried ...
  • 672
0 votes
2 answers
131 views

Find physical machine associated with /dev/pts/N

If i have an operating system with multiple users logged in via ssh, is there any way i can find which physical machine is associated with each /dev/pts/N (where N is an integer)? All i know is the ...
1 vote
0 answers
46 views

Change underlying device of mount or dm-crypt without unmounting

I have an external, encrypted USB-drive that was mounted through dm-crypt: The device was /dev/sdb, decrypted as /dev/mapper/external (which is a symbolic link to /dev/dm-5) and mounted as /mnt. After ...
  • 111
10 votes
3 answers
3k views

When is mandatory use /dev/zero over /dev/null for write/discard purpose?

According with the FHS about /dev at: 6.1.3. /dev : Devices and special files it contains: The following devices must exist under /dev. /dev/null All data written to this device is discarded. ...
2 votes
0 answers
236 views

Automatically lock my Linux computer when I walk away from it

I would like to lock my Linux (GNOME) machine after I walk away from it. Ideally, it should be a small Bluetooth tag / card that I carry in my pocket with a proximity sensor. Is there some software ...
1 vote
1 answer
366 views

Why does device registration not create a device file?

I'm currently learning about Linux device drivers and feel as if I have a fundamental misunderstanding on how devices are instantiated in Linux. Within a Linux module, I can call alloc_chrdev_region() ...
  • 949
0 votes
1 answer
150 views

What's the difference between structures "cdev" and "inode" in the context of device driver programming?

I am currently studying device drivers in an operating systems course and am getting confused regarding the difference between the "inode" structs and "cdev" structs. Could someone ...
  • 949
0 votes
1 answer
1k views

Why aren't my audio devices recognized?

On my laptop, only Dummy Output appears in Sound Preferences. This is Mint 20.3, but similarly, nothing is found when running on with an Endeavor or Fedora live-USB-stick. Headphones in the AUX do ...

1
2 3 4 5
16