Questions tagged [udev]

Udev manages the Linux /dev directory, and hooks userspace into kernel device events.

udev (userspace /dev) is a device manager for the Linux kernel. As the successor of devfsd and hotplug, udev primarily manages device nodes in the /dev directory. At the same time, udev also handles all user space events raised when hardware devices are added into the system or removed from it, including firmware loading as required by certain devices.

https://en.wikipedia.org/wiki/Udev

https://wiki.debian.org/udev

http://reactivated.net/writing_udev_rules.html

518 questions
11
votes
0 answers

How to use libudev on android

As a part of low-level monitoring application, that needs to monitor some changes in sysfs I should use udev interface instead of inotify. It's pretty clear that most of android devices, and all devices that I really need to run this application on,…
kravitz
  • 973
  • 2
  • 10
  • 22
11
votes
1 answer

UDEV - Run program on USB flash drive insert

I am trying to get a script to run whenever ANY USB flash drive (not just a specific one) is plugged in to the system and I have been pulling my hair out for about 2 weeks now on and off trying to figure it out. Can anybody help me? (running Ubuntu…
smd75jr
  • 127
  • 1
  • 1
  • 6
11
votes
1 answer

How do I log data from my serial ports consistently?

I need to deal with two pieces of custom hardware which both send debugging data over two serial connections. Those serial connections go through two serial-to-USB converters. The serial-to-USB devices have the same vendor numbers, device numbers,…
Nick ODell
  • 15,465
  • 3
  • 32
  • 66
11
votes
2 answers

Pass ATTR{idVendor} as argument in udev script

I have a script which is run whenever a usb device by vendor 1004 is connected. The udev rule I am using works and looks like this. SUBSYSTEM=="usb", ATTR{idVendor}=="1004", RUN+="/var/www/beta/trigger.php" Now I would like to have this script run…
joshtucker
  • 113
  • 1
  • 2
  • 6
10
votes
1 answer

Why udev init script default disable container support while in fact it works?

Use docker run -idt -v /dev:/dev --privileged --name delete ubuntu:18.04 /bin/bash to new a container, and in container use apt-get install -y udev to install udev. When start udev, it reports next: root@0947408dab9b:~# service udev start * udev…
atline
  • 28,355
  • 16
  • 77
  • 113
10
votes
4 answers

libudev development package not found

I am writing an app autodetect devices is plugged/unplugged. I used C++ with the Qt framework. libudev.h was included on my code. and I actually installed libudev-dev package successful via sudo apt-get install libudev-dev but QtCreator still has an…
kien bui
  • 1,760
  • 2
  • 17
  • 33
10
votes
2 answers

Files within Docker bind mount directory not updating

I am using docker bind mount to map the host /dev/serial/ folder generated by Ubuntu (which contains identifying symlinks to serial devices such as /dev/ttyUSB0). The full docker container run command I am using is docker run -d --restart always…
Jetkov
  • 103
  • 1
  • 1
  • 6
10
votes
4 answers

I can't install udev on plain ubuntu 14.04

I've plain Ubuntu 14.04 Server (64-bit) installation. When use: sudo apt-get update Print this error: .... Hit http://security.ubuntu.com trusty-security/universe Translation-en E: dpkg was interrupted, you must manually run 'sudo dpkg --configure…
kaczorro
  • 451
  • 3
  • 8
9
votes
2 answers

systemd/udev dependency failure when auto mounting separate partition during startup

EDIT: This occurs when I am trying to use a separate partition with ANY mount point, not just /var. I am using Buildroot to build an embedded linux system. I am trying to use a separate partition for /var, but this occurs for ANY mount point. My…
schumacher574
  • 1,081
  • 1
  • 14
  • 32
8
votes
2 answers

How to find reasons why an udev rule is not applied?

I added an udev rule to generate a separate link to a special tty device. I took the vendor and product id from lsusb: Bus 001 Device 016: ID abcd:1234 Foo Device The dmesg output for the device is: [ 369.384850] usb 1-1.1: new full-speed USB…
eDeviser
  • 1,605
  • 2
  • 17
  • 44
8
votes
1 answer

How to run Python script on USB flash-drive insertion

My goal is to run a Python script on USB flash-drive insertion. I have written a udev rule and a shell script that is called in that rule. udev rule: /etc/udev/rules.d/10-usb.rules KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb",…
Hypotheron
  • 81
  • 1
  • 2
8
votes
2 answers

passing arguments to shell script from udev rules file

In the rules file a script is executed by passing the arguments "LABEL" and "DEVNAME" for mounting ACTION=="add", RUN+="/appmount/scripts/usb_mount.sh %E{ID_FS_LABEL} %E{DEVNAME}" In the usb_mount.sh file printing the arguments value as echo…
Talespin_Kit
  • 20,830
  • 29
  • 89
  • 135
7
votes
1 answer

Linux: How to assign USB driver to device

This question is two-fold: 1- How do you manually detach a driver from a USB device and attach a different one? For example, I have a device that when connected automatically uses the usb-storage driver. // usbview output Vendor Id: xxxx Product…
linsek
  • 3,334
  • 9
  • 42
  • 55
7
votes
2 answers

Linux Evdev Poll Lag

I'm on a laptop with 2 connected keyboards (built-in and USB). I'm obtaining these connected keyboards with libudev and using epoll to poll them for input via the evdev interface: // Compile with $(gcc udev.c -ludev) #include #include…
7
votes
2 answers

python udisks - enumerating device information

It's apparently possible to get a lot of info relating to attached disks using the udisks binary: udisks --show-info /dev/sda1 udisks is apparently just enumerating the data which is available udev. Is it possible to get this information using…
crosswired
  • 1,351
  • 2
  • 11
  • 12
1
2
3
34 35