Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [udev]

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

0
votes
0answers
8 views

Udev rule for disabling usb serial driver

I have an ANT+ USB dongle, and some software I wrote, which uses libusb to communicate with the device. On recent linux distributions (like Ubuntu 18.04) when I plug in the dongle, in my dmesg I see ...
2
votes
1answer
18 views

Run a script when bluetooth device is connected

I'm trying to run a script automatically right after a certain bluetooth device is connected. To do so, I tried to create a new UDEV rule. The problem I encounter is that my rule doesn't execute upon ...
2
votes
1answer
16 views

How to use udevadm to fix unrecognized usb device

I am having trouble getting a midi controller (piano keyboard) to work on a raspberry pi. It works on my linux laptop, and another midi keyboard does work on the pi. It is listed under lsusb, so I ...
0
votes
1answer
11 views

change value in udev rule to 45% ATTR{capacity}==“[0-5]”

I have an old laptop which poweroff when battery is about 40% so I would like to add udev rule to suspend the laptop at 45% from arch wiki I found a udev rule to suspend when battery is 5% or lower ...
0
votes
0answers
9 views

Broken links in /dev/disk/by-path

I work with a lot of low quality USB flash memory modules - some of them can even hang the USB controller and block all traffic until I remove them. I'm testing these drives using f3 and a custom ...
0
votes
0answers
17 views

Multiple links in /dev/disk/by-path pointing to the same /dev/sd* device files

I'm working with mass testing and duplication of USB flash memory on Linux. The script I wrote for this stores paths to /dev/disk/by-path to detect if a device was plugged into a specific USB port - ...
1
vote
0answers
13 views

udev rule hotplugging at same time makes symlinks refer to same USB device

I have two udev rules that work fine separately. Both assign symlinks and permissions. However when I plug in the two devices at the exact same time (manually or through a USB hub), the symlinks point ...
1
vote
1answer
33 views

Unmount all your partitions to release/free up SSD

I have a machine with a single SSD and 3 partitions. I want to unmount the entire SSD while staying live so that I can run a firmware upgrade tool on the SSD. I know that unmounting your only disk is ...
0
votes
2answers
20 views

How to add link to a device permanently

Using the command: ln -s /dev/ttyUSB0 /dev/gps0 I link the device gps0 to ttyUSB0. The problem is after rebooting the machine, the created link will disappear and I should create it again. Is there ...
0
votes
0answers
18 views

Why does udev not catch optical media insertion?

I have a Debian Linux system with xfce4. While investigating CD-DVD automount issue I have found that for some reason udev does not detect media insertion in my optical drive unless I act somehow upon ...
1
vote
2answers
31 views

Adding udev rules results in systemd networking timeout

I am trying to have udev run certains scripts when my laptop is connected to charger or disconnected from it. To do that I created a file 99-local.rules in /etc/udev/rules.d and placed the following ...
2
votes
1answer
31 views

udev - Automatically disabling trackpad upon connection of wireless mouse

I keep the dongle in my laptop at all times for my wireless mouse, and want to use udev to run a script that disables my trackpad when the mouse is actually turned on. I've written rules and a script, ...
0
votes
0answers
36 views

udev not loading a module

I'm trying to get udev to load the brcmfmac driver as a module but for some reason it's not detected unless I create a .conf file in a /modules-load.d directory (either in /etc or /lib). As far as I ...
1
vote
1answer
22 views

How can I debug a udev rule?

