Questions tagged [udev]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
5 views

How can I add new udev rules for a ftdi-sio device?

I am trying to add the following file to /etc/udev/rules.d: ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="FAC6", RUN+="/sbin/modprobe ftdi_sio" RUN+="/bin/sh -c 'echo 0403 FAC6 > /sys/...
-3
votes
1answer
19 views

How do I know if device is mounted in udev rule?

I'm trying to avoid to mount devices that previously are mounted with fstab. This is what happens now: This is what happens now: /dev/sda1 on /boot /dev/sda2 on / /dev/sda3 on /home /dev/sda2 on /...
0
votes
0answers
18 views

Udev rule Syslink not working

Before I begin, I know there are a million questions like mine and I just want to say, that I went through A LOT of them. None helped me solve my problem. I have created a new rule called 999-android....
0
votes
0answers
25 views

Linux (Debian Buster): How to disable keyboard for an application/window?

I'm searching a way to disable the keyboard for a window or application. I have some conflicts between windows and i'm trying to permanently disable the keyboard for one of them. Do you have a ...
0
votes
0answers
19 views

Reversing a TCP port with ADB in a udev rule

I'm trying to do a adb reverse tcp:8080 tcp:22 when my android device is plugged in. To do that I've created the following rule in /etc/udev/rules.d/85-adbReverse.rules: SUBSYSTEM=="usb", ACTION=="...
0
votes
1answer
67 views

Arch udev rule not triggering

I am trying to trigger xsecurelock upon removal of a yubikey. This is done as follows: file: 90-yubikey.rules: ACTION="remove", SUBSYSTEM="usb", ATTRS{idVendor}=="1050", RUN+="/bin/xsecurelock" I ...
1
vote
1answer
67 views

Stopping dhclient on non-existent eth0 interface

My Ubuntu 18.04.3 system takes an extra 90 seconds to boot because it is trying to run dhclient on a non-existent interface "eth0". At the same time, DHCP has already run and succeeded within 1 second ...
0
votes
0answers
27 views

Healthy external usb HDD 'does not exist' in Linux when connected over Thunderbolt 3

I have external USB HDD disk 'Western Digital My Passport'. It has MBR table mapped like this: 300 GB APFS 300 GB NTFS 300 GB APFS On macOS, all partitions work as expected. On WIndows, NTFS ...
1
vote
0answers
43 views

How to wait for Thunderbolt device discovery before invoking cryptsetup during startup?

I am using a Linux sytem running Kernel 5.4.12 and systemd 234 on a notebook, which is connected via Thunderbolt 3 to a docking station providing an external keyboard, mouse and monitor. The root ...
0
votes
1answer
60 views

Is it possible to cover only UDEV events with udev rules?

When I look at the output of udevadm monitor for an USB device, there are KERNEL and UDEV events. Can I only address the UDEV events with a udev rule? $ udevadm monitor | grep "mouse" KERNEL[122....
1
vote
1answer
117 views

USB Device no longer creates /dev entry

I have a Debian Linux box with a Z-Wave USB stick from Sigma Designs. This has previously been working for just over a year but after a reboot the device is no longer listed in /dev. lsusb and dmesg ...
0
votes
1answer
96 views

How do I disable Linux media polling?

I have a USB floppy drive (for reasons, don't ask). When it's plugged into a modern PC with Debian and udev, something is pinging the drive every couple of seconds --- I believe it's looking to see if ...
0
votes
0answers
56 views

Are these UDEV rules a security threat?

I am new to Linux and bought an OnlyKey device. To make the desktop app work, I have to install the UDEV rules below. Can someone explain what these UDEV rules are doing, or are they a threat to ...
1
vote
1answer
195 views

udev rule for hibernate on low battery not working

I've been trying to setup an udev rule for hibernating my laptop on low battery. Following the guide available in the arch wiki I ended up with the following rule to test if it is working ok: $ cat /...
0
votes
2answers
74 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
2answers
118 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
1answer
46 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
0answers
34 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
3answers
202 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
0answers
128 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. ...
1
vote
1answer
51 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 ...
1
vote
0answers
59 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
0answers
27 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 ...
0
votes
1answer
53 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: [...
0
votes
0answers
152 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
1answer
35 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
1answer
1k 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
0answers
318 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
0answers
141 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
1answer
345 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/...
1
vote
1answer
750 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
1answer
84 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 ...
0
votes
1answer
210 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
0answers
89 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
0answers
305 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
1answer
224 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
0answers
112 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
1answer
294 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
1answer
79 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
1answer
632 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 ...
1
vote
1answer
273 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
1answer
242 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
1answer
71 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 ...
0
votes
1answer
220 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
0answers
205 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 ...
0
votes
1answer
360 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
0answers
2k 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
1answer
53 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 ...
1
vote
2answers
292 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-...
0
votes
1answer
717 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
2 3 4 5