Questions tagged [udev]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
22 views

How to create a `/dev/ttyACMx` for a given device

I work with two prototyping board from cypress: CY8CKIT-043 and CY8CKIT-049. When I plug the first into a usb port, a /dev/ttyACM0 is created and I can communicate with the device. For the second, ...
  • 2,659
0 votes
0 answers
16 views

Virtualbox udev rules SUBSYSTEM=="usb_device" vs SUBSYSTEM=="usb", with parameters

In the VirtualBox manual (https://www.virtualbox.org/manual/UserManual.html), there is this fairly generic sentence: «[...] /etc/udev/rules.d/60-vboxdrv.rules, a description file for udev, if that is ...
2 votes
0 answers
25 views

How do I RUN systemctl with udev rules?

I am attempting to start a service with systemctl using a udev rule. SUBSYSTEM=="tty", ATTRS{manufacturer}=="Belkin USB PDA Adapter", ATTRS{serial}=="778452", RUN+="/...
0 votes
2 answers
66 views

How/Where does udev give permission to X11 input drivers to open /dev/input/event* files without also giving access to the logged-in user?

This is the permission of my /dev/input/event* files: crw-rw---- 1 root input 13, 64 Mar 21 09:02 /dev/input/event0 crw-rw---- 1 root input 13, 65 Mar 21 09:02 /dev/input/event1 crw-rw---- 1 root ...
0 votes
1 answer
38 views

How to write udev rule to make /dev/sdX readonly?

I am very often dealing with formatting usb drives, that are registered as /dev/sdX. Accidentally, I may mistype the command, and format my harddrive. I think ideally I would want to write I think an ...
  • 784
1 vote
1 answer
37 views

Why does this udev rule cause cryptsetup to freeze?

I have this rule which runs a script to send me an email whenever a drive drops out of the system: SUBSYSTEM=="block", ACTION=="remove", ENV{DEVTYPE}=="disk",\ RUN=&...
0 votes
1 answer
59 views

Disable PCI sound card with udev

GP104 High Definition Audio Controller which seems to be internal sound card in NVidia GeForce GTX 1070 which uses HDMI. It keeps popping up in various applications and sometimes messing with audio ...
  • 1,294
3 votes
1 answer
52 views

test evdev-joystick calibration

I want to calibrate a joystick (custom hardware) with no buttons and only one axis (Z). I used evtest to read the movement range i.e. min/max values and the centre (the point where the joystick rests),...
  • 41
0 votes
0 answers
24 views

Function like latency timer for cdc_acm

I have an application where a /dev/ttyACMx needs to report to the computer consistently and often (10 bytes at 200 Hz). For my application it is very important that this is delayed minimally (ideally &...
1 vote
0 answers
62 views

Trying to mount USB-drive automatically through udev; script complains that it's not superuser [duplicate]

I am trying to mount my USB-drive automatically on Linux.  I have this script: #!/usr/bin/bash mount /dev/safety1 /mnt/hd 2> /home/harald/errors/e rsync -az /mnt/hd/ /home/harald/backups/ &&...
0 votes
1 answer
70 views

How to make Linux system recognizes /dev/sda1 as /dev/sdb1

I am not asking about mounting. I boot Linux OS from a USB flash drive (/dev/sda) in a PC that doesn't have other disks. The /dev/sda includes linux OS and many partitions. /dev/sda1: storage ...
  • 1
0 votes
0 answers
56 views

Udev rule with very little differences

I have a device which connects through two different kernels when plugged in (e.g. /dev/ttyUSB0 and /dev/ttyUSB1. I'll dub one the config port and the other the data port, config always gets assigned ...
0 votes
1 answer
61 views

failure to remap file to open file descriptor (no such file or directory)

I'm experiencing new "glitch". When I try to run scripts via keyboard shortcut in Cinnamon (Linux Mint 21) there is a window with error: scriptname failure to remap file to open file ...
0 votes
0 answers
49 views

I am stuck attempting to set a udev hwdb to remap KEY_PRESENTATION to something compatible with xmodmap

So I have an Acer Nitro laptop that I installed debian bookworm on running cinnamon DE. This laptop has a special "Nitro Sense" key by the numpad. When you push this key in windows, acer's ...
0 votes
0 answers
39 views

Is there a way to modify the VENDOR and MODEL fields of removable storage units you can list with the following LINUX lsblk command?

Command: lsblk -l -e7 -o RM,TYPE,PATH,NAME,VENDOR,MODEL |\ awk '{ if ( ($1 == 1) && ($2 == "disk") ) {print $2,$3,$4,$5,$6} }' Context/limitations regarding my question: The LABEL ...
0 votes
0 answers
6 views

Lost PPP Connection between Debian <-> PDA / HandHeld using SynCE

I am currently able to connect a handheld to the PC running Linux with a very old Ubuntu 14.04, adding repository PPA for SynCE to source list. Now, the goal is to update the operating system, I chose ...
  • 11
0 votes
0 answers
31 views

Howto prevent UDEV wrongly enqueues remove event for device ppp?

Connecting a PDA device with Debian Buster using SynCE, USB serial device is recognized and connects with ttyUSB bus, obtains an IP address and disconnects after a few seconds (two, max three). This ...
  • 11
0 votes
0 answers
22 views

udev: ID_MODEL is missing at the remove event

When the phone is connected to the computer, udev determines variables by the "add" event. But for some reason, when the "remove" event occurs, there are no variables such as ...
0 votes
0 answers
16 views

Whitelisting USB devices with udev SLES 12.5

I have placed a file called 01-usb.rules in the /etc/udev/rules.d directory. The contents of the files are as follows: # Enable only known devices # skip non USB devices SUBSYSTEM!="usb", ...
  • 1
3 votes
2 answers
158 views

Does the location of package-installed udev rules differ across Linux distributions?

Alongside an RPM package, I have been preparing a DEB package for some software which requires the installation of some udev rules. My RPM package installs the rules in /usr/lib/udev/rules.d. My ...
  • 131
0 votes
0 answers
24 views

Is udev event to blame for mouse hanging?

Lately I have been noticing that my mouse (Logitech G Pro Wireless) freezes for a brief amount of time at random. I am only ever using Firefox, Alacritty and GIMP. My xorg.conf is auto generated by ...
  • 1
2 votes
0 answers
50 views

Xorg.conf options not staying

I am trying to enable tap to click by default on my trackpad. The device name is "bcm5974". xinput --set-prop "bcm5974" "libinput Tapping Enabled" "1" works a ...
1 vote
1 answer
51 views

udev hammering CPU with bluetooth plugging events

I just installed Lakka on an ASRock 1135G7 and udevd is hammering one core with constant logs of an usb device being reconnected. WiFi works but bluetooth is listed as the culprit in the logs. lspci ...
1 vote
1 answer
142 views

How to run udev rule before a certain module loads?

I am trying to get the nvidia GPU driver working on a Macbook Pro (running Arch Linux). According to the instructions here, some PCI registers need to be set before the nvidia module gets loaded, ...
  • 2,208
0 votes
0 answers
27 views

Customizing PCAN Channel Names on Ubuntu

I have a testing system Ubuntu 22.04.1 LTS that uses more than one pcan device, each pcan device is connected to one testing unit. to connect to the pcan devices I use python python-can module. my ...
1 vote
0 answers
77 views

Webcam's power line frequency setting does not take effect if a new application that uses it is open

I am living in Europe and I have bought a Logitech C920 webcam whose power line frequency setting should be changed to 50Hz in order to avoid flickering. I did it using the following instruction: /usr/...
0 votes
0 answers
65 views

udev rules for camera device inconsistently applied

I have a udev rule that is applied inconsistently, meaning sometimes it works and other times the system's default rules override it. This typically happens when the usb device is reloaded. # /etc/...
0 votes
0 answers
29 views

Automount as another user (not logged)

When I plug a USB Key on my desktop install of a redhat fork, USB is automounted as /run/media//. I would like that plugged removable device will be automounted for another logged user (not the ...
  • 1
1 vote
0 answers
158 views

How to name a device in the device tree?

I have used a device tree overlay file (dtbo) to add a hardware reference over the i2c-2 node to my device tree. This device is an accelerometer that implements an existing driver that can be found ...
0 votes
0 answers
76 views

udev not remapping Elecom mouse button

After numerous attempts I'm stumped trying to remap buttons on my new Elecom Hard trackball. I'm following the instructions for remapping with udev hwdb: https://yulistic.gitlab.io/2017/12/linux-...
  • 101
0 votes
0 answers
47 views

Multiple USB Modems - Binding cdc-wdmx to symlink

First question here, long story short I have 3 different USB Cellular(GSM) modems and I want to ensure the connection profiles for each SIM (as the APNs differ) always go to the same modem/sim combo. ...
1 vote
1 answer
65 views

Consistent / persistent network connection naming, like udev

I have multiple similar USB network devices, in this case CAN (can0 and can1) connections to different networks but I figure it is a similar problem with multiple other networks (eg WiFi, Ethernet etc)...
  • 13
1 vote
0 answers
123 views

How does the /dev/input folder get updated

I understand that evdev is used to get raw data from input devices such as keyboards and provide it to user space via files inside /dev/input/ for example /dev/input/event0 . Let's take a non-...
  • 1,071
1 vote
0 answers
170 views

udev rules don't apply to usbtmc

I have read lot of research about this and I am still struggling to configure a usbtmc device using udev rules. I am running my test on Raspberry Pi OS 5.15. My udev rules /etc/udev/rules.d/99-usbtmc....
0 votes
0 answers
149 views

How can I order /dev/sdX block devices names by hardware path on Linux?

I know about persistent block device naming, using /dev/disk/by-{id,path,uuid,...} and how it is best practice to use those persistent names in system config (fstab, scripts) instead of /dev/sda for ...
  • 18.8k
0 votes
0 answers
28 views

udev `power_supply` rule unexpectedly triggering with power supply plugged in

I have the following udev rule, but it appears to be randomly triggering even though the power supply remains connected. ACTION=="change", \ SUBSYSTEM=="power_supply", \ ENV{...
0 votes
0 answers
158 views

udev rule to attach bluetooth headset to seat

I have a multiseat setup using loginctl and I'm having issues with a bluetooth headset. The USB bluetooth dongle in on seat0 but my display number :N changes randomly on restarts and my headset ...
  • 524
0 votes
1 answer
151 views

USB devices connecting then disconnecting permanently on intermittent boots for Ubuntu 16.04 Raspberry pi

Every so often (about 25% of the time) when I boot up my pi, the USB devices will not work. Looking at dmesg output below. It appears my devices connect, then disconnect a second or two later, and ...
0 votes
1 answer
228 views

systemd does not rename the interface of my USB wifi adapter after replug

I have a WiFi adapter ASUS USB-AC53 Nano with rtl88x2bu driver compiled by myself. When I boot my computer, because of the feature predictable interface names by systemd, I always get an interface ...
0 votes
2 answers
204 views

Can device numbers change after reboot?

I'm building a service that checks for file uniqueness on block devices. File uniqueness on a system appears that it can be guaranteed through the pair (st_dev, st_ino), where st_dev is the device ...
  • 111
1 vote
0 answers
35 views

device naming mismatch

I had some mess in restoring my system from a cloned image, but finally succeeded. But booting up and launching GParted (or blkid, etc.) I get that the device naming has slightly changed from before :...
  • 111
1 vote
0 answers
34 views

Prevent HDD to power up

OS installed on SSD. Some rarely accessed files are on HDD. How do I prevent HDD to power on (spin up) and then to mount it manually as needed? Tried udev rule SUBSYSTEM=="sda", ENV{...
  • 21
0 votes
0 answers
145 views

How to run udev rules for pulseaudio

I am trying to write a udev rule to change my output device on plug-in. The script is also executed, which I also tested. /etc/udev/rules.d/51_SADES_Spellond_Pro.rules: ACTION=="add", ...
  • 1
1 vote
0 answers
95 views

Run backup script after systemd automounts specific USB device

I need to run a script after a specific USB stick is mounted, particulary, to perform a backup. I've seen many (and old) posts that mount devices inside udev rules, however modern OSes already have ...
0 votes
1 answer
75 views

udev rule not working on Arch to disable touchpad when USB mouse connected

I'm trying to write a udev rule to disable (and re-enable) my trackpad when a USB mouse is connected. Currently, my rule looks like: ACTION=="add", ATTRS{bInterfaceProtocol}=="02", ...
  • 113
1 vote
0 answers
115 views

Udevrule doesn't work as expected, and I don't understand why

I'm trying to use udev to invoke a script every time a bluetooth device is connected. Here is what I've done so far. I created a bluetooth.rules file in /etc/udev/rules.d. bluetooth.rules itself ...
  • 111
1 vote
1 answer
153 views

LVM2 Integrity feature breaks LV activation?

I've been trying to enable the integrity feature on my new LVM2 volumes. I use a command like this to create the lv: sudo lvcreate --type raid1 --mirrors 1 --size 20g --raidintegrity y --name RAID ...
  • 113
1 vote
0 answers
93 views

udev - nr_requests on block device not applying on boot but all other rules run correctly

My Rules KERNEL=="sd*",ACTION=="add|change",ATTRS{model}=="PERC_H755N_Front",\ ATTR{queue/nomerges}="2",\ ATTR{queue/nr_requests}="...
0 votes
1 answer
70 views

Why does udev automatically whitelist my RAID card and what is the function of this whitelisting?

I've been learning to use udev and noticed that when I run udevadm test --action="add" /sys/block/sdc I see the following: GROUP 6 /usr/lib/udev/rules.d/50-udev-default.rules:59 IMPORT '...
0 votes
1 answer
107 views

How to set e2label on a partition, with udev?

I want to automatically assign a label to a partition when a disk is inserted. My approach to the task is creating a new udev rule which looks something like: KERNEL=="sd[a-z][0-9]", KERNELS=...

1
2 3 4 5
21