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
5
votes
2 answers

UDEV-How to get value of a child device attributes

I am writting an udev rule to set name of two serial ports. I want to use the value of the attribute bInterfaceNumber in the symlink. My rules is: SUBSYSTEMS=="usb", DRIVERS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010",…
mcarrolle
  • 250
  • 1
  • 4
  • 12
5
votes
3 answers

How can my perl script react to arbitrary devices using UDev and not HAL?

I'd like to use a simple Perl script to make some configurations every time I connect e.g. my bluetooth headset. I tried using Net::DBus, but my OS/DE (Fedora 17, GNOME3) doesn't use HAL anymore. I really don't want to install HAL just for this, so…
5
votes
1 answer

Activating a script using udev when power supply is connected/disconnected

I'm trying to get udev to run a couple of small scripts when I connect/disconnect the powersupply. I have the following code in /etc/udev/rules.d/50-caff.rules : SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_STATUS}=="Charging",…
Hawkuro
  • 61
  • 1
  • 5
5
votes
2 answers

adb no permissions error suddenly

I have been working on the Snapdragon Dragonboard for a few days now. I had been able to set it up and even push some applications onto it and run them. Needless to say, the commands adb shell and adb devices gave me some meaningful outputs. But…
Spectre
  • 682
  • 10
  • 26
4
votes
2 answers

Getting Notified on "Ethernet cable plugged in" events in linux

I am writing a Python Application running on linux. I want to be able to register and be notified by the system if a network cable is plugged in/ out. I am already using pyUdev (python bindings for libUdev) in order to get notified for USB plug in…
TanB
  • 511
  • 4
  • 7
  • 18
4
votes
2 answers

Flutter build error at task :app:copyFlutterAssetsDebug

When building a Flutter app in my linux machine, I encountered this error: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:copyFlutterAssetsDebug'. > Could not copy file…
Fawwaz Yusran
  • 1,260
  • 2
  • 19
  • 36
4
votes
3 answers

Ubuntu Linux Udev rules: Is it possible to run program written in C through udev rules?

I'm currently working on a project to run an program written in C when a USB device is plugged in. Is this possible with udev rules? I've currently got it to run a Hello World script when I plug in my device. However, it runs it more than…
Tyler
  • 41
  • 1
  • 2
4
votes
1 answer

How are kernel modules automatically inserted by systemd?

I am trying to find out how kernel modules are automatically inserted. I am using Arch Linux, so basically I am working with systemd. After some research, I know there are at least 2 ways to insert kernel modules: systemd has a unit called…
johnlinp
  • 853
  • 6
  • 22
4
votes
3 answers

Auto mount usb drive from udev rules and shell script

I'm currently trying to mount any usb drive connected to my computer automaticaly. My goal is to mount usb devices either with the label if they have one or with the uuid if they don't. To do it I write a udev rule in…
Arkaik
  • 852
  • 2
  • 19
  • 39
4
votes
1 answer

apt-get upgrade freezes while setting up udev

i am trying to upgrade my debian system however it keeps freezing when trying to setup udev, ~$ sudo apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... The following…
abyss
  • 73
  • 1
  • 11
4
votes
2 answers

How to run a shell script after a device is mounted using UDEV

I wanted to know how to run a script after a usb pen drive is inserted and auto-mounted Till know i am able to run a script as soon as the device is inserted, however the mounting of the device takes place after the shell script action has ended
Ishan Karve
  • 101
  • 2
  • 6
4
votes
0 answers

Run a script on monitor connection/disconnection event

I read many threads about how to do this and yet it doesn't work for me. What I want to achieve is: When my laptop has 2 additional displays connected when I close its lid, I don't want it to go to sleep. However, if I disconnect the displays and…
nbtk
  • 3,039
  • 4
  • 21
  • 19
4
votes
1 answer

Why does linking against both sdl2 and udev cause a segmentation fault?

I have the following really dumb C program: #include int main () { SDL_Init(SDL_INIT_VIDEO); } If I compile it and link against sdl2, all is well: [nix-shell:~/work/on-the-limit]$ gcc oddity.c -lSDL2 -o…
ocharles
  • 6,172
  • 2
  • 35
  • 46
4
votes
2 answers

How to fix linker errors for libudev on Ubuntu 15

I've installed libudev-dev, I can see the file /usr/lib/x86_64-linux-gnu/libudev.so but when I run gcc -Wall -ludev -o test test.c I get following error.. opensourcegeek@box:~/project/udev_device_discovery$ gcc -Wall -ludev -o test test.c…
opensourcegeek
  • 5,552
  • 7
  • 43
  • 64
4
votes
0 answers

A c++ program to get the file directory of usb flash device on linux

I have been looking for several examples (on this page and others) of how to get the USB flash memory path folder (something like /media/john/B5D6-DC71) in order to make a c++ program to save files on this device. I mean, I want that the program…
Joan C
  • 51
  • 3