Questions tagged [udev]
The udev tag has no usage guidance.
246
questions
0
votes
2
answers
2k
views
Getting udev to recognize unique usb drives from a set - with the same uuid and labels? RHEL7
I'm trying to configure udev on RHEL7 so usb flash drives are assigned specific /dev names (ie. /dev/backup1 , /dev/backup2....) for specific flash drives - I realize I can't control the /dev/sdx ...
1
vote
2
answers
506
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 (...
0
votes
1
answer
197
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:...
0
votes
0
answers
207
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"...
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=...
3
votes
0
answers
561
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.
...
2
votes
1
answer
287
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 ...
2
votes
0
answers
162
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/...
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
...
2
votes
1
answer
359
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:
[...
1
vote
0
answers
539
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{...
0
votes
1
answer
67
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 ...
0
votes
1
answer
11k
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 ...
0
votes
0
answers
658
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"...
1
vote
0
answers
947
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/...
1
vote
1
answer
859
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/...
4
votes
2
answers
6k
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=="...
3
votes
1
answer
994
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 ...
1
vote
0
answers
761
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 ...
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 ...
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
/...
0
votes
2
answers
655
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 ...
1
vote
0
answers
483
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 ...
0
votes
1
answer
598
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 ...
0
votes
1
answer
276
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 ...
-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 ...
2
votes
2
answers
876
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 ...
0
votes
1
answer
903
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:
...
0
votes
1
answer
146
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 ...
1
vote
1
answer
655
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:...
2
votes
0
answers
368
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 ...
1
vote
1
answer
696
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 ...
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 ...
1
vote
1
answer
65
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 ...
2
votes
3
answers
928
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-...
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, ...
1
vote
0
answers
270
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 ...
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=...
2
votes
0
answers
960
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....
0
votes
0
answers
961
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 ...
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 ...
6
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 ...
0
votes
1
answer
123
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 ...
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 ...
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/...
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+="/...
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/...
1
vote
1
answer
643
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:
...
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....
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 ...