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
26
votes
1 answer

uevent sent from kernel to user space (udev)

I knew that udev plays on the linux system and it receives uevents sent from the kernel through netlink socket. However, my questions are: How kernel sends out the event ? It must be something triggered by adding/removing device and then sends out…
Sam
  • 4,521
  • 13
  • 46
  • 81
25
votes
5 answers

How to create a callback for "monitor plugged" on an intel graphics?

I've got an eeepc with an intel graphics. I'd like to hook a script to the event of a monitor plugged via VGA. How to do that?
Reactormonk
  • 21,472
  • 14
  • 74
  • 123
20
votes
5 answers

How to get USB vendor and product info programmatically on Linux?

Using udev I have been able to get this information for a certain USB device: idVendor: 13b1 idProduct: 0018 manufacturer: product: USB 2.0 Network Adapter ver.2 serial: 00FFFF Now I want to get the full strings that are associated with the…
StackedCrooked
  • 34,653
  • 44
  • 154
  • 278
18
votes
4 answers

Bash script to detect when my USB is plugged in and to then sync it with a Directory

Is there a Bash script and/or daemon that I can write that will detect a specific USB drive and then sync that drive with a directory?
user180825
17
votes
2 answers

USB devices UDev and D-BUS

I am trying to get a list of currently plugged in USB devices in Ubuntu 10.10 and monitor changes that happen, like devices being plugged in or out using UDev and D-BUS. I'm fairly new to programming using D-BUS. I saw one example: Linux : How to…
Calota Romeo
  • 173
  • 1
  • 1
  • 4
17
votes
2 answers

Determine optical media type (Audio CD, DVD, blu-ray) by using UDEV and scripts

I am relatively new to linux having made the switch from Windows to have a headless media centre. I am running KODIBuntu. I am trying to achieve an automated ripping system to backup my hard copy media collection. I have loved the concept with linux…
Littlejeem
  • 181
  • 2
  • 7
16
votes
9 answers

Adb stops detecting my phone after a while

I am developing for android on a linux machine and I have already created a udev rule for android and it works. After a while if I unplug the device and plug it back in again, adb doesn't recognize the device if I run lusb or dmesg to get…
pharaoh
  • 313
  • 1
  • 3
  • 15
15
votes
1 answer

What is the use of udevadm settle?

I have seen the of using udevadm settle command. What is the use of such a command in init scripts?
snr
  • 599
  • 2
  • 6
  • 10
14
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
  • 321
  • 1
  • 2
  • 7
14
votes
6 answers

Scripts launched from udev do not have DISPLAY access anymore?

I have a script that runs from udev when I plug in my external drive. It always worked. But after upgrading from Linux 3.8/Xorg 1.12/Mint 14 (Ubuntu 12.10 compatible) to Linux 3.11/Xorg 1.14/Mint 16 (Ubuntu 13.10 compatible), it doesn't work…
Redsandro
  • 11,060
  • 13
  • 76
  • 106
14
votes
2 answers

Linux: Start daemon on connected USB-serial dongle

On my Linux (Angstrom distro on BeagleBone Black) I have a USB dongle which presents as a serial port and per default is available as /dev/ttyUSB0 I want to start a daemon, which will connect to the serial port and make it available as a socket. I…
Philipp
  • 4,659
  • 9
  • 48
  • 69
14
votes
3 answers

Is it possible to expose a USB device to an LXC/Docker container?

I have an embedded system development image contained in a Docker file. In order to flash the code I need to connect to the nodes via USB Serial (e.g. /dev/ttyACM0). With Docker I used the new bind mount feature to (see…
till
  • 570
  • 1
  • 6
  • 22
13
votes
2 answers

Get link speed programmatically?

I am writing an application that reports attributes of network devices on the local machine. I need the mac address, mtu, link speed and a few others. I'm using udev for this. I've already figured out how to get the mac address and mtu, but not how…
StackedCrooked
  • 34,653
  • 44
  • 154
  • 278
13
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
  • 4,125
  • 9
  • 46
  • 97
12
votes
1 answer

How to know which device is connected in which /dev/ttyUSB port

I am using two Wavecom 16-port modems. When I attach the modems to my system, I am able to list of all the /dev/ttyUSB port names, but also I want to know, which modem is containing ports 0 to 16 and which one is containing ports 17 to 32? The…
Mayur
  • 311
  • 1
  • 4
  • 13
1
2 3
34 35