Questions tagged [udev]

The tag has no usage guidance.

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

Is there a way to know which USB device file (/dev/ttyUSB0) is related to a particular interface (wwan0)

The title pretty much says it all, but here is my scenario in case it's relevant: I'm trying to automate bringing a USB modem online when it's first plugged in. With my hardware and cellular service, ...
0
votes
0answers
81 views

Using Udev to restart service

I wand to use my 3Dconnexion SpaceNavigator with FreeCAD, to do so I followed instructions here : https://wiki.freecadweb.org/3Dconnexion_input_devices It works well, but I need to restart spacenavd ...
0
votes
1answer
96 views

How to automatically enable wifi 4addr (WDS) mode before connecting to specific SSID or network?

I have a laptop on which I have setup a bridge interface between the Ethernet and WiFi devices in order to connect non-WiFi devices to the network before they go into their final, wired, position. I ...
0
votes
0answers
6 views

How do I list systemd's /sys/subsystem/net hierarchy?

When using systemd, you sometimes have to list things like /sys/subsystem/net/... (for instance in /lib/udev/rules.d/99-systemd.rules), or sometimes expressed as sys-subsystem-net-devices-...
0
votes
1answer
26 views

udev rules to run pactl

Trying to check if an a2dp profile exists each time a bluetooth device connects/disconnects. I created two udev rules: # ACTION=="add", SUBSYSTEM=="bluetooth", RUN+="/bin/sh -...
1
vote
1answer
97 views

Changing keyboard layout when keyboard is plugged with udev

I want the activate a keyboard layout and to enable "sticky" modifier keys when my external keyboard is plugged in. I've made this udev rule: /etc/udev/rules.d/keyboard.rules ACTION=="...
0
votes
0answers
10 views

How to write udev by-id rule

I use something that creates evdev devices and get a warning from udev about my rules. The rules are: SUBSYSTEM=="input", KERNEL=="event*", ATTRS{../name}=="evmux-*", ...
0
votes
0answers
212 views

Windows equivalent to udev rules

(don't know if this question suits to this site, so sorry if not) There is a possibility to create a link to USB device according to its inner parameters using udev rules. Is there some equivalent to ...
0
votes
0answers
10 views

can I create UDEV rule to keep track of events for non /dev/<device>?

Need to call a script whenever edac error is thrown up by kernel/system. I created following UDEV rule for this purpose, if the ce_count changes then I would like to execute /var/tmp/test.sh, then I ...
1
vote
1answer
504 views

systemd does not assign a seat to my session when using NIS authentication

The title says almost all. When I am a local user (let's say the normal situation) my session gets a seat assigned. jlinkels@donald-pc:~$ loginctl SESSION UID USER SEAT TTY 3 1000 ...
2
votes
0answers
37 views

Error Running udev trigger for USB Insertion

So I'm struggling to get a udev rule to work when I plug in my USB. I've read a lot of posts about how to do this with udev, but I'm coming across an error that I can't find much help on. When I plug ...
0
votes
0answers
20 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/...
0
votes
0answers
21 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
26 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
34 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
367 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
124 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 ...
3
votes
0answers
74 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
146 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
326 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
2answers
298 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
62 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
306 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
160 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
155 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
61 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
44 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
284 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
202 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
60 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
60 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
28 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
86 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
173 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
2k 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
354 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
270 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
425 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
1k 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
105 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
229 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
170 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
412 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
2answers
313 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
163 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
334 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
96 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
877 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
356 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 ...

1
2 3 4 5