Questions tagged [udev]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
493 views

No /dev/tty when script is invoked as UDEV trigger

I have raspberry pi with stock raspbian installed. I have also installed RetroPI which works just fine. What I wanted to do, is to write small autostart script that would start emulationstation (...
Antoniossss's user avatar
0 votes
1 answer
194 views

How to rename "lo" interface in Ubuntu Server 18.04?

How to rename "lo" interface in Ubuntu Server 18.04 ? I have tried using udev rules without success, here is my code: SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:00:00:00:00:...
Crudelis's user avatar
0 votes
0 answers
203 views

Why udev is preferring label over ID_SERIAL

Lets say i have a disk /dev/sdc,Assume ID_SERIAL for that disk is 36000c292879f425e5d10aa537f7b57e5 And i wrote below rule file 70-persistentdisk.rules KERNEL=="sdc", OWNER:="grid", GROUP:="asmadmin"...
vishnubvrit's user avatar
0 votes
3 answers
1k views

Udev rules are not getting applied by ID_SERIAL

I have a disk /dev/sdr. Below is the UDEV information for sdr using below command: sudo udevadm info -q all -n /dev/sdr Result: E: ID_SCSI=1 E: ID_SCSI_SERIAL=...
vishnubvrit's user avatar
3 votes
0 answers
554 views

Linux snap confinement - access usb device

Currently I'm struggling to connect to a USB device from a confined snap environment, not knowing how to approach the problem anymore, but also still learning about snap confinements / udev rules etc. ...
Paul's user avatar
  • 131
2 votes
1 answer
257 views

How do I specify which driver is used for a device when more than one are applicable

I'm working on getting a more modern Linux working on a single board computer where the original company has gone under but the hardware is well supported by the open source community. I've made very ...
BytePorter's user avatar
2 votes
0 answers
158 views

Udev, scripts and permission

Founds lots of other posts with "similar" problems, but none that are actually close to the issue I have. Raspberry PI Raspian. My Udev rule: SUBSYSTEM=="block", ACTION=="add", RUN+="/bin/bash usr/...
Peter Longfield's user avatar
0 votes
0 answers
64 views

What N600 mean in disk_id mean in /dev/disk/by-id/

I wanted to generate the file names inside the directory /dev/disk/by-id/. with lsblk i get $ lsblk -o name,model,serial NAME MODEL SERIAL sda HGST HUHXXXX12AL XXXXXXXX ...
albttx's user avatar
  • 109
2 votes
1 answer
347 views

Network unavailable inside udev shell script

I have the custom shell script executed when FireWire device connected/disconnected from my PC. Script executed successfully but I found network unavailable inside this script. Here is my .rule: [...
Sorc's user avatar
  • 23
1 vote
0 answers
531 views

Why is my udev rule called twice?

I am working on CentOS 7. I wrote a udev rule in order to start a service each time a cd is inserted. The udev rule is the following : KERNEL=="sr1", SUBSYSTEM=="block", ACTION=="change", ENV{...
M.Brbr's user avatar
  • 149
0 votes
1 answer
66 views

What if there are 2 udev rule in the /etc/udev/70-xxx.rule

What will happen if there are 2 udev rules within the /etc/udev/70-xxx.rule in above kernel 3.10.x? I had 2 udev rules, the eth got named to ethx_renamed for some reason. I was wondering if this is ...
Jepsenwan 's user avatar
0 votes
1 answer
10k views

Network interface names via udev for USB NICs

I have a laptop "server" (client requirement, for some reason) that has 6 USB3 ethernet NICs connected to it. As of late, the laptop has had to go with engineers on road trips, and the USB NICs get ...
Templeton's user avatar
0 votes
0 answers
645 views

Udev rules not working as expected

I have a Udev rule on a scanner device, which is suppose to work on USB removal, but it is not working. Rules on USB add is working. # Scanner Add KERNEL=="tty[A-Z]*", SUBSYSTEM=="tty", ACTION=="123"...
Mohammad Salman's user avatar
1 vote
0 answers
941 views

How to create a white-list for usb devices using udev rules?

I'm trying to create a white-list using udev rules for USB devices on my CentOS machine however i get inconsistent results. I tried blocking one device on a specific USB port using: 'echo 0/1 > /sys/...
Dean Genish's user avatar
1 vote
1 answer
850 views

AWS EC2 NVMe disk resize udev rule

I just started migration of AWS EC2 T2 to T3 instances. I want to create udev rule which detects disk resize. I created new rule SUBSYSTEM=="block", ACTION=="change", ENV{RESIZE}=="1", RUN+="/usr/...
Maros Mitucha's user avatar
4 votes
2 answers
5k views

udev rule to start a command on AC/Battery plug/unplug event

To save battery, i'd like to turn off effects (compositor) whenever laptop runs on battery. I thought of achieving this with udev rules. Created a file /etc/udev/rules.d/99-myrule.rules : ACTION=="...
user2551102's user avatar
3 votes
1 answer
950 views

How to ensure that USB Type A to COM device assignments stay the same after reboot in Ubuntu

I have two USB Type A to COM cables. Let’s call them: Cable 1 and cable 2. Now I need to make sure their TTY device assignments stay the same after reboot. I am using Ubuntu. For example I want to ...
Samvel's user avatar
  • 163
0 votes
1 answer
735 views

Udev rules' not working with 'ATTR'

I want to change my cpu's hwp_dynamic_boost option in /sys. I added ACTION=="add|change", KERNEL=="cpu", ATTR{intel_pstate/hwp_dynamic_boost}="1" to /etc/udev/rules.d/99-Performance.rules. It won't ...
William's user avatar
  • 581
0 votes
0 answers
356 views

Linux: How to define at what point of boot an external hdd is mounted?

I am currently using LibreElec on a raspberry pi with an external hdd connected to it using an active USB hub. It now happens, that the external HDD is only mounted after LibreElec and Kodi are ...
pixelbash's user avatar
1 vote
0 answers
1k views

Auto mount/umount USB and SD Card at runtime

USB and SD Card is mounted at boot time. Below is my fstab : /dev/sdg1 /mnt/usb1 auto defaults,nosuid,nodev,nofail 0 0 /dev/sdh1 /mnt/usb2 auto defaults,nosuid,nodev,nofail 0 0 /...
Hiren's user avatar
  • 11
0 votes
2 answers
637 views

How can I automatically format and write data to an SD card when it is plugged in? (Trigger systemd service on change rather than add.)

I'd like to flash SD cards with a custom script (writes partition table, then copies over a rootfs, etc.) whenever an SD card is inserted. At first glance this seemed straightforward -- I'd just use ...
cwshep's user avatar
  • 26
1 vote
0 answers
470 views

How can I force my pci card usb bus numbers to stay the same after reboot?

I have a few identical usb sound cards and wrote a udev rule so they each get a persistent name matching the specific port they are attached to. Now I added a pci usb 3.0 card and that is playing ...
FoxSam12's user avatar
  • 111
0 votes
1 answer
593 views

Empty 70-persistent-net.rules directory

I am using the bento/centos-7.5 box in vagrant. When it comes up, there is an empty directory in the path /etc/udev/rulesd/70-persistent-net.rules/. Isn't 70-persistent-net.rules supposed to be a ...
leoOrion's user avatar
  • 123
0 votes
1 answer
273 views

Consistent USB device adapter naming on Linux

I have a USB port into which I insert all sorts of different USB disks over time. The kernel does not consistently allocate the same device for it, so I have to go hunt after each insert. How can I ...
Johannes Ernst's user avatar
-1 votes
1 answer
2k views

Repairing USB drive

I'm attempting to repair a USB drive that I would like to use for booting Linux on my laptop. The drive was removed from the laptop while it was formatting and is unreadable now. However, if I open ...
defarm's user avatar
  • 1
2 votes
2 answers
847 views

Block a specific program from accessing a device

Because of a long not-fixed bug in Steam with Linux, I want to block a specific program (Steam) from having any access whatsoever to a specific device (Sony DualShock 4 controller). I tried setting ...
Jimi-James's user avatar
0 votes
1 answer
888 views

How to add manually a device that udev adds then removes after plugged into USB port?

I'm trying to mount my cheap smart watch with a MTK6260A chipset to my PC in order to read the firmware contents. However while dmesg shows me that the device has been detected and created correctly: ...
Gabriel Diego's user avatar
0 votes
1 answer
139 views

Trigger file copy upon device insertion (without depending on systemd)

I would like to automatically have some files form a storage device copied upon its insertion. I am looking to use one and the same method on both systems which use systemd and systems using init ...
TheChymera's user avatar
1 vote
1 answer
641 views

Can I mount /dev/usb/hiddevX as storage type?

I got an external HDD from a tv service provider which their receiver can access via eSATA + USB (y cable). When plugging the device into my computer, I get: This is dmesg: [290079.510263] usb 1-1.4:...
Benjamin Marwell's user avatar
2 votes
0 answers
366 views

`hcitool con` does not find any devices when run in the context of a udev script

I'm trying to automate a task to configure a bluetooth device when it's connected to my raspberry pi 3 running raspbian. Assuming $x is the address of the device, I need to execute the following ...
stevesdj's user avatar
1 vote
1 answer
683 views

Extra created /dev/ttyUSB blocks usage of custom udev config-ed dev-file

I am a scuba diver and proud owner of 2 diving computers. These two can be connected to a USB port and with Linus' SubSurface divinglog program I can import dive-logs from them. One is an Atomic ...
Pjotr133's user avatar
2 votes
0 answers
4k views

How can I change the Wireless Adapter Interface Name in Ubuntu?

I've booted with the net.ifnames=0 in GRUB_CMDLINE_LINUX_DEFAULT so It does fix the name of the internal adapter wlp2s0 >> wlan0 But I can't find a solution to my external adapter which is ...
Beyondo's user avatar
  • 121
1 vote
1 answer
63 views

Custom network devices naming scheme

I have an ubuntu image to be used on virtual machines. I don't know in advance how many NICs would be used for the machines. I need all network interfaces to get names from a predefined list. For ...
Askhat Nuriddinov's user avatar
3 votes
3 answers
915 views

udev rule to lock session on removal of hid key

I am trying to lock the session on removal of my hid device which is HyperFIDO U2F key. However after trying for many times I got no success. I tried to create a udev rule on /etc/udev/rules.d/50-...
dkbhadeshiya's user avatar
1 vote
1 answer
1k views

udev add hidraw and immediately remove

I have problems in using self-made hid device on my Ubuntu 17.10. It works fine on Windows and works fine on another machine with Kubuntu 18.04. I already removed all my udev rules, restarted udev, ...
johngull's user avatar
  • 111
1 vote
0 answers
267 views

Adding UDEV rules makes Raspberry boot too slow

I have an issue when I add this rule in my /etc/udev/rules.d/99-com.rules: ACTION=="add",SUBSYSTEMS=="usb",ATTRS{serial}="XXXXXXX",RUN+=/usr/local/bin/startApache.sh" The rule works correctly (the ...
Eric_Predict's user avatar
1 vote
2 answers
2k views

Logitech M535 in Linux

I just bought a Logitech M535 Bluetooth mouse. It has tilting wheel but it's mapped to "back" and "forward" buttons. To get it work as horizontal scrolling I wrote this script: #! /bin/dash MOUSE_ID=...
neclepsio's user avatar
  • 182
2 votes
0 answers
956 views

use udev to reload bluetooth service when dongle is plugged in

I have tried to create a file /etc/udev/rules.d/97-bluetooth-input.rules with in it: KERNEL=="event*", SUBSYSTEM=="bluetooth", DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7.1/1-7.1.3/1-7.1....
Aethalides's user avatar
0 votes
0 answers
946 views

Disable udev for particular module

Is it possible to create udev rule that will disable udev for a particular module? I do not want to stop udev daemon entirely, just to disable it for a specific driver. I have a driver that panics ...
ibiza's user avatar
  • 1
0 votes
1 answer
1k views

Debian 9 udev keyboard rule not working

Every time I lock my screen / remove my keyboard and re-plug it in (usb) the keyboard repeat rate resets. I am trying to fix this by creating a udev rule. I have created a rule in /etc/udev/rules.d ...
user3728501's user avatar
  • 2,684
5 votes
3 answers
13k views

Writing to a file from a udev RUN command

I am working on creating a udev ruleset that writes to a log file each time a certain USB drive is inserted. My ruleset, stored in /etc/udev/rules.d /99-log-USB-drive.rules, currently contains the ...
fuumind's user avatar
  • 423
0 votes
1 answer
122 views

Udev won't execute some lines in my script

I'm working on a Beaglebone Black under debian. I'm writing Udev rules to manage µSD card. What i need Udev to do: when my µSD is plugged in, Mount the µSD on /media/sdcard (it does) and execute the ...
Jelek21's user avatar
20 votes
2 answers
14k views

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 ...
ccpizza's user avatar
  • 7,763
0 votes
1 answer
2k views

bluetoothctl “Waiting to connect to bluetoothd…” in udev rule script

I have the following udev rule: ACTION=="add", SUBSYSTEM=="bluetooth", RUN+="/usr/local/bin/a2dp-fix-wrapper" that fires off the following script: PID=$(pgrep pulseaudio) USER=$(grep -z USER= /proc/...
aiguofer's user avatar
  • 271
1 vote
1 answer
2k views

udev rules for device mapper when lvm volumes are activated

I currently have a couple of custom udev rules for activating LVM volumes when raid volumes become available that look like this: KERNEL=="md0", RUN+="/sbin/pvscan --cache -aay" KERNEL=="md1", RUN+="/...
nwaltham's user avatar
  • 882
3 votes
1 answer
3k views

avrdude: /dev/ttyACM0 issue with changing permissions

I was using Arduino IDE on my Arch Linux laptop without problems, after some time /months I'm not able to upload the sketch because of permissions: avrdude: ser_open(): can't open device "/dev/...
dmnc's user avatar
  • 538
1 vote
1 answer
635 views

Debian: udevadm info does not return ID_FS_TYPE for DVD-media

On Debian Jessie (openmediavault) the following command: udevadm info -q env -n /dev/sr0 Does not return ID_FS_TYPE for a movie-dvd. The packages libdvdcss2 and libdvdread4 are installed. Update: ...
TylerDurden's user avatar
1 vote
1 answer
2k views

How to create udev rule in Ubuntu for chrome app USB access?

I'm trying to access a USB device through a chrome app, but it's not working. Then I noticed I need to set a udev rule, but the docs are confusing. I'm supposed to make a file called /etc/udev/rules....
wordsforthewise's user avatar
0 votes
0 answers
88 views

Virtual machine ethernet failure on restore

I am using OpenSUSE Leap 42.2 on a Dell Inspiron 1545. When I tried to resume a virtual machine, it showed "Error restoring domain:Cannot get interface MAC on 'eth0': No such device." That's because ...
Jonathan Dahlin's user avatar
10 votes
3 answers
43k views

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 ...
nelaaro's user avatar
  • 13.5k