2022 Developer Survey is open! Take survey.

Questions tagged [udev]

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

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

How to disable PCIe device at boot?

I'm trying to debug an issue with resuming from suspend with an NVIDIA graphics card. This thread leads me to believe it's an issue with the audio device from the card's HDMI out. I want to disable ...
user avatar
0 votes
1 answer
75 views

Udev, libpam-systemd, systemd-sysv and systemd dependencies errors causes apt to be unusable

After mistakenly downloading pop-desktop again, udev and systemd have dependency errors that make me unable to use apt. When I run sudo apt upgrade, this error shows up: user@computer:~$ sudo apt ...
user avatar
0 votes
0 answers
10 views

Linux : Force keyboard interface at boot time

I own a Razer Cynosa Chroma. At boot time, coherent with what lsusb -v would tell, linux-5.4.x enumerates 2 USB HID keyboard interfaces. A/ on usb-0000:00:1d.2-2/input0 B/ on usb-0000:00:1d.2-2/input1 ...
user avatar
  • 2,151
0 votes
1 answer
21 views

Why my udev rule does not work in my Fedora PC?

I would like to call a script and back up my files when my external hdd is inserted but it does not work. First I entered in terminal the command udevadm info -a -n /dev/sdb looking at parent device '/...
user avatar
  • 11
0 votes
1 answer
15 views

udev rule applies, but doesn't set the group

I have a STM32-Bluepill board where I flashed an USB Bootloader. If I attach it to my computer, it is mounted at /dev/ttyACM0. lsusb shows it as Bus 001 Device 006: ID 1eaf:0004 Leaflabs Maple serial ...
user avatar
0 votes
1 answer
65 views

Udev rules, need to obtain path like /dev/sda

I try to get the path of the last connected disk via an environment variable, i.e. a path like /dev/sd*. The problem is that DEVNAME or DEVPATH does not provide the desired path. The goal is to make ...
user avatar
1 vote
0 answers
17 views

udev rules only running on first plug-in but not re-plug?

I'm not sure why udev rules only trigger on first plug-in of a USB3 NVME enclosure but not any follow-up plugins. If i run udevadm trigger then the rules run again as expected. The goal of the rules ...
user avatar
  • 121
0 votes
1 answer
33 views

ACPI trigger wakeup on low battery while suspended, in order to hibernate

I want to hibernate on low battery: SUBSYSTEM=="power_supply", \ ATTR{status}=="Discharging", \ ATTR{capacity}=="[0-5]", \ RUN+="/usr/bin/systemctl ...
user avatar
  • 1,588
-1 votes
2 answers
25 views

Detecting usb devicy type using udev

I'm writing a program using libudev to detect USB device connection on system. I want to know what is the type of each device connected. I think the udev doesn't clearly says what is the type of the ...
user avatar
  • 1
0 votes
1 answer
18 views

Debug right to write in USB file (link with udev?)

When I try to run the driver created by Veikk for its graphical tablet in sudo mode, the tablet is recognized, however if I run it as a normal user the tablet is not recognized anymore. However, I do ...
user avatar
  • 2,138
0 votes
0 answers
14 views

Udev rule is not working with pactl on xfce4

I have soundbar which due to some issues often is unplugging. When it is back, I wish my default pulseaudio device would be changed back to soundbar. I have created file /usr/local/bin/audio_toggle.sh ...
user avatar
35 votes
1 answer
4k views

What happens when Linux goes out of letters for drives?

Let’s say I have 50 USB flash drives. I assume they get to be /dev/sda to /dev/sdz. What comes after /dev/sdz?
user avatar
  • 517
0 votes
0 answers
17 views

Changing ownership of "remove" device file using udev rules for specific product

I want to change the ownership of the /sys/bus/usb/devices/1-2.1/remove file using udev rule. I know the VID, PID of the usb device. When the device is connected the ownership of /sys/bus/usb/devices/...
user avatar
3 votes
0 answers
30 views

Not wait for select drives on boot?

