Questions tagged [udev]

Udev is a Linux process that manages device file entries under /dev

Filter by
Sorted by
Tagged with
81
votes
3answers
80k views

Why is my ethernet interface called enp0s10 instead of eth0?

When I run ifconfig -a, I only get lo and enp0s10 interfaces, not the classical eth0 What does enp0s10 mean? Why is there no eth0?
13
votes
1answer
30k views

Is there a way to change device names in /dev directory?

I wrote this rule for testing purpose: SUBSYSTEMS=="usb", ATTRS{manufacturer}=="Kingston", ATTRS{serial}=="001CC0EC34A2BB318709004B", ATTRS{idVendor}=="0951", ATTRS{idProduct}=="1642", SYMLINK+="pen",...
225
votes
8answers
418k views

How to reload udev rules without reboot?

How should one reload udev rules, so that newly created one can function? I'm running Arch Linux, and I don't have a udevstart command here. Also checked /etc/rc.d, no udev service there.
42
votes
2answers
94k views

How to run custom scripts upon USB device plug-in?

What is the state-of-the-art method for automatically executing custom scripts upon USB device plug-in under current Linux distributions like Debian/CentOS/Fedora? For example if you want to ...
57
votes
11answers
46k views

A tool for automatically applying RandR configuration when external display is plugged in

is there a tool which enables one to: remember current RandR configuration (position, orientation, resolution etc) on per-monitor basis, automatically apply last known good configuration as soon as ...
78
votes
4answers
24k views

Why are network interfaces not in /dev like other devices?

I'm mostly curious, but why aren't network interfaces in /dev? Are there any other kinds of devices that aren't represented as a node under /dev?
13
votes
3answers
10k views

Call notify-send from an udev rule

I use Linux Mint 13 MATE, and I'm trying to set up notifications when I plug/unplug devices. First of all, I found udev-notify package, but unfortunately it almost doesn't work for me: it works for ...
17
votes
3answers
7k views

mount is not executed when called by udev

I tried to create some udev rules to mount and unmount my USB flash drives; the rules for the moment are very simple: ACTION=="add",KERNEL=="sd[b-z]",RUN+="/root/scripts/plug_flash_drive.sh %k" ...
31
votes
4answers
43k views

How to execute a shellscript when I plug-in a USB-device

I want to execute a script when I plug in a device in my Linux machine. For example, run xinput on mouse or a backupscript on a certain drive. I have seen a lot of articles on this, most recently ...
54
votes
7answers
54k views

How can I detect when a monitor is plugged in or unplugged?

Is there any event that is triggered when I plug in or out an external monitor into the DisplayPort of my laptop? ACPID and UDEV don't react at all. I'm using onboard graphics on an intel chip. Here ...
10
votes
5answers
28k views

Automounting USB sticks on Debian

I'm running Debian Squeeze on a plug computer (so SSH only, no GUI) and what I'm trying to do is get it so that when a USB stick is plugged in, it gets automatically mounted. What I've done is ...
1
vote
2answers
678 views

Udev rules for seemingly indistinguishable devices

I'm trying to use udev to automatically set up symlinks to an Intel RealSense D415. This is because I use several cameras on the machine and need to be able to reliably refer to them via a filename (...
5
votes
1answer
3k views

How does the linux kernel know device major and minor numbers?

As far as I know, the kernel detects hardware, adds information to sysfs creates a device in /dev and then generates a udev event. My question is, do device drivers do all of this or it is the kernel ...
2
votes
2answers
1k views

Why is my udev-fired script not working?

I created a udev rule in order to sync my USB drive with my documents folder, but it doesn't seem to be working. 95-usb-auto-sync.rules: ACTION=="add", ATTRS{idVendor}=="0930", ATTRS{idProduct}=="...
11
votes
5answers
13k views

How to run long time process on Udev event?

