Questions tagged [udev]
Udev is a Linux process that manages device file entries under /dev
1,118
questions
0
votes
0
answers
15
views
Debian 12 - Automatically set Natural Scrolling on bluetooth keyboard//trackpad
I have a bluetooth keyboard/trackpad. I've paired it nicely with my PC (integrated Bluetooth) and it works. Except the trackpad is in "natural" mode. I'm old school and want to make it ...
1
vote
1
answer
29
views
How to Stop Script from Overwriting Symlink to a File
long time reader, but first questioner here.
(Feedback on my question is welcome)
I'm using a Raspberry Pi CM4 with a custom PCB. The board includes a USB Hub to allow for 2-3 peripherals. Hardware ...
0
votes
0
answers
34
views
Debian11 network interfaces renaming issues
We have been on Debian 10 and we operate with "net.ifnames=0" kernel parameter to keep the network interfaces named 'eth0', 'eth1', etc. because of requirements of a legacy software license ...
1
vote
0
answers
20
views
systemd initrd fail with cryptsetup device timeout
I'm trying to run systemd inside my initramfs image. I have luks full disk ecnryption, and everything worked fine until I tried using my initramfs with raspberry pi. For some reason it decrypts device ...
0
votes
1
answer
37
views
Formulate systemd .link file as plain udev rule or rename network interface without mac address
Due to hardware reasons, we have to rename our network interfaces. Because we have to do that on all our boards, for which we do not know the mac address, we have to do it using the id-path or driver.
...
0
votes
1
answer
33
views
Understanding udev's ID_PATH for USB devices
When plugging different peripherals into the same USB port, the udev ID_PATH reports slightly different values.
Peripheral A: platform-fe9c0000.xhci-usb-0:1:1.0
Peripheral B: platform-fe9c0000.xhci-...
3
votes
0
answers
34
views
udev rule odd behavior with bluray disc drive
I have a udev rule that runs a script when a bluray disc is loaded. I am aware of the time limit on udev scripts and so have the script run a child script with the "at now" command.
The ...
0
votes
0
answers
35
views
Cannot find how to create network namespace in udev rule
I want to write a udev rule (ACTION=add) that will create a new network namespace, move the newly added device to it and exec some commands inside it.
I was using irpoute2 to do so (Inside the rule):
...
0
votes
1
answer
69
views
Naming of SAS block devices under /dev/disk/by-id?
When one uses SATA SSDs or HDDs under Linux, they can be addressed in numerous ways, like for example:
/dev/sda
/dev/disk/by-id/ata-TOSHIBA_MG05ACA800E_78LBK8P7FUUD
/dev/disk/by-id/wwn-...
2
votes
0
answers
72
views
Why is a udev rule to symlink /dev/ttySPECIAL replacing /dev/tty with a symlink as well
On my target embedded system I have a udev rule that looks like:
KERNEL=="ttyACM?", ATTRS{idVendor}=="1234", ATTRS{idProduct}=="5678", SYMLINK+="ttySPECIAL", ...
1
vote
0
answers
62
views
Does udev have an issue with the 'hwmon' subsystem?
I have a temp/humidity sensor connected to the i2c-0 interface on a Raspberry Pi: Rpi OS ver 'bookworm'. It works fine, and I can read sensor values from the files in /sys/class/hwmon/hwmon2 (or ...
0
votes
0
answers
145
views
Gentoo Linux halted at boot, (udev-worker, stack depth)
the PC running Gentoo Linux was working fine until yesterday. Today he begins the boot checkup until he arrives at:
[ ok ] Reached target multi-user.target.
[ ok ] Reached target graphical....
0
votes
1
answer
49
views
libinput example program doesn't get any events
https://wayland.freedesktop.org/libinput/doc/latest/api/index.html
Following the simple example program in their website i made the following , but the loop never executes , meaning no events where in ...
0
votes
0
answers
46
views
New to Python, can't get a Github project working. can anyone help?
Trying to build the lyrics browser found here.
Although I have little to no experience with Python I've managed to get the software running on a Raspberry PI 2 to a point where the main program is ...
0
votes
0
answers
17
views
Is it possible to prevent usb udev automount from the boot partition on raspberry pi os (i.e. cmdline.txt, firstrun.sh etc)
I would like to prevent an SSD drive from being automounted prior to first boot. I.e. by perhaps running something from cmdline.txt or firstun.sh.
I'm happy for it to either prevent mounting of a ...
0
votes
1
answer
12
views
mapping between PCAN_USBBUSX to /dev/pcanusbX
I have Ubuntu server (22.04.2 LTS) with multiple PCAN devices connected,
CAN driver info:
$ modinfo pcan
filename: /lib/modules/6.5.0-26-generic/misc/pcan.ko
license: GPL
version: ...
1
vote
1
answer
83
views
How to reset status of a network adapter before assigning the name in a udev ruleset?
Part 4 of the problem with the usb3 nic interfaces after debian 6.1.0-20 kernel update.
See the other posts here:
Debian 12 - All of sudden my USB3 Lan adapter get assigned random mac address each ...
0
votes
0
answers
105
views
Pass-through of OBS Virtual Camera to QEMU
I'd like to use my OBS virtual camera in a virtual machine.
OBS will not run within a virtual machine unless I perform a GPU-passthrough, which I feel is unnecessary and undesirable in this situation.
...
0
votes
1
answer
51
views
Use usb path of an usb nic address in udev rules in order to assign an interface name instead of mac address
Related to:
Debian 12 - All of sudden my USB3 Lan adapter get assigned random mac address each reboot
Use parrent attribute "serial" in UDEV configuration to assign lan interface another ...
1
vote
1
answer
79
views
Use parrent attribute "serial" in UDEV configuration to assign lan interface another name instead of relying on the mac address
Given this kernel problem awaiting to be fixed and that randomly assign mac address to this usb3 lan adapters: Debian 12 - All of sudden my USB3 Lan adapter get assigned random mac address each reboot
...
0
votes
0
answers
84
views
How to set block device name using udev rules based on sdcard reader serial number
I have sdcard reader and I want to set block device names to /dev/sdcard2 and their partitions will be named /dev/sdcard2p1 /dev/sdcard2p2 /dev/sdcard2p3 ... (based on partition count of specific card ...
0
votes
1
answer
120
views
Predictable Network Interface Names doesn't rename NFS root interface
With NFS root and Predictable Network Interface, I got differences in ethernet interface names: one interface configured by Kernel is named eth0, and others are named according to Network device ...
0
votes
0
answers
39
views
Udev rules do not work while a USB device is plugged in
I am trying to disable all USB ports and only provide access to my keyboard and mouse.
Rules are working when I plug in and out the USB devices.
However,
when I try to reboot the system while there ...
1
vote
2
answers
133
views
Can udev rules create new device properties?
I wrote a udev rule to create a property in /etc/udev/rules.d/99-backlight-scale.rules:
ACTION=="add", \
KERNEL=="amdgpu_bl1", \
SUBSYSTEM=="backlight", \
DEVPATH=="/...
1
vote
0
answers
30
views
Udev rule to adjust mouse speed not working (but executing)
Summary
I want to use a udev rule to adjust the speed of a certain mouse when I attach it.
I can get the udev rule to fire, but it does not successfully adjust the mouse speed. However, when I ...
0
votes
1
answer
83
views
How to change default automount USB path to /mnt/sdXX?
Default mount path with udisks2, udiskie is /media/XXXXX
On some distributions /media/user/XXXXXX
How to change automount path for USB drives to a shorter /mnt/sdb1 /mnt/sdc2 etc.
With udisks2, ...
0
votes
0
answers
94
views
Emulate ttyS0 on Ubuntu 22 or link it to ttyUSB0
I have a JAVA code that checks if ttyS0 is present. I dont have a serial port, so Im getting:
Exception in thread "main" java.lang.RuntimeException:
Error opening "/dev/ttyS0"
...
-2
votes
1
answer
59
views
why does a device node need to be made in udev when you plug in a device into your computer?
Why does a device node need to be made in udev when you plug in a device into your computer?
Why does a device node need to exist?
0
votes
1
answer
68
views
Create symbolic links to block devices by partition table UUID
Within /dev/disk, there are the folders by-id, by-label, by-partlabel, by-partuuid, by-path, and by-uuid. Is there a way to make what software responsible for this create a directory called by-ptuuid ...
1
vote
0
answers
35
views
udev rule not work for my usb-stick
i try to setup udev rules for my usb stick, to get always the same path.
this is my rule:
ACTION=="add|change", KERNEL=="ttyUSB[0-9]*", SUBSYSTEMS=="usb", ATTRS{...
0
votes
1
answer
69
views
Udevadm doesn't auto trigger after suspended
I set up my USB modem with Ubuntu, so that it automatically switches to modem mode every time it suspends and resumes from sleep mode.
Following the instructions from here [1], I was able to do it, ...
1
vote
0
answers
322
views
How to ignore/disable all USB HID devices except a certain one using udev rules?
I would like to ignore/disable all USB HID devices except a certain one, using udev rule(s). I have the idVendor and idProduct attributes of the USB HID device I want to allow.
I am able to disable ...
4
votes
1
answer
2k
views
What is a device manager in the context of Linux?
What is a device manager in the context of Linux?
That is, what is it that a device manager actually does?
https://en.wikipedia.org/wiki/Udev says
udev (userspace /dev) is a device manager for the ...
1
vote
0
answers
34
views
Unable to send automated mail using udev and msmtp
I am trying to write a script to send an email whenever a usb device is connected to my computer (Arch Linux). The code I wrote is
#!/bin/bash
if [[ ! -z "$1" ]]; then
echo "USB ...
0
votes
1
answer
82
views
Udev Block iPhone
I'm trying to block my iPhone from being used when I connect it so that I can pass it through to a VM. So far, I have this udev rule but I still get an error about the device being used whenever I try ...
0
votes
0
answers
42
views
Is it possible to reconnect a disconnected Linux boot device without rebooting?
I am using a live image of Debian GNU/Linux 12.2 (“bookworm”; kernel 6.1.0). I booted from a USB memory stick and used the system for several days without problem. Then, upon resuming from standby, it ...
2
votes
0
answers
76
views
Can I simulate power supply getting offline using udev or in other ways under Linux?
I have created the rule /etc/udev/rules.d/80.power.rules:
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="/root/test.sh"
Then I execute the command ...
0
votes
0
answers
58
views
How do I map buttons for libwacom
I would like to add a wacom tablet. I have created /etc/libwacom/vendor-model.tablet. libwacom-list-local-devices returns the following
(libwacom-list-local-devices:20048): libwacom-WARNING **: 21:17:...
-3
votes
1
answer
1k
views
Why am I not allowed to access files in /usr/bin/?
I have this machine. I am the sole user of the machine. I cannot access files in /usr/bin/ because of a location issue with /usr/lib/python3/dist-packages/printrun/ and am currently receiving errors.
...
0
votes
2
answers
250
views
I messed /dev/tty ownership and permissions [closed]
I was flashing a Flipper Zero Wifi Dev Board and I needed to have /dev/ttyACM0 owned by dialout group...
The thing is now I have tried to revert the stuff, making a chown root:tty /dev/tty*, and chmod ...
2
votes
0
answers
43
views
Generate upper-case in a udev rule?
I have a use case with cross-platform context which makes me want to generate symlinks under a /dev/disk/by-X directory that have an uppercase version of data returned by blkid.
Is there a built-in ...
0
votes
0
answers
27
views
The best way to configure an unused Ethernet socket (RJ45)
I have a machine (QNAP TS412 ..server, no GUI, indeed no screen) with 2 Ethernet ports. Now the usual setup is I have ETH0 plugged in and getting its address via DHCP, ETH1 empty. But there 2 other ...
0
votes
0
answers
78
views
How do I identify the connected USB device?
If I write the rules, for example, in this form:
ACTION=="remove", GOTO="serial_end"
SUBSYSTEM!="tty", GOTO="serial_end"
KERNEL=="ttyUSB[0-9]*", RUN+=...
1
vote
1
answer
268
views
50-udev-default.rules: Unknown builtin command: net_driver, lost internet connection
I'm running an Arch-based distro, and after doing a substantial update lost my internet connection (both wifi and ethernet). I'm able to roll back all of the changes and get it back, but would ...
0
votes
0
answers
32
views
How do you find what module loaded by (e)udev is hanging the system?
I have two different kernels, one built with a bunch of device support and another with not as much device support. The one with less device support boots fine on an older P5K Pro motherboard, the ...
0
votes
0
answers
44
views
Using different layout for each keyboard
I've seen similar questions here, but I don't think I'm duplicating any of them. I've been making progress on this matter for years, but there's still some way to go. The latest stage is that I use ...
0
votes
0
answers
67
views
UDEV rule not working - can't create symlink
So, I confess I'm actually trying to study for the Linux+ exam
I have a USB device. Information about it looks like:
looking at parent device '/devices/pci0000:00/0000:00:0b.0/usb1/1-2':
KERNELS==...
0
votes
1
answer
1k
views
How does modprobe.d blacklist work, exactly?
Problem
I have conflicting drivers: xpad which comes standard with Arch, and xone which I installed from AUR. Both claim to support my Xbox One wireless controller even though only the xone driver ...
1
vote
0
answers
157
views
Udev rule randomly failing on boot
I have an embedded system with ubuntu running on it. Inside its /etc/udev/rules.d directory i put a file named 99-mydevice.rules:
KERNEL=="video0", SUBSYSTEM=="video4linux", ...
0
votes
0
answers
249
views
Serial interfaces and sysfs. How to get a unique identifier for each serial port
I want to enumerate the serial ports on a Linux system and get unique and stable (across reboots) identifiers for them. Stable in the sense that when I plug and unplug serial USB devices (same USB ...