For systemd-analyze && systemd-analyze blame | head && systemd-analyze critical-chain && echo When USB drive is attached: Startup finished in 1.818s (kernel) + 50.866s (...
user avatar
  • 5,345
0 votes
1 answer
66 views

Remap USB device default productId from udev rule

I have a device which is being assigned the productId of 1713 by modalias: $ lsusb -s 001:008 Bus 001 Device 008: ID 1e71:1713 NZXT NZXT USB Device $ lsusb -t | grep "Dev 8" |__ Port 12:...
user avatar
  • 261
1 vote
0 answers
16 views

Can I use udev to control which kernel module is loaded for a device

I have 2 devices (TM-S1000 cheque scanner, TM-70/TM-70II receipt printers) that I need to support. Unfortunately both of these devices have the same vendor and product ids: 04b8:0202 and the same ...
user avatar
0 votes
0 answers
43 views

udev rules work but script failed

I'm trying to detect new HDMI and new USB when they are plugged and notify my Rust program. Here's my rules: $ /etc/udev/rules.d/80-device-detect.rules KERNEL=="card0-HDMI-A-1", SUBSYSTEM==&...
user avatar
0 votes
0 answers
28 views

Trigger a shell script at the appearance of a UUID

I have an external backup disk with a specific UUID. I have a shell script that launches a sequence of commands that result in a backup being written to that disk. I also have automated backups that ...
user avatar
0 votes
1 answer
16 views

Migrating NIC names in Debian 9

Before upgrading a server from Debian 9 to 10 I am trying to migrate, as recommended, the interface names from old naming (eth0, eth1) to new, that would be enp1s0, enp2s0. All the guides I found tell ...
user avatar
2 votes
1 answer
35 views

Is it possible to set up a new device with an existing driver on linux when the modalias doesn't match?

I have a USB device that I am using with Ubuntu 20.04.3. The manufacturer provided a library and a driver. I can install the driver and get the device to work, but every time the kernel updates I must ...
user avatar
0 votes
2 answers
100 views

Udev rule runs, script fails

I am trying to use udev to detect a USB attach event then run a script. There are many examples of this but I can not seem to get it to work. My script is /usr/bin/ is very plain usbattached.sh !/bin/...
user avatar
0 votes
0 answers
47 views

does linux udev disconnect and reconnect usb devices on boot?

I have slackware64-14.2 with kernel 5.15.25 and usb driver (xhci) built in kernel. On boot process disconnect and reconnec my usb devices with this command: udevadm trigger --type=devices --action add ...
user avatar
  • 11
0 votes
0 answers
63 views

root filesystem on usb drive

I am trying to move my linux partition (ext4) to usb drive and boot from this drive and not my hdd. I have slackware64-14.2 with kernel 5.15.25 and usb driver (xhci) built in kernel. I have made the ...
user avatar
  • 11
0 votes
1 answer
370 views

How to update/refresh changed partlabels as reported by lsblk?

On Linux, the command lsblk -o partlabel will display the partlabel for block devices. I have used gdisk to change a partlabel. After the change, lsblk is still reporting the old value of the ...
user avatar
  • 1,226
1 vote
2 answers
44 views

udev without LAN access?

I am running a RPi 4b with Raspbian (Bullseye), Logitech Media Server (LMS) 8.2.0 and Squeezelite 1.9.9. For automated startup of the Squeezelite process whenever a certain USB device is connected, I ...
user avatar
0 votes
1 answer
109 views

Udev rule refuses to trigger when harddrive is added

I'm on Ubuntu 20.04. I'm trying to execute an action when a specific harddrive is connected using an udev rule identifying the drive using UUID. The script will eventually do a routine where it will ...
user avatar
  • 1
0 votes
0 answers
46 views

Auto play audio CD on insert (external drive) and then cast

UPDATE BELOW I've had a look and not seen similar posts (apologies if I've missed one). I had originally posted this on unix.stackexchange.com but not received any replies. I'm aiming to use an ...
user avatar
0 votes
0 answers
34 views

How to execute a shell-script automatically when I plug in a external hard disk? [duplicate]

I want to automatically run a script when I plug in my external hard disk. I've used udev ACTION="add", KERNEL =="sdc*" , ATTRS{idVendor}=="0480" , ATTRS{idProduct}==&...
user avatar
0 votes
0 answers
45 views

Debian name wifi interfaces according to their drivers using udev persistent-net.rules?

Hi I am working on Debian. Would like to name my wifi interfaces according to their driver modifying /etc/udev/rules.d/90-persistent-net.rules with: SUBSYSTEM=="net", ACTION=="add&...
user avatar
1 vote
0 answers
53 views

if a script is triggerd by a udev-rule, why does systemctl commands inside need to be invoked with sudo?

First: The default User the system is working with, is root. this is needed by other processes and functionality currently not better implemented. OS: Fedora 35 I have a udev rule which fires a script ...
user avatar
  • 111
0 votes
0 answers
35 views

UDEV rules running too many times

I'm trying to run a small setup sript whenever my graphics tablet is connected. So I created this file at /etc/udev/rules.d/00-usb-huion.rules ACTION=="add", ATTRS{idVendor}=="256c"...
user avatar
0 votes
1 answer
19 views

How can I translate --machine argument to systemctl into a unit file?

I have this unit file hdmi_sound_toggle.service: [Unit] Description=Runs /usr/local/bin/hdmi_sound_toggle.py to switch to the correct sound output [Service] Type=oneshot ExecStart=/usr/local/bin/...
user avatar
  • 223
0 votes
0 answers
81 views

"Inappropriate ioctl for device " for USB Microphone

I am somewhat new to unix and linux. I have a USB microphone that is plugged into a USB Port on a headless Raspberry Pi 4. I am trying to write some Python code that can read the microphone so that ...
user avatar
0 votes
0 answers
85 views

