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
0
votes
0 answers

Linux Error during make gobject-introspection-1.32.1

I want to install gobject-introspection-1.32.1 on my embedded Linux. But during make this error message appear. Do anybody now what to do? -bash-3.2# make [ -d gir ] || /bin/mkdir -p…
Peter
  • 1,439
  • 2
  • 19
  • 40
0
votes
1 answer

libudev returns duplicated usb devices

I'm creating a program to list all USB devices in Linux (Ubuntu in my case). I've been following this tutorial http://www.signal11.us/oss/udev/ and changed the subsystem from "hidraw" to "usb". It lists the devices fine but it contains duplicates. I…
DiogoNeves
  • 1,647
  • 2
  • 16
  • 35
0
votes
0 answers

When USB drive is connected, message on console using udev

Is it possible to send some message like Device Added or Removed etc to console on my target using udev rules?
123456
  • 61
  • 1
  • 7
0
votes
3 answers

How to trigger a script with udev when connecting sda, but NOT sda1-x

I need to run a script, when connecting a usb-drive to an embedded system. My idea was: SUBSYSTEM=="block",ACTION=="add", KERNELS=="sd?",RUN+="/script param1 %k" It needs to run with any usb-stick, so I am not able to use Vendor-specific…
nico
  • 1,019
  • 4
  • 13
  • 27
0
votes
1 answer

Default Udev rules

If i have not defined my own set of udev rules what will be the default udev rules and how can I know them. Consider this question in the context of dynamically registered character driver. Thanks
user1395806
  • 137
  • 1
  • 3
  • 14
0
votes
1 answer

udev/Bash script to get usb info

I have written a udev rule that call a script to send email when a usb drive is attached/removed. so far its working fine. following is my udev rule and send email script: SUBSYSTEM=="usb", ACTION=="add", RUN+="/u/usb_added %b" SUBSYSTEM=="usb",…
user115079
  • 671
  • 1
  • 9
  • 23
-1
votes
1 answer

Creating a new directory in /dev using udev rule

This is the code snippet responsible for creating the device: master_dev = device_create(dev_cl, NULL, MKDEV(major, minor), NULL, "synchmess"); My udev rule is the following: KERNEL=="synchmess", NAME="/synch/synchmess", MODE="0444" From my…
GiuDaquan
  • 3
  • 2
-1
votes
1 answer

Blocking USB HID in Linux

I'm programming a kioks device and i want to block all usb devices expect 2 kind of usb.One is my touch screen hid usb and the other one is usb storage devices.Actually i tried write rules under udev.I tried this code : ACTION=="add",…
-1
votes
1 answer

systemd-udev rule applied multiple times (twice in my case)

I have udev rule with the following content: DRIVERS=="adt7310", RUN+="/bin/ln -s /sys//devices/platform/soc/fff00000.spi/spi_master/spi0/spi0.0/temp1_input /dev/temperature_adt" The problem is that this rule is applied twice and in the log…
Georgi
  • 43
  • 1
  • 7
-1
votes
1 answer

Getting symlink name of ttyUSB device in Qt

I'm stuck with a problem concerning udev symlink property. I just set udev rules so that my TTL-232R USB device has a symlink name. However, I don't know how to extract this symlink name on my Qt project (which is actually not originally mine but…
Robin
  • 1
-1
votes
1 answer

udev cdrom rules failing to run scripts

The following is my rules file in /etc/udev/rules.d/10-autodvd.rules SUBSYSTEM=="block", KERNEL=="sr0", ENV{ID_CDROM_MEDIA_DVD}=="1", ACTION=="change", RUN+="/usr/local/bin/makemkv.sh sr0" SUBSYSTEM=="block", KERNEL=="sr1",…
whoopn
  • 51
  • 1
  • 2
  • 7
-1
votes
1 answer

Udev rules do not work on fedora 24

I am trying to execute a script when a usb is plug in on fedora 24 automatically. I've found a lot of information about how to do this one on old versions. However, in Fedora 25 it does not work. This is what i do: I have created a file in…
-1
votes
2 answers

Trying to mount a usb partition in Linux using a cpp program

I want to detect a usb connection and mount its corresponding partition. I tried using udev.I was able to find device in /dev/bus/usb/001 or/002.But from this I cannot find which partition it uses. So using udev I searched for block partitions and…
rjmrohit
  • 11
  • 4
-1
votes
1 answer

Execute script in new terminal window on hard drive plugging

I would like to execute a backup script with rsync everytime a specific hard drive is plugged to my computer on ubuntu 16.04. However I would like the user to be prompted if the backup should run or not and then he should be able to see the rsync…
Louis M
  • 3,124
  • 3
  • 16
  • 20
-1
votes
1 answer

Virtual file for AES/SHA1 kernel side computing

Is there a file (in /dev perhaps) that allows me to compute AES or SHA1 on data? There are analogs like /dev/urandom /dev/zero etc. It would work like this: open said file, write data to it and read results out of it. Using sendfile syscall would be…
ArekBulski
  • 3,197
  • 2
  • 26
  • 44
1 2 3
31
32