Questions tagged [udev]

250 questions
34
votes
7 answers

How can I check if a udev rule fired?

I am trying to acquaint myself with udev, under Ubuntu 13.10 (Saucy Salamander). Here is my first simple 95.usbbackup.rules rule: ACTION=="add", SUBSYSTEMS="usb", RUN+="/usr/local/bin/my_backup.sh" And here is the script (which has been chmodded…
pouzzler
  • 475
27
votes
2 answers

What problems does udev actually solve?

For that matter, what exactly was wrong with a bunch of static files in /dev? It's apparently unsatisfactory enough for developers to have reinvented this wheel by my count 3 times now (devfs -> udev + HAL -> udev), and now apparently it's going…
Bandrami
  • 1,943
26
votes
9 answers

udev rule to auto load keyboard layout when usb keyboard plugged in

im trying to load a new keyboard layout when I plug in a usb keyboard but my udev rule isnt working. SUBSYSTEM=="input", ATTR{idVendor}=="062a", ATTR{idProduct}=="0201", GOTO="usb_xmodmap_auto" LABEL="usb_xmodmap_auto" ACTION=="add",…
Jake Aitchison
  • 363
  • 1
  • 3
  • 5
21
votes
2 answers

Automounting USB drives on a headless systemd linux box

Approaches to auto-mounting devices in Linux keep changing, and googling returns quite a few solutions with various degrees of applicability for modern systemd-based boxes. The following approaches seem to exist: manually modifying /etc/fstab to…
ccpizza
  • 8,241
20
votes
6 answers

Using udev rules to run a script on USB insertion

I'm trying to set up a script to run every time I plug in a USB device. I created the file /etc/udev/rules.d/90-local.rules and added the following rule: ACTION=="add", SUBSYSTEM=="usb", KERNEL=="sd*", SYSFS{model}=="Cruzer*", RUN+="sh…
JTeK
  • 313
14
votes
2 answers

Use UUID in udev rules and mount usb drive on /media/$UUID

I want to mount the usb drive in /media based on the UUID of the disk. How can I use the UUID of a usb drive in a udev rules file and what is a udev rule to mount the usb drive with the UUID number as the folder name. The blkid command outputs the…
Talespin_Kit
  • 3,581
13
votes
1 answer

Assigning USB hub to specific seat in multiseat configuration

On my debian-based machine, I have a working multiseat configuration. One annoying detail that so far I couldn't fix is that any USB hardware I connect is always assigned to the primary seat. Scouring the internet, it seems that the solution to…
mac
  • 1,449
12
votes
4 answers

Where can I find the command "udevinfo" on Debian?

I'm trying to fix a problem with my webcam in Wheezy, and I need some information about the drive with the command udevinfo. The problem is: where is this executable? if I run sudo udevinfo the result is: udevinfo: command not found Any…
Kyrol
  • 1,247
11
votes
1 answer

System doesn't detect hot-plugged display port(through thunderbolt connector)

My external display(connected to my laptop through thunderbolt) works fine if connected before boot-up. However, once it's unplugged or disconnected by any means, xrandr won't detect the reconnected monitor anymore. I am running Arch Linux, using…
Chong
  • 586
11
votes
2 answers

systemd-udevd[381]: failed to execute '/lib/udev/socket:@/org/fre edesktop/hal/udev_event'

After upgrading to ubuntu 14.04 I see this in dmesg [ 1.538887] systemd-udevd[105]: starting version 204 [ 19.074098] systemd-udevd[310]: starting version 204 [ 19.271342] systemd-udevd[381]: failed to execute…
Simd
  • 967
11
votes
3 answers

disable MTP udev rules for specific device so it can be mount as a USB Mass Storage device

I have a problem with a specific device that is not an android / mobile device. It is a media player with an internal hard drive that I am trying to connect as a mass storage device so I can copy movies/series too and from it. I see the following…
nelaaro
  • 14,139
  • 30
  • 88
  • 115
9
votes
2 answers

udev rules ignore_device

I'm on Fedora 18. In /etc/udev/rules.d, I've added new rule (70-stm32.rules) with following content: SUBSYSTEM=="block", ENV{ID_MODEL}=="STM32_STLink", OPTIONS=="ignore_device" Then restarted udev: systemctl restart systemd-udevd.service But…
mrtworo
  • 93
  • 1
  • 1
  • 3
8
votes
3 answers

Script in udev rule doesn’t run

I'm running Ubuntu 9.10 (Karmic Koala) on a laptop and would like NumLock to automatically toggle depending on whether my USB keyboard is plugged in (numlock on) or unplugged (numlock off). To accomplish this, I first installed the "numlockx"…
8
votes
3 answers

restore /dev after `rm`ing it

during a gentoo install from the livedvd, there's one step to create a dev dir to be used later in the chroot of the target for the instalation it's done like that mount --rbind /dev /mnt/gentoo/dev in the middle of the installation i decided to…
gcb
  • 5,442
  • 13
  • 62
  • 86
7
votes
2 answers

Passing udev environment variables to systemd service execution

I am migrating an existing udev rule that bound to the change action of a block device and runs a given script. SUBSYSTEM=="block", ENV{DEVNAME}=="/dev/sr0", ACTION=="change", RUN+="/usr/local/bin/script" In this configuration udev passed the…
1
2 3
16 17