Why is this systemd service preventing PortAudio to query audio devices?

I have a very strange problem since a few hours with what seems really two really unrelated things: a Systemd service (doing nothing!) and the listing of available audio devices. More precisely I have ...
user avatar
  • 2,243
1 vote
1 answer
292 views

USB flash drives automatically mounted (headless computer)

For the project SamplerBox, up to now I was using /dev/sda1 /media auto nofail 0 0 to have USB flash drives automatically mounted when inserted on the headless computer, see also Auto-mount and auto-...
user avatar
  • 2,243
0 votes
1 answer
199 views

Udev hwdb to re-map a key when I don't know the key code

I've written a file /etc/udev/hwdb.d/70-keyboard.hwdb to re-map some of my keyboard keys. There's an additional key that I want to re-map, but I can't figure out what identifier I should use for it. ...
user avatar
0 votes
0 answers
27 views

CentOS: fix nic name to eth0 for a specific mac yet keep others nic names be eth1,2,3

Not just a simple case of fixing nic name to eth0 for a specific mac, I have done that, but this time it is a special case: By default: first detected nic (disconnected) -> eth0 second detected ...
user avatar
  • 209
0 votes
0 answers
17 views

How to block all wireless non-bluetooth devices using udev

How to block all wireless non-bluetooth devices in udev (that require an USB adapter to attach to computer) ? I want to block permanently all wireless HID devices such as wireless mice or keyboard .
user avatar
  • 23
0 votes
0 answers
17 views

udevadm shows offline message logs

I am debugging an issue using udevadm monitor -u. I get continuous logs as under not knowing what it translates to. please help UDEV [9415.844741] offline /devices/platform/68000000.ocp/48070000.i2c/...
user avatar
0 votes
1 answer
42 views

Cannot get IP on cloned VM LINUX7,8

I have cloned a virtual machine running RHEL 7 and 8. I am not getting an ip address. After cloning the virtual machine, networking no longer functions. The ifconfig command does not show the network ...
user avatar
0 votes
1 answer
842 views

How to change sdb label into sda (if possible)?

I have recently installed 3 Ubuntu 20.04 nodes. In one of them the system was installed on /dev/sdb instead of /dev/sda (apparently the sda label was used by the usb stick from where I installed the ...
user avatar
  • 301
0 votes
0 answers
41 views

Udev Rule to discern 2 identical video capture card

I have 2 identical video capture card plugged into my raspberry Pi 4. I'm trying to create udev rules top map them to video0 / video1 depending the USB port they're plugged in. Based on this question ...
user avatar
  • 1
0 votes
1 answer
84 views

How can I detect an arbitrary SSD in a udev rule?

I want to add a udev rule to set sysctl -w vm.swappiness = 100 on machines where the boot partition is on a flash storage device. My current system uses an NVMe card, which I can detect as SUBSYSTEM=&...
user avatar
  • 1,588
0 votes
0 answers
186 views

How to get vid and pid of usb device before authorize it

I am writing an application in C++ on Linux (Ubuntu) that can detect plugging USB devices. I am using libudev library to detect new devices and get some pieces of information about them, such name, ...
user avatar
1 vote
1 answer
152 views

How to update /dev/mapper entries after unplugging hotswap disk

My backup disks use lvm. They are both inserted into the same cage, so only one of them can be present in the system at any one time. When I remove a disk, the entry in /dev/mapper usually doesn't go ...
user avatar
  • 11
0 votes
1 answer
51 views

What happens when an SD card gets connected to a Linux computer

I'm still quite confused as to how this works exactly. When we connect an SD card to a computer running a Linux system, this is my understanding (Please feel free to correct on the smallest of details ...
user avatar
0 votes
0 answers
31 views

Udev: Auto-Configuring webcam rule fires but doesn't work when plugging in. But works when calling "udevadm trigger"

Okay, I'm at a complete loss: I'm trying to auto-configure my webcam. When running "udevadm trigger" while the device is already plugged in everything works and the cam is configured. But ...
user avatar
0 votes
1 answer
275 views

USB/udev: udev rule runs, sets permissions correctly, still can't access USB device

Problem udev rule that sets group of USB device to usrp, mode to 0660 used to work for allowing my user, which is in group usrp, to access the USB device. Not anymore. Platform x86_64 Fedora 34 / ...
user avatar
0 votes
1 answer
184 views

udev rule for connecting external display not working

I have created my very first udev rule to automatically setup my external display when I plug in my laptop to docking station. As things turn out it's not working (what a suprise). First things first ...
user avatar
0 votes
1 answer
226 views

udev rule for USB disks on Debian 11

Could somebody assist me in creating a working udev rules (Debian 11) for the following actions, please: A USB disk (2 TB or bigger) has a given volume id of e.g. „abc“. When the USB disk is attached ...
user avatar
  • 21

1
2 3 4 5
20