Questions tagged [udev]

240 questions
32
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
  • 455
  • 1
  • 4
  • 8
28
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,873
  • 1
  • 16
  • 14
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
19
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
  • 303
  • 1
  • 2
  • 6
18
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: modifying /etc/fstab to add…
ccpizza
  • 7,456
  • 6
  • 54
  • 56
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,201
  • 6
  • 24
  • 18
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
  • 10
  • 20
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
  • 927
  • 6
  • 14
  • 28
11
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,209
  • 7
  • 21
  • 38
10
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
  • 13,149
  • 30
  • 84
  • 111
9
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
  • 546
  • 1
  • 5
  • 14
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"…
Eric Heikes
  • 113
  • 1
  • 1
  • 3
8
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
  • 83
  • 1
  • 1
  • 3
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…
Ben Campbell
  • 271
  • 2
  • 10
7
votes
2 answers

How to rescan and remount drives on Ubuntu Hardy or Jaunty?

When I connect an USB drive to an Ununtu Hardy and Jaunty system, the system mounts the partitions found on the drive, and opens a Nautilus window for each mounted partitions. Within Nautilus, I am able to unmount partitions. What I need is a…
pts
  • 7,200
  • 10
  • 38
  • 49
1
2 3
15 16