I want to make a USB audio device accessible for passthrough to QEMU. I have created a udev rule but it is not working. I would like to know how I can debug this issue? SUBSYSTEM=="usb", ATTRS{...
0
votes
0answers
22 views

Can gentoo provide a Xorg/Wayland + Browser , without needing dbus, udev and systemd?

I have for the good part of a day tried to install gentoo distribution, desiring to avoid at all costs the following software dbus systemd udev My assumption was that using the USE flags in /etc/...
1
vote
0answers
28 views

Force release key with hwdb

I've got new keyboard and mute key is not sending release event. From what I've been reading in hwdb it is possible to make driver send synthetic release event and I've tried to make it do so. Here ...
0
votes
0answers
13 views

how to change disk order shown at sidebar in thunar of xfce4?

I have pc running with dual boot, win/debian+xfce4, and it shares some partition (those D/E/F in windows,ntfs). The partitions are sorted F/E/D at sidebar in thunar of xfce4. Is there any udev rules ...
0
votes
0answers
23 views

Block systemd-udevd from probing volume snapshot

We have a driver which creates volume snapshot. However, on RHEL 7.2 systemd-udevd is crashing RANDOMLY after removing the snapshot device, say /dev/volsnap001. The crash dump says: unable to ...
1
vote
0answers
28 views

udev: how to wait for a specific device to appear from a shell script

I have an embedded system with a tiny initramfs which needs to mount an overlayfs over the rootfs partition and switch_root to the new merged filesystem. It's just a couple operations run from the ...
0
votes
1answer
31 views

udev ACTION add isn't working

I'm trying to use udev for some basic actions, in this case the idea is to launch a simple script. The problem is that when I use this rule: ACTION=="remove", ENV{ID_FS_LABEL}=="NAMEHERE", KERNEL=="...
2
votes
0answers
36 views

Udev rule: test if a certain device property is defined

I'm writing udev rules to mount usb drive on raspbian and I need to check if the property ID_FS_TYPE is defined, whatever the value is. What I have so far is: ACTION=="add", DRIVERS=="usb-storage", ...
3
votes
1answer
74 views

udev uaccess and hid

I'm currently on a systemd based Linux distribution and while reading documentation, I noticed that hid devicecs such as keyboards and mice are not tagged with "uaccess" in 70-uaccess.rules. Is there ...
1
vote
1answer
19 views

Rename USB Sound device

I have raspberry pi running raspbian that has 3 sound devices plugged in via USB. I successfully renamed the card ids for alsa based on the USB port with this rule: SUBSYSTEM!="sound", GOTO="...
1
vote
1answer
23 views

What is the meaning of `ATTR{type}==“1”` on udev?

On getting info on a network device, one of the attributes listed for the top level device is: ATTR{type}=="1" What is the meaning of this and why rules to give persistent names to network devices ...
1
vote
1answer
127 views

Udev rule to automount media devices stopped working after systemd was updated to version 239

For some time I had a working udev rule to automount media devices. /etc/udev/rules.d/61-mount_media_by_label.rules # # To propagate udev's mountpoint to the user space, MountFlags must have a ...
0
votes
0answers
36 views

Can't mount a filesystem with a UDEV rule

I don't know what I am doing wrong... My udev rule: ACTION=="add", DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/host2/target2:0:0/2:0:0:0/block/sdb/sdb1", RUN+="/bin/bash -c '/bin/...
0
votes
0answers
35 views

UDEV Run Script Cannot Read Device Unless Root

I'm using floppy diskettes as ID cards. To accomplish this (on raspi debian jessie) I have created the following udev rule to kick off a script which runs a Java program to verify information written ...
2
votes
0answers
84 views

/dev/tty* serial devices are in group “root” for a second before they are switchted to group “dialout”. How to make them start out in “dialout”?

When I plug in a usb-to-serial device, it takes some time for the device to be switched to the "dialout" group (it starts out in the "root") group. This wreaks havoc with some client software that ...
0
votes
0answers
128 views

udev rule triggers error “Read-only file system”

I created an udev rule that launches a shell script that creates a directory /media/my-disk when some specific USB HD is connected. It has been working many months, but after a reboot (probably some ...
2
votes
0answers
44 views

Inconsistent behaviour with udev and “su -c ”

I have a JACK server set up in my computer to take care of all the sound inputs and outputs. When I connect an external USB sound card (name: CODEC), I want it to be detected by udev, so I setup udev ...
0
votes
1answer
20 views

udev rule not working when adding bInterfaceNumber

This is my udev rule SUBSYSTEM=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea71", ATTRS{serial}=="0", ATTRS{bInterfaceNumber}=="00",RUN+="/home/jamal/test.sh" The script is not running when ...
1
vote
2answers
207 views

How to mount USB drive in udev rule?

I setup a rule in udev to run a script in background to automount the USB drive. It managed to run the script fine, but the mounting is failing for some reason. RULE: ACTION=="add", KERNEL=="sd[a-z]*...
0
votes
0answers
122 views

Udev Rules Not Running

I'm playing with Udev Rules on OpenSuse Leap, and I'm trying to run a simple and small script once a USB device is plugged into my system. However, my script which I added in my keyword "RUN+=" does ...
1
vote
2answers
47 views

USB Device 'attached' several times

I got a problem when i am pluggin USB devices into my server. It looks like the USB devices repeatedly plugged in or re-assign the device letters sdb1: sdb1 The problem with that is that i execute a ...
1
vote
1answer
24 views

Dynamic Drive HotSwapping

Setup is simple. I have a rack-mounted server with 24 5" drive bays in the front. The server runs PLEX. Each HDD is NTFS partitioned and contain optional folders in root. Server is running Debian8 (3....
0
votes
2answers
171 views

How to mount my RFID reader as /dev/ttyUSB0

I've a USB RFID reader and main software I found on linux could use it through /dev/ttyUSB0 device When I connected it on my laptop I can see it with lsusb command returning : Bus 001 Device 012: ...
1
vote
2answers
120 views

Automatically move physical network interfaces to namespace

I would like all of the physical interfaces on my system to live within a specific network namespace called "physical". It's easy enough to move devices over manually using commands like ip link set ...
0
votes
1answer
50 views

udev doesn't want to run chgrp and chmod

I want to change brightness of my monitor via the /sys/class/backlight/radeon_bl0/brightness file. But the file has -rw-r--r--. permissions, so only root can write to it. This article says, that I can ...
0
votes
0answers
78 views

udev in debian LXC Container not working

I have to use udev in Debian because I want to have persistant device names to access always to the right device. I have two COM devices via USB. At first I created a simple rule which was not ...
1
vote
1answer
114 views

USB drive not detected

I had an USB on a headless raspberry pi running debian, but after rebooting without unmounting (there were programs running on the mounted folder), I couldn't use the USB anymore. The following is the ...
3
votes
2answers
110 views

Where does kernel define the SD card naming index?

I'm running an embedded board that is booted from an SDCard. The location of the rootfs gets passed to the kernel via kernel parameters: Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 ...
1
vote
0answers
14 views

Execute script on external keyboard connection [duplicate]

I'm performing two modifications on my keyboard on startup: xset r rate 160 50 setxkbmap -option "ctrl:nocaps" However, they seem to be lost whenever I disconnect my external USB keyboard (...
0
votes
0answers
27 views

Udev inhibits auto mount

I have been running Ubuntu 14.04 until I installed 18.04. On 14.04 I successfully created a udev rule that upon certain USB stick insertion it run a script AND the system used to auto-mount the stick (...
0
votes
0answers
19 views

UDEV issue.. USB triggers script but USB doesn't mount properly

On Raspbarian. So I have the UDEV rule: ACTION=="add", SUBSYSTEMS=="block", KERNEL=="sd[a-z]1", RUN+="/usr/local/bin/script.sh" This is saved in /etc/udev/rules.d/10-usb.rules I want it to ...
1
vote
1answer
131 views

what is DEVLINKS in the output of udevadm info --query=property --name=/dev/mmcblk0

I was looking at the udev information but couldn't find out anywhere. What does DEVLINKS signify also what are these values dev/disk/by-id/mmc-008G30_0xf281d20d & /dev/disk/by-path/platform-...
0
votes
0answers
13 views

Check in a udev RUN script whether Shift is held down [duplicate]

I setup an action to lock my computer on unplugging a USB device via udev. I want to suppress that action by holding down a key. How could I achieve that? Grub has keystatus for detecting Shift/Ctrl/...
1
vote
1answer
44 views

/lib/udev/findkeyboards missing

I'm trying to follow the answer here to set up some key swaps (Capslock as CTRL) on external keyboards (Microsoft Natural Ergonomic 4000). First step is this. Get the details of your USB keyboard. ...
1
vote
0answers
84 views

Trigger script to run when USB drive connected with no user logged on on Ubuntu 18.04

I'm working on a DIY NAS project running on Ubuntu 18.04. I want to implement the following feature: when an external USB disk is connected (could be a specific disk identified by UUID or ...
0
votes
0answers
77 views

dmesg and udevadm info do not show expected attributes for usb device in a custom Ubuntu kernel

I have a custom Linux kernel and a user mode driver to detect USB barcode scanner. Driver is getting the device information (PID, VID, Serial Number, etc.) using udev but in this environment driver is ...
0
votes
1answer
440 views

udev rules for USB-serial devices with the same product ID, vendor ID, and serial number

I am trying to assign unique symlinks to USB hubs with the same vendor ID and product ID with no serial numbers assigned to them. I read this, which is a similar problem: Fixed udev rules for USB ...