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
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
  • 20,410
  • 12
  • 66
  • 110
21
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
  • 3,889
  • 10
  • 40
  • 74
17
votes
3 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
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
  • 32,392
  • 40
  • 137
  • 267
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
  • 1
  • 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
  • 14
15
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
  • 153
  • 1
  • 1
  • 4
14
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
  • 409
  • 2
  • 5
  • 9
13
votes
5 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
  • 10,080
  • 11
  • 64
  • 94
13
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,301
  • 7
  • 37
  • 62
13
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
  • 539
  • 5
  • 21
12
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
  • 32,392
  • 40
  • 137
  • 267
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
  • 5,641
  • 1
  • 23
  • 47
11
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
  • 191
  • 1
  • 3
  • 12
1
2 3
31 32