I want to run a ppp connection when my USB modem is connected, so I use this udev rule: ACTION=="add", SUBSYSTEM=="tty", ATTRS{idVendor}=="16d8",\ RUN+="/usr/local/bin/newPPP.sh $env{DEVNAME}" (...
6
votes
2answers
2k views

(ubuntu 16.04) How can I detect a device independent USB insert event

I am trying to detect an USB insert regardless of the device it is. Eg: A phone, a battery pack, a biometric system etc., which may or may not be recognized by Linux (no drivers or nothing to "Drive/...
6
votes
1answer
5k views

Udev rule is not being used?

I'm setting up udev to handle my external USB hard drive when it gets plugged in and removed (no mounting yet). So far, I've made two new rules in /etc/udev/rules.d/10-local.rules to log adding/...
6
votes
2answers
15k views

Arch Linux not booting after system update

After running a system update pacman -Syu with the testing repo not commented, my computer no longer boots. It shows the udev loading, then shows a black screen with a cursor blinking in upper left. I ...
3
votes
2answers
3k views

Udev rule to automatically disable touchpad when a USB mouse is connected

I am pretty new to udev and wanted to write a rule that upon connecting an usb mouse disables my touchpad. This is what I have come up with(mostly by ear): ACTION=="add", SUBSYSTEM=="input", ENV{...
3
votes
2answers
2k views

Udev hwdb rule does not work

I am switching from Ubuntu to Arch Linux and encountering the issue that a udev hwdb rule that has worked until now does not work anymore. The only obvious difference between the systems is that ...
5
votes
2answers
2k views

Ignoring other USB devices in a udev rule?

Is it possible to create a udev rule for an USB device and ignore other USB devices? I want my system to support HID USB touchscreen (hid.ko) and ignore HID devices such as keyboards, mice, etc.
3
votes
1answer
2k views

What permissions should a udev rule have?

What permissions should a udev rule have for a USB device? 644? 755? For example on Ubuntu I'm looking at this file: /etc/udev/rules.d/99-lpcscrypt.rules
2
votes
1answer
1k views

Udev: running a shellscript that accesses an X display [duplicate]

After getting my 3g-modem to work in Arch Linux I wanted to eliminate some manual labour required in the process. Hence I needed to create an udev rule. After some trial and error I came up with the ...
30
votes
1answer
45k views

How to assign USB driver to device

This question is two-fold: First, how do you manually detach a driver from a USB device and attach a different one? For example, I have a device that when connected automatically uses the usb-...
9
votes
2answers
10k views

Udev rule to mount disk does not work

I have the following content in in /etc/udev/rules.d/81-external-disk.rules: ENV{ID_FS_UUID}=="6826692e-79f4-4423-8467-cef4d5e840c5", RUN{program}+="/bin/mount -o nofail,x-systemd.device-timeout=1 -t ...
6
votes
1answer
9k views

Making udev rule for bluetooth keyboard

I'm using a logitech k810 bluetooth keyboard with my laptop running Debian Wheezy. (I got the keyboard working by following this guide.) By default the F1-12 keys are multimedia keys unless the FN ...
3
votes
2answers
5k views

sysfs and devtmpfs

Ulrich Dangel explains very well the difference between devtmpfs and udev. What about sysfs? I understand that the kernel uses sysfs to export device nodes to user space to be used by udev. So ...
20
votes
5answers
99k views

Udev : renaming my network interface

I just installed RHEL 6.3 on a Dell 1950 server. This server as two GBit ports, Gb0 and Gb1. For some obscure reason, udev chose to name Gb0 eth1 and Gb1 eth0. This is definitly not a good find for ...
16
votes
4answers
10k views

Are there alternatives to using `udev`?

While I understand the greatness of udev and appreciate the developers' effort, I was simply wondering if there is an alternative to it. For instance, I might imagine there should be a way to make ...
11
votes
1answer
20k views

Understand output of `udevadm info -a -n /dev/sdb`

I plug an external HDD into my laptop. I try to find out the information by $ udevadm info -a -n /dev/sdb Udevadm info starts with the device specified by the devpath and then walks up the chain of ...
8
votes
5answers
4k views

Why doesn't xsetwacom work from udev?

I made a script to rotate my Wacom Bamboo tablet 180 degrees. It works fine when I execute it as myself (user) or root, but when started from udev (i.e. when plugging the tablet into a usb port) it ...
11
votes
2answers
25k views

Renaming my wlan network interface

I know this question is similar to "Udev : renaming my network interface", but I do not consider it a duplicate because my interface is not named via a udev rule, and none of the other answers in that ...
8
votes
2answers
17k views

Where is the official udev source and other dev information?

I'm trying to find a changelog or commit history for udevd, but I can't seem to find the official source. Where is that?
8
votes
2answers
6k views

udev rule for assigning known symlinks for identical usb serial devices

I have two (and possibly in the future, more) USB serial devices which are identical (down to the serial number, unfortunately) - they're actually BTC miners. Currently they end up as ttyUSBX where X ...
6
votes
3answers
13k views

How can I create a udev rule to mount a USB drive read only?

I'm trying to set a particular USB drive to always mount read only. If I plug it in, it is seen as sdb with a single partition, sdb1. Here are some relevant udevadm lines (not the entire output of ...
5
votes
1answer
1k views

How to disable USB devices based on their vendor ID on GNU/Linux?

In that question someone wanted a blacklist for all USB devices, and then only allow specific devices. In this question, we want to accept all USB devices, but prevent the driver (e.g. cdc_acm) from ...
9
votes
2answers
48k views

Cloned Linux system and /etc/udev/rules.d/70-persistent-net.rules

I set up an Ubuntu system and configured it properly, including defining eth0 in /etc/network/interfaces. I then imaged that system and cloned it on a new system. When I booted up the system the ...
8
votes
2answers
9k views

Changing the way automatic screen rotation works in Gnome shell

I recently acquired a Lenovo Yoga 3 11" convertible notebook. It works well with out-of-the-box with Ubuntu Gnome LTS 16.04.2 - WiFi, Bluetooth, even suspend and resume work without any issues so far. ...
0
votes
2answers
766 views

Bind serial device address to specific usb port

My OS: Raspbian Stretch Lite tl;dr; I have 2 identical USB device I want to make sure their address didn't get confused My thinking goes to bind the address to specific USB Port. I'm fine to "...
11
votes
5answers
3k views

What's the difference between udev and hald?

I'm just beginning to dive into the internals of Linux, and I was wondering what the difference is between udev and the hal daemon. From what I gather, both seem to be responsible for managing hot ...
8
votes
1answer
2k views

Swapping <esc> and <caps lock> in a way that persists with external keyboards

I have a file called ~/.speedswapper which contains the following: ! Swap caps lock and escape remove Lock = Caps_Lock keysym Escape = Caps_Lock keysym Caps_Lock = Escape add Lock = Caps_Lock ......
4
votes
2answers
4k views

Udev rule file for modem not working

I am using a modem for sending SMS, which has 16 (ttyUSB0 to ttyUSB15) ports. I want to make udev rule to give device name AMPM and ports should be named Port1, Port2,...Port16. Check out this output ...
2
votes
1answer
2k views

change size of devtmpfs /dev/

My new kernel has CONFIG_DEVTMPFS enabled, and thus my /dev is mounted as devtmpfs. My old kernel was not using CONFIG_DEVTMPFS, and /dev used to be mounted as plain tmpfs. Now I have noticed, the ...
2
votes
0answers
948 views

Automount local drives on boot and hot-plug

I am trying to automatically mount all readable internal and external drives on boot and on hot-plug if they are not already mounted, preferably as a non-root user. I cannot use fstab to do this ...
1
vote
1answer
3k views

udev monitor hotplug rule not running

I have setup a basic udev rule to detect when I connect or disconnect a mDP cable. The file is /etc/udev/rules.d/95-monitor-hotplug.rules KERNEL=="card0", SUBSYSTEM=="drm", ENV{DISPLAY}=":0", ENV{...
1
vote
1answer
1k views

Udev rules involving X11 don't run on startup

I have some udev rules written to run when I connect certain usb devices. For example, I change pointer velocity for certain mice, and change xmodmaps for particular keyboards. The scripts work well ...
1
vote
1answer
2k views

How do I connect a USB mass storage device that has a custom pid and vid?

I have a device, custom mp3 player, that the pid and vid show up as a011:a011. dmesg usb 1-1.1: new high-speed USB device number 4 using ehci-pci usb 1-1.1: New USB device found, idVendor=a011, ...
0
votes
1answer
2k views

KERNELS path for USB device connected to HUB

I'm creating udev rules to map my USB devices (ttyUSB*) to the USB ports where they are connected. The usual way to do so is looking at the output of: udevadm info --name=/dev/ttyUSB0 --attribute-...
92
votes
4answers
343k views

How can I find available network interfaces?

This is in regard to linux, but if anyone knows of a general *nix method that would be good. I booted a system yesterday with an ethernet cable plugged in. "NetworkManager" is not installed, so once ...
34
votes
1answer
25k views

Difference between /dev and /sys/class?

What is the difference between the device representation in /dev and the one in /sys/class? Is one preferred over the other? Is there something one offers and the other doesn't?