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

477 questions
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
  • 1
  • 6
10
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
  • 873
  • 2
  • 8
  • 21
10
votes
5 answers

Create openCV VideoCapture from interface name instead of camera numbers

The normal way to create a videocapture is this: cam = cv2.VideoCapture(n) where n corresponds to the number of /dev/video0, dev/video1 But because I'm building a robot that uses multiple cameras for different things, I needed to make sure that it…
KenArrari
  • 169
  • 1
  • 1
  • 7
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,042
  • 1
  • 13
  • 28
9
votes
3 answers

Getting live info from /dev/input

I am unsure if this is the correct place for this question. I am attempting to obtain the axis position values from a joystick /dev/input/js0 on my system. If I run jstest /dev/input/js0 it will give me live feedback on all buttons and axis…
Yamaha32088
  • 3,656
  • 8
  • 36
  • 84
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,095
  • 9
  • 38
  • 54
7
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
  • 16,106
  • 12
  • 44
  • 65
7
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
  • 71
  • 1
  • 2
7
votes
3 answers

ubuntu 12.04 libudev-dev won't install because of dependencies

I have a some sample c++ code that receives hotplug events using the udev library. It worked fine in Ubuntu 10.04. It's only prerequisite was the libudev-dev package: sudo apt-get install libudev-dev But when I tried to install that package in…
JohnA
  • 557
  • 2
  • 4
  • 14
7
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
  • 17,730
  • 25
  • 86
  • 117
6
votes
3 answers

udev: device connected at boot time

I'm using udev to detect USB drive connection and disconnection on my Ubuntu 10.04 LTS x64 server. Everything works fine when USB devices are connected while the machine is running, but if one is already present at boot time, my script does not…
Bob Sammers
  • 2,501
  • 23
  • 30
6
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
  • 63
  • 1
  • 5
6
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,091
  • 1
  • 10
  • 12
6
votes
0 answers

Docker Linux Mint NetworkManager failed to find device with udev

Using: Linux 4.13.0-26-generic #29~16.04.2-Ubuntu SMP Tue Jan 9 22:00:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux I've been noticing my system hesitating while working, and finally tracked it down to something wonky going on with Docker veth…
Mike Crowe
  • 1,776
  • 2
  • 18
  • 36
1
2
3
31 32